Hi there!
I have a question how to render my intention of using a filter in a query. I want to do Service - Agent - HTTP API | Consul by HashiCorp query with tag filtering: pass condition => one of the tags is in the specific list.
The description doesn’t say how technically to express this in the HTTP image of request. I’m not from web background, and with the given description I assume that machinery with filters (which are part of query parameters) is kind of a standard thing, but I have no web background so its not evident to me.
I want to integrate with Consul from C++ application (using https://github.com/boostorg/beast if that makes any difference) so I can understand the machinery on the level of raw HTTP messages (I can write the code that will produce a necessary HTTP message once I know how it should look like).
For Service field I’ve managed to “render” the filter properly:
GET /v1/agent/services?filter=Service=="THESERVICE" HTTP/1.1
header-fields
For Tags All that I try seems not to work:
Try: GET /v1/agent/services?filter=Tags In [“fake-service”] HTTP/1.1
Result: 400 Bad Request
Try: GET /v1/agent/services?filter=Tags%20In%20[“fake-service”] HTTP/1.1
Result: Failed to create boolean expression evaluator: 1:6 (5): no match found, expected: “!=”, “==”, “contains”, “in”, “is”, “matches”, “not” or [ \t\r\n]
Try: GET /v1/agent/services?filter=Tags%20in%20[“fake-service”] HTTP/1.1
Result: Failed to create boolean expression evaluator: 1:9 (8): rule “match”: Invalid selector
Can you, please, give me a link to description or maybe a curl example using Tags filter?