CURL search returns : Encountered error while executing command: You must pass in the tests

Issue: 

- When using an API call to output a list of all container members using a command like the following

curl -k -X GET https://localhost/api/rest/command/container.members?servicename=* -H 'Cache-Control: no-cache' -H 'accept */*' -H 'cookie: TraverseJSessionID=#######'
- Returns an error stating: "ERR 501 Encountered error while executing command: You must pass in the tests"

Workaround:

- To request a token to Authenticate with Traverse REST API, this KB can be followed - https://helpdesk.kaseya.com/hc/en-gb/articles/229042308-Tip-How-to-access-the-Traverse-REST-API

- Then you can add a test to the container

mceclip0.png

 

- Lastly, use the API call to output a list of the container members, such as below:

curl -k -X GET https://localhost/api/rest/command/container.members?servicename=* -H 'Cache-Control: no-cache' -H 'accept */*' -H 'cookie: TraverseJSessionID=#######'

 

mceclip1.png

 

 

 

 

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Contact us