Clinia
RegistryResources

Create a resource in the registry

POST
/sources/{sourceKey}/v1/resources/{resourceType}

Create a resource in the registry.

headerX-Clinia-API-Key<token>
sourceKey*string

The key of the source.

resourceType*string

Type of the resource. Key of the profile.

application/json
  1. body
id?string

Id of the resource (optional). When not provided or equal to the special @rootId token, the id will be generated. When provided and not equal to @rootId, id must follow pattern: ^[a-zA-Z0-9-][\w-]{1,92}$. Note:

  • @rootId token can be used in any properties of type reference and, when provided, will be replaced by the actual id of the created resource.
data*

Dynamic data attributes, based on the resource type.

meta?
contained?

Resources contained in this top-level resource. Contained resources exists only within the context of this top-level resource.

Response Body

A successful response when the resource was created.

application/json
  1. response

Response when a task has been executed synchronously and the results are immediately persisted.

taskId*v1TaskId

The task identifier. Used to track an async task in the system. Use the task ID to poll for completion status. The taskId holds different prefix to represent different tasks.

  • oneOf task: s_<id>.
  • bulk task: bk_<id> (deprecated: <id> only).
  • bundle task: bd_<id> (deprecated: <id> only).
  • purge task: pg_<id> (deprecated: purge:<id>).
status*v1TaskSubmissionStatus

Status of the task submission.

  • ACCEPTED: The task has been accepted for asynchronous processing. The task will be executed in the background.
  • PERSISTED: The task has been executed synchronously and the results are immediately persisted.
Value in"ACCEPTED""PERSISTED"
resource*
Example Request
curl -X POST 'https://api..clinia.cloud/sources/string/v1/resources/string' \  -H 'Content-Type: application/json' \  -d '{  "data": {}}'
Example Response
{  "taskId": "string",  "status": "ACCEPTED",  "resource": {    "id": "string",    "type": "string",    "meta": {      "createdAt": "2019-08-24T14:15:22Z",      "identifier": [        {          "id": "string",          "system": "string",          "value": "string",          "use": "string",          "period": {            "id": "string",            "start": "string",            "end": "string"          }        }      ],      "source": "string",      "updatedAt": "2019-08-24T14:15:22Z"    },    "data": {},    "contained": {      "property1": [        {          "id": "string",          "type": "string",          "meta": {            "createdAt": "2019-08-24T14:15:22Z",            "identifier": [              {                "id": "string",                "system": "string",                "value": "string",                "use": "string",                "period": {                  "id": "string",                  "start": "string",                  "end": "string"                }              }            ],            "source": "string",            "updatedAt": "2019-08-24T14:15:22Z"          },          "data": {}        }      ],      "property2": [        {          "id": "string",          "type": "string",          "meta": {            "createdAt": "2019-08-24T14:15:22Z",            "identifier": [              {                "id": "string",                "system": "string",                "value": "string",                "use": "string",                "period": {                  "id": "string",                  "start": "string",                  "end": "string"                }              }            ],            "source": "string",            "updatedAt": "2019-08-24T14:15:22Z"          },          "data": {}        }      ]    }  }}