cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Filter parameter on value subproperties

dan3
Newcomer

Hello,

I am trying to filter a settings/object API call via the filter parameter on the "value" field. The REST API docs mention it is possible to filter by subproperties, but this is unable to parse characters like - and [].

Example:

{tenanturi}api/v2/settings/objects?schemaIds=builtin:logmonitoring.log-storage-settings&scope=scope&fields=value&filter=value.config-item-title='test'

dan3_0-1702550203105.png

and with filter=value["config-item-title"]='test'

same error on token recognition error at: '['"

Follow up question:

Given this is the structure of the value field in a settings object

dan3_1-1702550487981.png

Would it be possible to filter the response by the content of the matchers field?

For instance, returning only settings that contain log.source matchers?

 

Thank you for your help 🙂

1 REPLY 1

mark_bley
Dynatrace Champion
Dynatrace Champion

Looks like you may be using some other kind of Unicode dash(?), try following curl (replace filter as needed)

curl --location --request GET 'https://{environmentid}.live.dynatrace.com/api/v2/settings/objects?validateOnly=false&schemaIds=builtin:logmonitoring.log-storage-settings&fields=objectId,value,scope&filter=value.config-item-title='\''/some/file.log'\''' \
--header 'accept: application/json; charset=utf-8' \
--header 'Authorization: Api-Token dt0c01.xxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json; charset=utf-8'

 

Featured Posts