/{jobs} - GET => List the URIs and perhaps other details of the collection's members. - 200 [OK] : XML representation (send back the uws:jobs element) - 500 [Internal Server Error] : HTML representation - POST => Create a new job in the collection - 201 [Created] Redirect to the newly created /{jobs}/{job-id} resource if succeed : Empty Representation - 500 [Internal Server Error] if failure : HTML representation /{jobs}/{job-id} - GET => Retrieve a representation of the addressed member of the collection. - 200 [OK] : XML representation (send back a uws:JobSummary element of the XSD) - 404 [Not Found] if {job-id} does not exist : HTML representation - 500 [Internal Server Error] if failure : HTML representation - DELETE => Delete the addressed member of the collection. - 204 [No Content] : EmptyRepresentation (on ne redirige pas ok ?) - 404 [Not Found] if {job-id} does not exist : HTML representation - 405 [Not Allowed] if job can not be deleted (ie. !(COMPLETED or ABORTED or ERROR)) : HTML representation - 500 [Internal Server Error] if failure : HTML representation Resources to control a job: /{jobs}/{job-id}/start - PUT => Start the job - 204 [No Content] if succeed : EmptyRepresentation - 404 [Not Found] if {job-id} does not exist : HTML representation - 405 [Not Allowed] if job can not be started (ie. !(PENDING)) : HTML representation - 500 [Internal Server Error] if failure : HTML representation /{jobs}/{job-id}/abort - PUT => Abort the job - 204 [No Content] if succeed : EmptyRepresentation - 404 [Not Found] if {job-id} does not exist : HTML representation - 405 [Not Allowed] if job can not be aborted (ie. !(PENDING ou QUEUED ou EXECUTING)) : HTML representation - 500 [Internal Server Error] if failure : HTML representation Resources to handle job parameters: /{jobs}/{job-id}/parameters - GET => Retrieve a representation of the parameters member of the {job}. - 200 [OK] : XML representation (send back the uws:parameters element) - 404 [Not Found] if {job-id} does not exist : HTML Representation - 500 [Internal Server Error] : HTML representation - POST => create and set some or all parameters of the {job} POST[p1=v1...pn=vn] - 204 [No Content] if succeed : EmptyRepresentation - 404 [Not Found] if {job-id} does not exist : HTML Representation - 400 [Bad Request] if at least one of the POST[px] is not a service parameter : HTML Representation - 405 [Method Not Allowed] if the service does not allow to set parameter using this method OR IF !PENDING : HTML Representation - 500 [Internal Server Error] if failure : HTML Representation - 403 [Forbidden] : Cannot create parameters after a pending phase : EmptyRepresentation ? /{jobs}/{job-id}/parameters/{parameter-name} - GET => Retrieve a representation of the parameters/{parameter-name} member of the {job}. - 200 [OK] : {parameter-name} Representation - 404 [Not Found] if {job-id} or {parameter-name} does not exist : HTML Representation - 500 [Internal Server Error] : HTML reprsentation - PUT => Update the parameter {parameter-name} of the {job} - 204 [No Content] if succeed (case of /parameters/{parameter-name} update): EmptyRepresentation - 403 [Forbidden] : Cannot update a parameter after a pending phase : EmptyRepresentation ? - 404 [Not Found] if {job-id} or {parameter-name} does not exist : HTML representation - 405 [Method Not Allowed] if the service does not allow to set parameter name using this method : HTML representation - 500 [Internal Server Error] if failure : HTML representation - DELETE => Delete a parameter - 204 [No Content] if succeed (case of /parameters/{parameter-name} delete): EmptyRepresentation - 500 [Internal Server Error] if failure : HTML representation Other resources: /{jobs}/{job-id}/destruction - GET => Retrieve a representation of the destruction member of the {job}. - 200 [OK] : StringRepresentation - 404 [Not Found] if {job-id} does not exist : HTML representation - 500 [Internal Server Error] : HTML reprsentation - PUT => set destruction time [must be ISO8601] - 204 [No Content] if succeed : EmptyRepresentation - 404 [Not Found] if {job-id} does not exist : HTML representation - 400 [Bad Request] if format is not ISO8601 : HTML representation - 405 [Method Not Allowed] if the service forbids this change : HTML representation - 500 [Internal Server Error] if failure : HTML representation /{jobs}/{job-id}/executionduration - GET => Retrieve a representation of the executionduration member of the {job}. - 200 [OK] : StringRepresentation - 404 [Not Found] if {job-id} does not exist : HTML representation - 500 [Internal Server Error] : HTML reprsentation - PUT => set execution duration time [must be integer in second] - 204 [No Content] if succeed : EmptyRepresentation - 404 [Not Found] if {job-id} does not exist : HTML representation - 400 [Bad Request] if is not an integer : HTML representation - 405 [Method Not Allowed] if the service forbids this change : HTML representation - 500 [Internal Server Error] if failure : HTML representation /{jobs}/{job-id}/owner - GET => Retrieve a representation of the owner member of the {job}. - 200 [OK] : StringRepresentation - 404 [Not Found] if {job-id} does not exist : HTML representation - 500 [Internal Server Error] : HTML reprsentation /{jobs}/{job-id}/quote - GET => Retrieve a representation of the quote member of the {job-id}. - 200 [OK] : StringRepresentation - 404 [Not Found] if {job-id} does not exist : HTML representation - 500 [Internal Server Error] : HTML reprsentation /{jobs}/{job-id}/phase - GET => Retrieve a representation of the phase member of the {job-id}. - 200 [OK] : StringRepresentation - 404 [Not Found] if {job-id} does not exist : HTML representation - 500 [Internal Server Error] : HTML reprsentation /{jobs}/{job-id}/results - GET => Retrieve a representation of the results member of the {job-id}. - 200 [OK] : XMLRepresentation (uws:Results) - 404 [Not Found] if {job-id} does not exist : HTML representation - 500 [Internal Server Error] : HTML reprsentation /{jobs}/{job-id}/error - GET => Retrieve a representation of the error member of the {job-id}. - 200 [OK] : StringRepresentation - 404 [Not Found] if {job-id} does not exist : HTML representation - 500 [Internal Server Error] : HTML reprsentation Phases definitions : - ABORTED : The job has been aborted by the USER (data producted by the job stay available). - ERROR : Error occurs during execution - SUSPENDED : The job has been suspended by the SYSTEM (for any reasons). It will be automaticly restarted. - HELD : TO BE REMOVE Default: - If the method called by the client is not handled by the server, server must answer 405 [Method Not Allowed] : HTML representation Pagination: We propose to include a pagination mechanism to limit the number of jobs when the job list is requested. /{jobs}?start=&extend= Using this mechanism, user have to known the amount of job in the job list. User can retreive this information using the HTTP HEAD method on /{jobs} resource. It will be added as metadata in the header of the response. For example : header('JobAmount: N') By default HTTP GET on /{jobs} return the first page. Questions ? - gestion de la securite Je crois que c'est du SSL. Ce sont les même ressources sauf qu'il faut filter la sortie des ressources selon les credentials - comment indiquer la methode a utiliser pour definir les parametres ? si user fait POST lui dire de faire PUT /param-name et vice versa Pour chaque erreur retournée par les resources, on devrait avoir une statusPage particulière. Dans cette statusPage, on loggue le code d'erreur et le message ainsi que un lien qui pointera sur la description de l'API CURL : curl -v -F "img=@put.txt" -F "p1=v1" http://voparis-uws.obspm.fr/uws2/{job}/{job-id}/parameters curl -v -T put.txt -X PUT http://voparis-uws.obspm.fr/uws2/{job}/{job-id}/parameters/{parameter-name}