Skip to content
Snippets Groups Projects
Sanka Samaranayake's avatar
Sanka Samaranayake authored
Change-Id: I45ab1a64043fa635d72f97147d5406457ea6402d
29cd09cc
History
Supported  URL

Scheduler 
  rest/scheduler/login                       
	POST username&password, return sessionid
  rest/scheduler/status
    return the status of the scheduler
  rest/scheduler/jobs   	  
	list job by ids
  rest/scheduler/jobsinfo  
	list jobs by ids+additional data (class : rest_api.UserJobInfo)  

  rest/scheduler/jobs/{jobid}
	job state of job {jobid} (JobState class)
  rest/scheduler/jobs/{jobid}/result
	job result of job {jobid} (JobResult class)

  rest/scheduler/jobs/{jobid}/tasks
	list job's tasks by their names   
  rest/scheduler/jobs/{jobid}/taskstates
  	list of task's states for job {jobid} (TaskState class)
  rest/scheduler/jobs/{jobid}/tasks/{taskname}
  	describes task {taskname} of job {jobid} (TaskState class)
  rest/scheduler/jobs/{jobid}/tasks/{tasksid}/result
  	returns the taskResult of the task {taskname} of the job {id} (TaskResult Class)
  rest/scheduler/jobs/{jobid}/tasks/{taskname}/result/value
  	returns a binary file (mime-type:*/*) contains the value field of the TaskResult class
  rest/scheduler/jobs/{jobid}/tasks/{taskname}/result/log/all
    returns all the logs generated by the task
  rest/scheduler/jobs/{jobid}/tasks/{taskname}/result/log/err
  	returns the err  stream generated by the task
  rest/scheduler/jobs/{jobid}/tasks/{taskname}/result/log/out
  	returns the output stream generated by the task

  rest/scheduler/jobs/{jobid}/priority/byname/{name}
    @PUT change the priority of the job (use the name of the priority)
  rest/scheduler/jobs/{jobid}/priority/byvalue/{value}
    @PUT change the priority of the job (use the value of the priority)
  rest/scheduler/{jobid}/pause
     @PUT pause the job
  rest/scheduler/jobs/{jobid}/resume
     @PUT resume the job
  rest/scheduler/jobs/{jobid}
     @DELETE delete the job
  rest/scheduler/disconnect
     @PUT disconnect from the scheduler (and log off)
  
  rest/scheduler/submit
     @POST submit a XML job descriptor (file must be embedded in the body of the message)
  rest/scheduler/pause
  	 @PUT pause the scheduler
  rest/scheduler/stop
     @PUT stop the scheduler
  rest/scheduler/freeze
     @PUT freeze the scheduler
  rest/scheduler/start
     @PUT start the scheduler
  rest/scheduler/kill
     @PUT start the scheduler 
  rest/scheduler/linkrm 
      @POST form param=rmurl 
      link the scheduler to the Resource Manager available at the url 
  
  
Resource Manager
  rest/rm/login      POST username&password, return session id 
  rest/rm/state 
  rest/rm/monitoring
  rest/rm/node       POST nodeurl (add a node)



some command-line usage :

#### scheduler 

# login 

curl -d "username=demo&password=demo" http://localhost:8080/proactive_grid_cloud_portal/rest/scheduler/login

#submit a job

curl -H "sessionid:1" -F 'file=<Job_2_tasks.xml' http://localhost:8080/proactive_grid_cloud_portal/rest/scheduler/submit


#list jobs (pending, running, finished)
curl -H "sessionid:1" -H "Accept: application/json" http://localhost:8080/proactive_grid_cloud_portal/rest/scheduler/jobs/ 

# list job 10's tasks 

curl -H "sessionid:1" -H "Accept: application/json" http://localhost:8080/proactive_grid_cloud_portal/rest/scheduler/jobs/12/tasks


#delete a job

curl -X DELETE -H "sessionid:1" -H "Accept: application/json" http://localhost:8080/proactive_grid_cloud_portal/rest/scheduler/jobs/10

#result from a task 
curl -H "sessionid:1" -H "Accept: application/json" http://localhost:8080/proactive_grid_cloud_portal/rest/scheduler/jobs/1/tasks/task1/result


  ### Resource Manager

curl -d "username=admin&password=admin" http://localhost:8080/proactive_grid_cloud_portal/rest/rm/login

url -H "sessionid:1" -H "Accept: application/json" http://localhost:8080/proactive_grid_cloud_portal/rest/rm/state

curl -H "sessionid:1" -H "Accept: application/json" http://localhost:8080/proactive_grid_cloud_portal/rest/rm/monitoring