To use all handlers except Auth you should set token in Authorization header (See examples).
- url:
/flow/v1/signup - method: POST
- args:
- name - username
- password - password
curl -XPOST "http://localhost:9000/flow/v1/signup" --data "name=dummy&password=qwerty"
- url:
/flow/v1/signin - method: POST
- args:
- name
- password
curl -XPOST "http://localhost:9000/flow/v1/signin" --data "name=dummy&password=qwerty"
- url:
/flow/v1/gentoken - method: POST
- args:
- name
- password
curl -XPOST "http://localhost:9000/flow/v1/gentoken" --data "name=dummy&password=qwerty"
# You could save token.
tok=$(curl -sXPOST "http://localhost:9000/flow/v1/gentoken" --data "name=dummy&password=qwerty")
- url:
"/flow/v1/profiles - method: GET
curl "http://localhost:9000/flow/v1/profiles" -H "Authorization: $tok"
- url:
/flow/v1/profiles/(.+) - method: GET
curl "http://localhost:9000/flow/v1/profiles/profilename" -H "Authorization: $tok"
- url:
/flow/v1/profiles/(.+) - method: PUT, POST
curl -XPUT "http://localhost:9000/flow/v1/profiles/ZZZ2" -H "Authorization: $tok" --data-binary "{\"pool-limit\": 2}"
- url:
/flow/v1/profiles/(.+) - method: DELETE
curl -XDELETE "http://localhost:9000/flow/v1/profiles/ZZZ2" -H "Authorization: $tok"
- url:
/flow/v1/runlists - method: GET
curl "http://localhost:9000/flow/v1/runlists" -H "Authorization: $tok"
- url:
/flow/v1/hosts - method: GET
curl "http://localhost:9000/flow/v1/hosts" -H "Authorization: $tok"
- url:
/flow/v1/hosts/(.+) - method: PUT, POST
curl -XPUT "http://localhost:9000/flow/v1/hosts/localhost" -H "Authorization: $tok"
- url:
/flow/v1/hosts/(.+) - method: DELETE
curl -XDELETE "http://localhost:9000/flow/v1/hosts/localhost" -H "Authorization: $tok"
- url:
/flow/v1/groups - method: GET
curl "http://localhost:9000/flow/v1/groups" -H "Authorization: $tok"
- url:
/flow/v1/groups/([^/]+) - method: GET
curl "http://localhost:9000/flow/v1/groups/TEST" -H "Authorization: $tok"
- url:
/flow/v1/groups/([^/]+) - method: PUT, POST
curl -XPUT "http://localhost:9000/flow/v1/groups/TEST" -H "Authorization: $tok"
- url:
/flow/v1/groups/([^/]+) - method: DELETE
curl -XDELETE "http://localhost:9000/flow/v1/groups/TEST" -H "Authorization: $tok"
- url:
/flow/v1/groups/([^/]+)/(.+) - method: PUT
- args:
- weight - integer value
curl -XPUT "http://localhost:9000/flow/v1/groups/TEST/myapp?weight=1" -H "Authorization: $tok"
- url:
/flow/v1/groups/([^/]+)/(.+) - method: DELETE
curl -XDELETE "http://localhost:9000/flow/v1/groups/TEST/myapp" -H "Authorization: $tok"
- url:
/flow/v1/apps - method: GET
curl "http://localhost:9000/flow/v1/apps" -H "Authorization: $tok"
- url:
/flow/v1/apps/<app>/<version> - method: GET
curl "http://localhost:9000/flow/v1/apps/a/1" -H "Authorization: $tok"
- url:
/flow/v1/apps/<app>/<version> - method: POST
- body: tar-archive with application
curl -XPOST "http://localhost:9000/flow/v1/apps/testapp/1" -H "Authorization: $tok" --data-binary @testapp.tar.gz
- url:
/flow/v1/deployapp/<app>/<version> - method: POST
- args:
- profile
- runlist
- weight: default value 0
curl -XPOST "http://localhost:9000/flow/v1/deployapp/testapp/1?profile=TEST&runlist=TEST&weight=100" -H "Authorization: $tok"
- url:
/flow/v1/startapp/<app>/<version> - method: POST
- args:
- profile
curl -XPOST "http://localhost:9000/flow/v1/startapp/testapp/1?profile=TEST" -H "Authorization: $tok"
- url:
/flow/v1/stopapp/<app>/<version> - method: POST
curl -XPOST "http://localhost:9000/flow/v1/stopapp/testapp/1" -H "Authorization: $tok"
- url:
/flow/ping - method: GET