Web Service:PR-WS-4: Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
Line 6: Line 6:
  |params=This contains the following parameters to identify the provider whose details we shall return:
  |params=This contains the following parameters to identify the provider whose details we shall return:
${epid} The provider's EPID
${epid} The provider's EPID
*${format}The response format.  One of 'hl7' or 'json'  
*${format}The response format.  One of 'hl7' or 'json'
*${size} The maximum number number of EPIDs to return.  Defaults to 50.
*${start} The starting offset for listing EPIDs.  Defaults to 10.
  |response=*HTTP 200 - OK
  |response=*HTTP 200 - OK
*If the format='hl7' .....
*If the format='hl7' .....
*If the format='json' we return an array of associative arrays.  The associative arrays have keys for the post attribtues.  For example:
*If the format='json' we return an array of associative arrays.  The associative arrays have keys for the post attribtues.  For example:
{  
{  
   98798798 : {
   "total_size" : 2,
    actions: {
  "start": 0,
        'editPost': http://rhea-pr.ihris.org/webservices/editPost?id=98798798',
  providers: {
        'postDetails: http://rhea-pr.ihris.org/webservices/postDetails?id=98798798'
    98798798 : {
    }
      actions: {
  },
          'editPost': http://rhea-pr.ihris.org/webservices/editPost?id=98798798',
  9878799 : {
          'postDetails: http://rhea-pr.ihris.org/webservices/postDetails?id=98798798'
      actions: {
      }
        'editPost': http://rhea-pr.ihris.org/webservices/editPost?id=98798799',
    },
        'postDetails: http://rhea-pr.ihris.org/webservices/postDetails?id=98798799'
    9878799 : {
    }
        actions: {
  }
          'editPost': http://rhea-pr.ihris.org/webservices/editPost?id=98798799',
          'postDetails: http://rhea-pr.ihris.org/webservices/postDetails?id=98798799'
      }
    }
  }
}
}
  |error=*HTTP 500 - Server Error - If the server encountered an error.
  |error=*HTTP 500 - Server Error - If the server encountered an error.

Revision as of 19:03, 30 October 2012

Web Service: PR-WS-4 Get Provider Posting Detail


Fetches details of a provider's postings by their EPID.

URL /ws/rest/v2/providerPosts
GET Parameters This contains the following parameters to identify the provider whose details we shall return:

${epid} The provider's EPID

  • ${format}The response format. One of 'hl7' or 'json'
  • ${size} The maximum number number of EPIDs to return. Defaults to 50.
  • ${start} The starting offset for listing EPIDs. Defaults to 10.
GET Response
  • HTTP 200 - OK
  • If the format='hl7' .....
  • If the format='json' we return an array of associative arrays. The associative arrays have keys for the post attribtues. For example:

{

 "total_size" : 2,
 "start": 0,
 providers: {
   98798798 : {
      actions: {
          'editPost': http://rhea-pr.ihris.org/webservices/editPost?id=98798798',
          'postDetails: http://rhea-pr.ihris.org/webservices/postDetails?id=98798798'
      }
   },
   9878799 : {
       actions: {
          'editPost': http://rhea-pr.ihris.org/webservices/editPost?id=98798799',
          'postDetails: http://rhea-pr.ihris.org/webservices/postDetails?id=98798799'
      }
   }
  }
}
GET Error
  • HTTP 500 - Server Error - If the server encountered an error.
  • HTTP 400 - Bad Request - If the parameters are malformed.

Other Resources: Use Case:PR-WS-4