Create CONTRIBUTION
We will use the relaxed CONTRIBUTION with the following optional attributes:
uid: when provided, it will be accepted in case is not in-use, otherwise error will be returnedaudit.time_committed: server will always set itaudit.system_id: when provided, it will be validated
- Type: stringPrefer
RFC 7240 preference header. Multiple tokens may be sent in a single header as a comma-separated list (e.g.
Prefer: return=representation, include_item_tags) or as repeated headers. Cadasto recognises the following tokens:Token Where it applies Effect return=representationwrite endpoints Return the full updated resource in the response body. return=identifierwrite endpoints Return only the resource identifier (e.g. the uid).return=minimal(default on writes)write endpoints Empty response body. include_item_tags(Cadasto extension)read endpoints, and write endpoints when the request does not already carry an openehr-item-tagheaderEmit the openehr-item-tagresponse header with the current tags. On writes that shipopenehr-item-tagin the request, the token is implied — the response always echoes the tags. Omitted by default on reads. See the ITEM_TAG guide for details.The
Preference-Appliedresponse header echoes the tokens the server actually honoured (return=, plusinclude_item_tags/resolve_refswhen applied).
The CONTRIBUTION.
A new (un-committed) CONTRIBUTION resource for Demographic
- Type: object ·auditrequired
The set of attributes required to document the committal of an information item to a repository. Used by the server to create an AUDIT_DETAILS object.
- Type: array object[] ·versionsrequired
- Type: object ·uid
- application/json
- application/json
- 409
409 Conflictis returned when a resource with same identifier(s) already exists.
curl https://cataniamc.prod.cadasto.com/v1/demographic/contribution \
--request POST \
--header 'Content-Type: application/json' \
--data '{
"uid": {
"_type": "HIER_OBJECT_ID",
"value": ""
},
"versions": [
{
"preceding_version_uid": {
"_type": "OBJECT_VERSION_ID",
"value": ""
},
"signature": "",
"lifecycle_state": {
"terminology_id": "",
"terminology_version": "",
"code_string": "",
"uri": ""
},
"attestations": [
{
"_type": "UPDATE_ATTESTATION",
"change_type": {
"terminology_id": "",
"terminology_version": "",
"code_string": "",
"uri": ""
},
"description": {},
"committer": {},
"attested_view": {
"_type": "DV_MULTIMEDIA",
"charset": {
"terminology_id": {
"_type": "TERMINOLOGY_ID",
"value": ""
},
"code_string": "",
"preferred_term": ""
},
"language": {
"terminology_id": {
"_type": "TERMINOLOGY_ID",
"value": ""
},
"code_string": "",
"preferred_term": ""
},
"alternate_text": "",
"uri": {},
"data": "",
"media_type": {
"terminology_id": {
"_type": "TERMINOLOGY_ID",
"value": ""
},
"code_string": "",
"preferred_term": ""
},
"compression_algorithm": {
"terminology_id": {
"_type": "TERMINOLOGY_ID",
"value": ""
},
"code_string": "",
"preferred_term": ""
},
"integrity_check": "",
"integrity_check_algorithm": {
"terminology_id": {
"_type": "TERMINOLOGY_ID",
"value": ""
},
"code_string": "",
"preferred_term": ""
},
"thumbnail": {},
"size": 1
},
"proof": "",
"items": [
{
"_type": "DV_EHR_URI",
"value": ""
}
],
"reason": {},
"is_pending": true
}
],
"data": {},
"commit_audit": {
"_type": "UPDATE_AUDIT",
"change_type": {
"terminology_id": "",
"terminology_version": "",
"code_string": "",
"uri": ""
},
"description": {},
"committer": {}
}
}
],
"audit": {
"_type": "UPDATE_AUDIT",
"change_type": {
"terminology_id": "",
"terminology_version": "",
"code_string": "",
"uri": ""
},
"description": {},
"committer": {}
}
}'
{
"uid": {
"value": "0826851c-c4c2-4d61-92b9-410fb8275ff0"
},
"versions": [
{
"id": {
"_type": "OBJECT_VERSION_ID",
"value": "fb458d9c-1323-42bc-b7f8-787f3660a0b5::cataniamc.prod.cadasto.com::1"
},
"namespace": "local",
"type": "COMPOSITION"
},
{
"id": {
"_type": "OBJECT_VERSION_ID",
"value": "abcdefgh-1323-42bc-b7f8-787f3660a0ba::cataniamc.prod.cadasto.com::1"
},
"namespace": "local",
"type": "FOLDER"
}
],
"audit": {
"system_id": "9624982A-9F42-41A5-9318-AE13D5F5031F",
"committer": {
"_type": "PARTY_IDENTIFIED",
"name": "A user name"
},
"time_committed": {
"value": "2017-08-15T10:37:15.422+02:00"
},
"change_type": {
"value": "creation",
"defining_code": {
"terminology_id": {
"value": "openehr"
},
"code_string": "249"
}
},
"description": {
"value": "Description text"
}
}
}