Bug #5786
Updated by François ARMAND almost 10 years ago
When defining a Rule, defining include/exclude targets is not easy. You have to put a whole string to manage that target ... instead of using a json object. We should definitely correct this. To be more precise, this is the supported use cases: JSON in a file (notice the content-type): curl -H "X-API-Token: HRLeYGfBX9TZQnF0aq6Ab7U2M7HbRJO8" -k -X POST -H "Content-Type: application/json" http://localhost:8082/rudder-web/api/latest/rules/19050b37-cb8c-4449-8696-68bf6e575cf6\?prettify\=true -d @update.json JSON in the line (notice the content-type): curl -H "X-API-Token: HRLeYGfBX9TZQnF0aq6Ab7U2M7HbRJO8" -k -X POST -H "Content-Type: application/json" http://localhost:8082/rudder-web/api/latest/rules/19050b37-cb8c-4449-8696-68bf6e575cf6\?prettify\=true -d '{"targets":["special:all", "group:b92a4f59-da85-455e-ab3d-1fd48e43a5f8"]}' Simple list of groups: curl -H "X-API-Token: HRLeYGfBX9TZQnF0aq6Ab7U2M7HbRJO8" -k -X POST http://localhost:8082/rudder-web/api/latest/rules/19050b37-cb8c-4449-8696-68bf6e575cf6\?prettify\=true -d "targets=special:all" -d "targets=group:b92a4f59-da85-455e-ab3d-1fd48e43a5f8"