Skip to content

[HOW TO] Register a compute resource via the REST API

Jorge edited this page Apr 18, 2024 · 3 revisions

Register a compute resource via the REST API

An admin user (like chris) makes a POST request to the admin API /chris-admin/api/v1/computeresources/

For instance, using the httpie client and assuming that the ChRIS service is running at localhost:8000:

Register the compute resource named host

http -a chris:chris1234 POST http://localhost:8000/chris-admin/api/v1/computeresources/  \
Content-Type:application/vnd.collection+json Accept:application/vnd.collection+json      \
template:='{
      "data":[{"name":"name", "value":"host"}, 
              {"name":"compute_url", "value":"http://pfcon.remote:30005/api/v1/"}
              {"name":"max_job_exec_seconds", "value":"-1"}, 
              {"name":"compute_user", "value":"pfcon"}, 
              {"name":"compute_password", "value":"pfcon1234"}, 
              {"name":"compute_innetwork", "value": true}]
}' 
Clone this wiki locally