Hi everyone,
I'm testing Horzion view server api (for version 8.0) using the postman.
when I test the following API, something doesn't work, I don't know is it a bug or I do the wrong calling, who can help me?
API:
https://{{horizonserver}}/rest/inventory/v1/machines
I used a filter to query by user_ids, the filter json string is :
{
"type":"Contains",
"name":"user_ids",
"value":[ "S-1-5-21-132563458-2059465199-3485338518-501", "S-1-5-21-132563458-2059465199-3485338518-500" ]
}
and I used a url encode tool to encode it:
%7B%0A%22type%22%3A%22Contains%22%2C%0A%22name%22%3A%22user_ids%22%2C%0A%22value%22%3A%5B%20%22S-1-5-21-132563458-2059465199-3485338518-501%22%2C%20%22S-1-5-21-132563458-2059465199-3485338518-500%22%20%5D%0A%7D
the final url is :
https://{{horizonserver}}/rest/inventory/v1/machines?filter=%7B%0A%22type%22%3A%22Contains%22%2C%0A%22name%22%3A%22user_ids%22%2C%0A%22value%22%3A%5B%20%22S-1-5-21-132563458-2059465199-3485338518-501%22%2C%20%22S-1-5-21-132563458-2059465199-3485338518-500%22%20%5D%0A%7D
but the result is []
if I use the following filter json string :
{
"type":"Contains",
"name":"user_ids",
"value":"S-1-5-21-132563458-2059465199-3485338518-501"
}
encode it: %7B%0A%22type%22%3A%22Contains%22%2C%0A%22name%22%3A%22user_ids%22%2C%0A%22value%22%3A%22S-1-5-21-132563458-2059465199-3485338518-501%22%0A%7D
final url:
https://{{horizonserver}}/rest/inventory/v1/machines?filter=%7B%0A%22type%22%3A%22Contains%22%2C%0A%22name%22%3A%22user_ids%22%2C%0A%22value%22%3A%22S-1-5-21-132563458-2059465199-3485338518-501%22%0A%7D
I can get the result.
I think that is a bug. who would like to help me ? Thanks!
James Xie