Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New call for adding multiple agents to a group #256

Merged
merged 1 commit into from
Dec 20, 2018

Conversation

druizz90
Copy link
Contributor

@druizz90 druizz90 commented Dec 18, 2018

Hi team,

This PR is for issue #254. I added a new call for adding multiple agents to a group in the same call:

$ curl -u foo:bar -X POST -H "Content-Type:application/json" -d '{"ids":["001","002"]}' "http://localhost:55000/agents/group/dmz?pretty"
{
   "error": 0,
   "data": {
      "msg": "All selected agents assigned to group dmz",
      "affected_agents": [
         "001",
         "002"
      ]
   }
}
$ curl -u foo:bar -X POST -H "Content-Type:application/json" -d '{"ids":["003","007"]}' "http://localhost:55000/agents/group/dmz?pretty"
{
   "error": 0,
   "data": {
      "msg": "Some agents were not assigned to group dmz",
      "failed_ids": [
         "007"
      ],
      "affected_agents": [
         "003"
      ]
   }
}
$ curl -u foo:bar -X POST -H "Content-Type:application/json" -d '{"ids":[]}' "http://localhost:55000/agents/group/dmz?pretty" 
{
   "error": 1732,
   "message": "No agents selected"
}

Best regards,

Demetrio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants