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

Adapt DevTools #731

Merged
merged 3 commits into from
Jun 3, 2019
Merged

Adapt DevTools #731

merged 3 commits into from
Jun 3, 2019

Conversation

adri9valle
Copy link
Contributor

@adri9valle adri9valle commented May 29, 2019

Hi team,

This PR adapts the requests made in the devTools to the API standards.

Only permit query string in GET and DELETE and the PUT and POST methods can use body params.

Related issue: #730

Regards,

@adri9valle adri9valle added type/enhancement Enhancement issue fixes labels May 29, 2019
@adri9valle adri9valle self-assigned this May 29, 2019
@jesusgn90
Copy link

jesusgn90 commented Jun 3, 2019

Please make the next tests before merging this PR:

  • GET
    • Body parameters
    • Inline parameters
    • No parameters
    • Mixing parameters + inline (inline has precedence)
  • PUT
    • Body parameters
    • Inline parameters
    • No parameters
  • POST
    • Body parameters
    • Inline parameters
    • Mixing parameters + inline (inline has precedence)
  • DELETE
    • Body parameters
    • Inline parameters
    • No parameters
    • Mixing parameters + inline (inline has precedence)

@adri9valle
Copy link
Contributor Author

adri9valle commented Jun 3, 2019

Hi team,

I've done the next tests in the devTools:

GET requests
GET /agents

GET /agents?limit=1

GET /agents?limit=2{"limit": 56}

GET /agents?limit=1
{
  "limit": 3
}
DELETE requests
DELETE /agents/003

DELETE /agents?ids=003&older_than=5s

DELETE /agents
{
  "ids": "003",
  "older_than": "10s"
}

DELETE /agents?ids=005
{
  "ids": "006",
  "older_than": "15s"
}
POST requests
POST /agents?name=agent1&ip=any

POST /agents 
{
  "name": "agent1",
  "ip" : "any"
}

POST /agents?name=agent1
{
 "name": "agent2",
 "ip": "172.16.2.4"
}

POST /agents?name=agent1&ip=any
{
 "name": "agent2",
 "ip": "172.16.2.4"
}
PUT requests
PUT /agents/agent5

PUT /active-response/006?command=test_ar

PUT /active-response/006
{
"command":"test_ar"
}

PUT /active-response/006?command=test_ar
{
"command":"test_ar2"
}

All the tests have been passed.

@jesusgn90 jesusgn90 merged commit 62350f2 into 3.9 Jun 3, 2019
@jesusgn90 jesusgn90 deleted the fix-dev-tools branch June 3, 2019 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Enhancement issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants