bwVisu

bwVisu Middleware API

General

Submitting a new job - POST to /jobs

{
"uid" : "testuser",
"template-name" : "template_xpra.txt",
"variables" : {
"expected_runtime_in_minutes" : "15",
"number_of_nodes" : "1",
"tasks_per_node" : "1",
"image_name" : "ubuntu_nemo.simg"
}
}

Individual parameters

Execution and return value

{
  'job-id': '<job id as string>'
}

Cancelling a job - DELETE to /jobs/

{'response' : 'job cancelled'}

Querying a job - GET to /jobs/

{
  'job-id' : '1234',
  'batch-script' : {
    'template-name' : 'template_xpra.txt',
    'variables' : {<lots of stuff>}
  },
  'services' : [{
    'internal-port' : '50000'
    'external-port' : '50000'
    'external-ip' : '129.206.9.65'
  }],
  'state' : 'available',
  'uid' : '1005',
  'details' : {<lots of stuff, all details that SLURM knows about this job}
}

Individual fields

List all running jobs - GET to /jobs

{ 'jobs' : [<running jobs>] }

where "running jobs" is a list of the job ids (as string) of all running jobs.

Checking if a user exists on the cluster - GET to /cluster/check-user/

In order to run a a job, it is necessary that a user exists on the cluster. This can be queried (e.g. in order to show an error message as early as possible, or preventing login to bwvisu web entirely if the user doesn't exist) using the request in the title.

{'response' : 'success'}