Skip to content

Support filter on tag id in target endpoint #2979

@bobvandevijver

Description

@bobvandevijver

I'd like to be able to create a device filter based on tag ID, as the tag ID will be static while the tag name might not be.

As example, I want all devices using the tag with ID 11, which would be tag.id==11 as q:

curl -X 'GET' \
  'https://hawkbit-dev.example.com/rest/v1/targets?q=tag.id%3D%3D11&offset=0&limit=50' \
  -H 'accept: application/hal+json' \
  -H 'Authorization: Basic snip'

The following is returned:

{
  "exceptionClass": "org.eclipse.hawkbit.repository.exception.RSQLParameterUnsupportedFieldException",
  "errorCode": "hawkbit.server.error.rest.param.rsqlInvalidField",
  "message": "The given search field {tag.id} has unsupported sub-attributes. Supported sub-attributes are [name]"
}

I'm aware that there is an endpoint to retrieve all target assigned a specific tag (/rest/v1/targettags/{targetTagId}/assigned), but I need the filter support to be able to create a rollout from it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions