Lets say we have 3 APIs are created namely API, API1, API2.
With
the below curl command it will retrieve details of 3 APIs available. Because all of these APIs contained API as part of name.
curl -H "Authorization: Bearer 8551158c1" http://127.0.0.1:9763/api/am/ publisher/v0.9/apis?query='API '
Or
curl -H "Authorization: Bearer 94de782ddd64d3fea012bed4a71d76 4b" http://127.0.0.1:9763/api/am/ publisher/v0.9/apis?query=' Name:API'
But sometimes you may feel it didn't return you exact results (return only API and not API1, API2).
Reason
is to match we used following regex and it will match with any string
containing term in any place of string to be tested.(?i)[\\w.|-]*term[\\w.|-]*
curl -H "Authorization: Bearer 94de782ddd64d3fea012bed4a71d764b" http://127.0.0.1:9763/api/am/publisher/v0.9/apis?query='Name:^CalculatorAPI$'
No comments:
Post a Comment