0.0.1 - CI Build

SequoiaProjectHealthcareDirectoryImplementationGuideSTU3 - Local Development build (v0.0.1). See the Directory of published versions

Create Operation

Previous Page - Primary API - CRUD Operations


Potentially create new Organization resource/s in the directory. This function can be used in two modes of operation, to either create a single Organization, or a FHIR bundle containing multiple Organization resources.

Short Example

Request: Request URL: post <base url>/Organization Params:

  • apikey: ApiKey to check permission of create operation.
  • format: xml must be ‘xml’ for this release of the directory software

Body: One Organization resource or bundle of one or more Organization resources.

Internal Ruby Source Code Function: createOrganization(orgs, neworg)

Success Response: HTTP status code: 200 Body:

Operation Outcome Create Success Example

Error Response: HTTP status code: 403 Body:

Operation Outcome Create Error Example

Full Example

curl -i -X POST -H ‘Content-Type:application/xml’ ‘http://localhost:80/fhir-stu3/1.0.1/Organization?apikey=testkey&_format=xml’ -d ‘<Organization/>’

Where the content of <Oranization/> is as follows:

Create Full Example

A successful response should be generated by the server as shown below (with HTTP headers): HTTP/1.1 200 OK Content-Type: application/xml; charset=utf-8 Access-Control-Allow-Origin: * X-Custom-Value: Copyright(c) 2016-18 The Sequoia Project. All rights reserved. Business confidential. X-Powered-By: The Sequoia Project Healthcare Directory Server Server: Undisclosed Cache-Control: public, must-revalidate, max-age=3600 Expires: 2018-08-20 17:16:24 -0500 ETag: “3782fe20-86ec-0136-bd24-5481d7f50949” X-Content-Type-Options: nosniff Content-Length: 721

Operation Outcome Create Success Example 2

Next Page - Read Operation