Web Service:PR-WS-5: Difference between revisions
From IHRIS Wiki
No edit summary |
No edit summary |
||
(9 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
|number=PR-WS-5 | |number=PR-WS-5 | ||
|description=Add Provider Details | |description=Add Provider Details | ||
|applications=Interoperability Layer, Point-Of-Care | |applications=Interoperability Layer, Point-Of-Care, iHRIS | ||
|url=/ws/rest/v2/ | |url=/ws/rest/v2/add/provider | ||
|params=The following webservice should accept the following parameters: | |params=The following webservice should accept the following parameters: | ||
*${firstname} The first name of the provider. Required. | *${firstname} The first name of the provider. Required. | ||
Line 13: | Line 13: | ||
*${csr} The CSR number. Optional. | *${csr} The CSR number. Optional. | ||
*${respformat} Describes response format. Optional. Default is 'http', can also be 'json.' | *${respformat} Describes response format. Optional. Default is 'http', can also be 'json.' | ||
|example=? | |example=?firstname=Bill&surname=Smith&nationality=RW&nid=12312342 | ||
|response=HTTP 200 - OK | |response=HTTP 200 - OK | ||
*If ${repsformat} is 'http' the HTTP response body will contain the epid as plain text. | *If ${repsformat} is 'http' the HTTP response body will contain the epid as plain text of the newly created provider. | ||
*If ${respformat} is 'json' it will contain a JSON object with the | *If ${respformat} is 'json' it will contain a JSON object with the field 'epid' of the newly created provider as well as the URLs to access for further web-service actions to perform on the provider. | ||
{ | { | ||
epid: 211312, | |||
actions: { | |||
providerDetails: 'http://rhea-pr.ihris.org/webservices/details/provider?epid=211312', | |||
editProvider: 'http://rhea-pr.ihris.org/webservices/edit/provider?epid=211312', | |||
addPost: 'http://rhea-pr.ihris.org/webservices/add/post?epid=211312', | |||
queryPosts: 'http://rhea-pr.ihris.org/webservices/details/post?id=211312', | |||
viewProvider: 'http://rhea-pr.ihris.org/providerregistry/view?id=person|23123' | |||
} | |||
} | } | ||
|error=*HTTP 500 - Server Error - If the server encountered an error. | |error=*HTTP 500 - Server Error - If the server encountered an error. |
Latest revision as of 06:48, 31 October 2012
Web Service: PR-WS-5 Add a Provider
Add Provider Details
URL | /ws/rest/v2/add/provider |
GET Parameters | The following webservice should accept the following parameters:
|
GET Response | HTTP 200 - OK
{ epid: 211312, actions: { providerDetails: 'http://rhea-pr.ihris.org/webservices/details/provider?epid=211312', editProvider: 'http://rhea-pr.ihris.org/webservices/edit/provider?epid=211312', addPost: 'http://rhea-pr.ihris.org/webservices/add/post?epid=211312', queryPosts: 'http://rhea-pr.ihris.org/webservices/details/post?id=211312', viewProvider: 'http://rhea-pr.ihris.org/providerregistry/view?id=person%7C23123' }} |
GET Error |
|
GET Example | /ws/rest/v2/add/provider/?firstname=Bill&surname=Smith&nationality=RW&nid=12312342 |
Other Resources: Use Case:PR-WS-5