Update the reference data entries
Updates the domain entries by using an array of add, replace, or delete JSON Patch operations. See https://tools.ietf.org/html/rfc6902 for more information about the JSON Patch.
First, a JSON document of a certain format is used to represent the entries. These operations are then applied to that document. The resulting document represents what future entries should look like. The specification of the operations is relative to this document format.
Each JSON Patch operation contains an op
, a path
, and an optional value
member. The operation member names op
, path
, and value
are to be in lowercase only. The op
values that can be used are "add", "replace", and "remove". They are in lowercase.
The path
has the form /entry-key or /entry-key/field-name-of-the-entry-representation-object. Each tilde that appears in the entry-key must be escaped as ~0. Each forward slash character that appears in the entry-key must be escaped as ~1.
The value
member is required for add and replace. To add an entry, the path member provides the value of the key and the value member provides values for the other fields of the representation object of the entry. The replace operation provides a new value for any non-key field of the representation object. The remove operation deletes an entry based on the key.
One or more fields can be changed. The key of the entry cannot be changed. If the containing domain content has the status of "production", the entries cannot be changed. The first page of the sorted entries, by ascending key, is returned.
1{2 "name": "entries",3 "accept": "application/vnd.sas.data.reference.domain.entry",4 "start": 0,5 "count": 2,6 "limit": 10,7 "items": [8 {9 "key": "A",10 "value": "Urgent"11 },12 {13 "key": "B",14 "value": "Critical"15 }16 ],17 "links": [18 {19 "method": "GET",20 "rel": "collection",21 "href": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/390be3d6-4320-4cb9-9365-17421a374bee/entries",22 "uri": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/390be3d6-4320-4cb9-9365-17421a374bee/entries",23 "type": "application/vnd.sas.collection",24 "itemType": "application/vnd.sas.data.reference.domain.entry"25 },26 {27 "method": "GET",28 "rel": "self",29 "href": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/390be3d6-4320-4cb9-9365-17421a374bee/entries?start=0&limit=10",30 "uri": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/390be3d6-4320-4cb9-9365-17421a374bee/entries?start=0&limit=10",31 "type": "application/vnd.sas.collection",32 "itemType": "application/vnd.sas.data.reference.domain.entry"33 },34 {35 "method": "GET",36 "rel": "up",37 "href": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/390be3d6-4320-4cb9-9365-17421a374bee/",38 "uri": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/390be3d6-4320-4cb9-9365-17421a374bee/",39 "type": "application/vnd.sas.data.reference.domain.content"40 },41 {42 "method": "POST",43 "rel": "replaceEntries",44 "href": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/390be3d6-4320-4cb9-9365-17421a374bee/entries",45 "uri": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/390be3d6-4320-4cb9-9365-17421a374bee/entries",46 "type": "application/vnd.sas.collection",47 "responseType": "application/vnd.sas.collection",48 "itemType": "application/vnd.sas.data.reference.domain.entry",49 "responseItemType": "application/vnd.sas.data.reference.domain.entry"50 },51 {52 "method": "DELETE",53 "rel": "deleteEntries",54 "href": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/390be3d6-4320-4cb9-9365-17421a374bee/entries",55 "uri": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/390be3d6-4320-4cb9-9365-17421a374bee/entries"56 },57 {58 "method": "PATCH",59 "rel": "patchEntries",60 "href": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/390be3d6-4320-4cb9-9365-17421a374bee/entries",61 "uri": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/390be3d6-4320-4cb9-9365-17421a374bee/entries",62 "type": "application/json-patch",63 "responseType": "application/vnd.sas.collection",64 "responseItemType": "application/vnd.sas.data.reference.domain.entry"65 }66 ],67 "version": 268}
Name | Type | Required | Description |
---|---|---|---|
contentId | string | true | The identifier of a reference data domain content. |
domainId | string | true | The identifier of a reference data domain. |
Name | Type | Required | Description |
---|---|---|---|
If-Match | string | false | The ETag value that was returned from a GET, POST, or PATCH of the domain entry collection. If the ETag value does not match the etag value of the resource, the update fails. |
A JSON document of the JSON Patch operations.
The properties of a domain entry patch operation.
Name | Type | Required | Description |
---|---|---|---|
op | string | true | The operation that was performed. |
path | string | true | The path identifying the object or a member of an object. |
value | string | false | A string value or a JSON string representation of an object or array. |
Status | Meaning | Description | ||
---|---|---|---|---|
200 | OK | The entries are successfully patched. | Headers | Schema |
400 | Bad Request | The request was invalid. | Schema | |
404 | Not Found | No resource exists at the requested path. | Schema | |
412 | Precondition Failed | The ETag value used in the If-Match header did not match the resource's last modified timestamp. The resource has changed. | Schema | |
422 | Unprocessable Entity | A request in the patch document asks for an invalid operation. | Schema | |
428 | Precondition Required | The `If-Match` request header did not match the resource's entity tag. | Schema |