Download presentation
Presentation is loading. Please wait.
Published byAdrian Norman Modified over 9 years ago
1
GET Examples –http://seek.sysmo- db.org/sops/3/experimental_conditions/55http://seek.sysmo- db.org/sops/3/experimental_conditions/55 –http://www.pathwaycommons.org/pc/webservi ce.do?cmd=get_pathways&version=2.0&q=O 14763&input_id_type=UNIPROT
2
Configuring GET Signature Content Type / (Accepts header) –application/xml –application/json –text/csv
3
Signatures http://seek.sysmo- db.org/sops/{sop_id}/experimental_conditi ons/{exp_cond_id}http://seek.sysmo- db.org/sops/{sop_id}/experimental_conditi ons/{exp_cond_id} http://www.pathwaycommons.org/pc/webs ervice.do?cmd=get_pathways&version={v ersion}&q={q}&input_id_type={type}
4
Created Service Get_Exp_Conditions_For_SOP sop_id exp_cond_id bodystatus Redirection
5
Outputs Body –The http response from the service, according to the content type Status –The HTTP status code 200 – OK 301,302,303 – redirects (more to come on this) 401 – Unauthorised 404 – Not found 500 – Server Error Redirection –URI of last redirection
6
Handling outputs XML response –Handle with XPath Enhance xpath support Embed within Rest processor?? –PRO: Avoids splitter problem –CON: Better xpath support may be useful regardless of rest JSON –Handle with JSON path –Not sure if this is needed
7
Redirection Redirection may occur due to linked data compliance, or because the resource has moved. 301 – Moved permentantly 302 – Found 303 – See other (linked data) 304,305,306,307 (see spec) Body response is that of the final redirection ?? Status is of the final redirection ??
8
PUT/POST PUT – Update a resource POST – Create a resource Can’t always rely on this being true
9
Configuring PUT Signature –http://seek.sysmo- db.org/sops/{sop_id}/experimental_conditions/ {exp_cond_id}http://seek.sysmo- db.org/sops/{sop_id}/experimental_conditions/ {exp_cond_id} –Content type application/xml application/json text/csv
10
2 ways of updating With parameters –http://seek.sysmo- db.org/sops/{sop_id}/experimental_conditions/{exp_c ond_id}?measured_item={item}&value={value}http://seek.sysmo- db.org/sops/{sop_id}/experimental_conditions/{exp_c ond_id}?measured_item={item}&value={value} With request body PH 8.7
11
Created Service Update_Exp_Conditions_For_SOP body sop_idexp_cond_id bodystatus redirection
12
Configuring POST Signature pretty much the same –http://seek.sysmo- db.org/sops/{sop_id}/experimental_conditions/http://seek.sysmo- db.org/sops/{sop_id}/experimental_conditions/ Once again content type –Application/xml –etc
13
Once again, 2 ways of creating With parameters –http://seek.sysmo- db.org/sops/{sop_id}/experimental_conditions/?meas ured_item={item}&value={value}http://seek.sysmo- db.org/sops/{sop_id}/experimental_conditions/?meas ured_item={item}&value={value} With request body PH 8.7
14
Redirection of POST Redirection is most important for POST as it provides the identifier for the new resource. –E.g after creation may get redirected to http://seek.sysmo- db.org/{sop_id}/experimental_conditions/{new_exp_c ondition_id} http://seek.sysmo- db.org/{sop_id}/experimental_conditions/{new_exp_c ondition_id} Can’t always rely on it – need to know the service –Sometime there is not redirection and just the content type of the new resource is returned in the response body
15
DELETE Deletes the resource based upon identifier Tends to redirect back to the list of resources of that type. Just needs the signature to configure
16
Questions to users What to call the body inputs/outputs –Body, response, request_body,response_body Should we make the body inputs/ouputs configurable for POST/PUT Should redirection stuff be hidden from the user, and optionally visible? Built in XPATH support, or separate? Tools to help provide XML body inputs for PUT/POST –Beanshells & templates.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.