Add resource to qrm:
curl --header "Content-Type: application/json" --request POST --data '[{"name": "resource_2", "type": "server"}]' http://localhost:8080/add_resources
Remove resource from qrm:
curl --header "Content-Type: application/json" --request POST --data '[{"name": "resource_2", "type": "server"}]' http://localhost:8080/remove_resources
Set resource status:
curl --header "Content-Type: application/json" --request POST --data '{"resource_name": "resource_2", "status": "active"}' http://localhost:8080/set_resource_status
curl --header "Content-Type: application/json" --request POST --data '{"resource_name": "resource_2", "status": "disabled"}' http://localhost:8080/set_resource_status
Add job to resource:
curl --header "Content-Type: application/json" --request POST --data '{"resource_name": "resource_1", "job": {"token": 1, "job_name": "foo"}}' http://localhost:8080/add_job_to_resource
Remove job from resources:
curl --header "Content-Type: application/json" --request POST --data '{"token": 1, "resources": ["resource_1"]}' http://localhost:8080/remove_job
Add tag to resource:
curl --header "Content-Type: application/json" --request POST --data '{"resource_name": "resource_1", "tag": "foo"}' http://localhost:8080/add_tag_to_resource
Remove tag from resource:
curl --header "Content-Type: application/json" --request POST --data '{"resource_name": "resource_1", "tag": "foo"}' http://localhost:8080/remove_tag_from_resource
Set server status (control the global qrm state):
curl --header "Content-Type: application/json" --request POST --data '{"status": "disabled"}' http://localhost:8080/set_server_status
curl --header "Content-Type: application/json" --request POST --data '{"status": "active"}' http://localhost:8080/set_server_status
Show status of the server with it's resources and their jobs url:
http://127.0.0.1:8080/status
This web URL will show information about the server.
http://127.0.0.1:5555/is_server_up
curl http://localhost:5555/is_server_up
Json Response
{"status": true}
example: /new_request -> /new_request/v1
curl --header "Content-Type: application/json" --request POST --data '{"names": [{"names": ["r1"], "count": 1}], "tags": [], "token": "token1234"}' http://localhost:8080/new_request/v1
curl --header "Content-Type: application/json" http://localhost:8080//get_token_status/v1?token=<token>
curl --header "Content-Type: application/json" --request POST --data '{"token": "token1234"}' http://localhost:8080/cancel_token/v1