You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Querying rules (of user)
> curl -s -X GET "http://127.1:8082/api/routes/" -H "Authorization: Token $token"

Querying thenactions
> curl -s -X GET "http://127.1:8082/api/thenactions/" -H "Authorization: Token $token"

Creating/Editing existing rule (with name=Example5, it seems that id value in url can be arbitrary, but at least one attr value has to be different to before, especially for creating)
> curl  -X PUT -F "name=Example5" -F "comments=Description" -F "source=0.0.0.0/0" -F "sourceport=30" -F "destination=10.0.0.56" -F "then=https://fod.example.com/api/thenactions/3/" -H "Authorization: Token $token" http://127.1:8082/api/routes/1/

Deleting (id field in URL seems to be important here) (does not work as rule is automatically recreated in FOD after some seconds)
> curl -X DELETE  -H "Authorization: Token $token" http://127.1:8082/api/routes/24/

  • No labels