-
Notifications
You must be signed in to change notification settings - Fork 3
API
ben edited this page Nov 8, 2019
·
5 revisions
Submit a CCD job. The JSON schema is as follows:
{
"uid": "<Openshift UID>",
"protocol":
{
"data": "<b64 encoded string of workflow>",
"format": "b64"
},
"config":
{
"ID": "<unique job id>"
},
"data":
{
"endpoints": ["<list of endpoints>"]
}
}
To launch a workflow, then, you could do something like the following:
curl -X POST -H "Content-Type: application/json"
-d @<json_file>.json <chamberlain_url>/api/submit
The <chamberlain_url>
in the above command is automatically created with the redeploy_server.sh
script, so just
populate that field with whatever URL you see in your Openshift dashboard when you create chamberlain.
- Note that the
uid
field can be populated with anything at this point. It is intended to be used for billing in the future, but this hasn't been built out yet on the cluster side. The only thing that is important is that the field exists.
Each endpoint can either represent data stored on Swift or Dataverse, and the syntax for each is as follows:
{
"backend": "swift",
"containerName": "<container>",
"fileName": "<filename>"
}
{
"backend": "dataverse",
"alias": "<dv_alias>",
"doi": "<dataset_doi>",
"fileName": "<filename>"
}
{
"protocol":
{
"data": "Y29sc19pbl9hID0gWwogICAgZGVmQ29sKCdhJywgJ0lOVEVHRVInLCBbMV0pLAogICAgZGVmQ29sKCdiJywgJ0lOVEVHRVInLCBbMV0pLAogICAgZGVmQ29sKCdjJywgJ0lOVEVHRVInLCBbMV0pLApdCmNvbHNfaW5fYiA9IFsKICAgIGRlZkNvbCgnYScsICdJTlRFR0VSJywgWzJdKSwKICAgIGRlZkNvbCgnYicsICdJTlRFR0VSJywgWzJdKSwKICAgIGRlZkNvbCgnYycsICdJTlRFR0VSJywgWzJdKSwKXQoKaW4xID0gY3JlYXRlKCJpbjEiLCBjb2xzX2luX2EsIHsxfSkKaW4yID0gY3JlYXRlKCJpbjIiLCBjb2xzX2luX2IsIHsyfSkKCmNjMSA9IGNvbmNhdChbaW4xLCBpbjJdLCAnY2MxJywgWydhJywgJ2InLCAnYyddKQoKYWdnMSA9IGFnZ3JlZ2F0ZShjYzEsICJhZ2cxIiwgWydhJ10sICJiIiwgInN1bSIsICJiIikKCmNvbGxlY3QoYWdnMSwgMSkKCnJldHVybiB7aW4xLCBpbjJ9",
"format": "b64"
},
"config":
{
"ID": "p-test"
},
"data":
{
"endpoints":
[
{
"backend": "dataverse",
"alias": "tdv",
"doi": "doi:10.7910/DVN/EG4TGL",
"fileName": "in1.tab"
},
{
"backend": "swift",
"containerName": "p-test-two",
"fileName": "in2.csv"
}
]
}
}
Check on the status of a given CCD job.
{
"ID": "<job_id>"
}
Chamberlain will return whether the job is running or completed.
Return the output of a given CCD job.
{
"ID": "<job_id>"
}
The output will be returned as a b64 encoded string.