Update reference data domain or value list content

put/domains/{domainId}/contents/{contentId}
Internal-Use Only

Updates the content of a domain or value. The label of the content can always be changed. The status of a production version cannot be changed back to "candidate" or "developing". The majorNumber and minorNumber cannot be changed. If the status is to be changed to "production", the domain content must have one or more entries. Otherwise, you get an error.

When the status of the content is changed to production, the entries in the version are published to two location types. The first type is all the Micro Analytic Score service publish destinations defined in the deployment. The second type is all the Cloud Analytic Services servers available to the deployment. To each Micro Analytic Score destination, a public module containing a DS2 package is published. The package is named using the packageName field of the domain. In the package, the domain content is shown as a hash table. The find method of the package can be used to search the hash table to look up a value in the domain content using a key. On each Cloud Analytic Services server, a format is created in a global formats library to realize the domain content. The name for the format is the formatName field of the domain. If publishing the entries to either location fails, the status of the domain version is not changed to "production".

The asynchronous parameter changes only the behavior of the endpoint when the status of a domain content is to be changed to production. In that scenario, the content status change becomes a two-stage process. The first stage is to change the status to activating while the publish to the various destinations are initiated. After the publish initiation, the endpoint changes the activationStatus of the content to running and then returns. The second stage of changing the status of the domain content to production is achieved when the statuses of the publishes are obtained and resolved to total success. When you issue a GET operation on the domain content or the contents collection of the domain, if all the publishes have finished, the status for the content shows "production", if all publishes have finished successfully. The content status remains in "activating" and the activationStatus showing "failed" if at least one publish failed. If a publish is still running, the activationStatus continues to show "running".

The currentContents endpoint does not show the content as production until the result of the asynchronous publish is known and all publishes are successful.

Note that publish to Micro Analytic Score service destinations can be disabled via SAS Environment Manager. This can be accomplished by enabling property "lookupDisableMasPublish" under category "sas.referencedata.publish". If "lookupDisableMasPublish" is enabled, then "lookupStaticBinding" under category "sas.businessrules" should also be enabled.

Request Samples

1

Response Samples

1{
2 "creationTimeStamp": "2022-02-25T13:46:07.457Z",
3 "modifiedTimeStamp": "2022-02-25T13:46:07.466Z",
4 "createdBy": "siduser",
5 "modifiedBy": "siduser",
6 "id": "0b242ce4-59dc-4c62-87b6-863ee756531e",
7 "label": "lookup1.0",
8 "status": "developing",
9 "standing": "future",
10 "majorNumber": 1,
11 "minorNumber": 2,
12 "links": [
13 {
14 "method": "GET",
15 "rel": "up",
16 "href": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents",
17 "uri": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents",
18 "type": "application/vnd.sas.collection",
19 "itemType": "application/vnd.sas.data.reference.domain.content"
20 },
21 {
22 "method": "GET",
23 "rel": "self",
24 "href": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/0b242ce4-59dc-4c62-87b6-863ee756531e",
25 "uri": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/0b242ce4-59dc-4c62-87b6-863ee756531e",
26 "type": "application/vnd.sas.data.reference.domain.content"
27 },
28 {
29 "method": "GET",
30 "rel": "getEntries",
31 "href": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/0b242ce4-59dc-4c62-87b6-863ee756531e/entries",
32 "uri": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/0b242ce4-59dc-4c62-87b6-863ee756531e/entries",
33 "type": "application/vnd.sas.collection",
34 "itemType": "application/vnd.sas.data.reference.domain.entry"
35 },
36 {
37 "method": "POST",
38 "rel": "createEntries",
39 "href": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/0b242ce4-59dc-4c62-87b6-863ee756531e/entries",
40 "uri": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/0b242ce4-59dc-4c62-87b6-863ee756531e/entries",
41 "type": "application/vnd.sas.collection",
42 "responseType": "application/vnd.sas.collection",
43 "itemType": "application/vnd.sas.data.reference.domain.entry",
44 "responseItemType": "application/vnd.sas.data.reference.domain.entry"
45 },
46 {
47 "method": "DELETE",
48 "rel": "deleteEntries",
49 "href": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/0b242ce4-59dc-4c62-87b6-863ee756531e/entries",
50 "uri": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/0b242ce4-59dc-4c62-87b6-863ee756531e/entries"
51 },
52 {
53 "method": "POST",
54 "rel": "checkOut",
55 "href": "/jobExecution/jobs",
56 "uri": "/jobExecution/jobs"
57 },
58 {
59 "method": "GET",
60 "rel": "checkouts",
61 "href": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/0b242ce4-59dc-4c62-87b6-863ee756531e/checkouts",
62 "uri": "/referenceData/domains/f8600b44-092c-4095-a560-f4d2b90f1148/contents/0b242ce4-59dc-4c62-87b6-863ee756531e/checkouts",
63 "type": "application/vnd.sas.collection",
64 "itemType": "application/vnd.sas.summary"
65 }
66 ]
67}

Path Parameters

NameTypeRequiredDescription
contentId
string
true

The identifier of a reference data domain or value list content.

domainId
string
true

The identifier of a reference data domain or value list.

Query Parameters

NameTypeRequiredDescription
asynchronous
boolean
false

Indicate whether the domain production publish is asynchronous or synchronous. If true, the production publish is asynchronous. The default is false.

Header Parameters

NameTypeRequiredDescription
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.

Request Body

The content representation. Use only the label and status member.

The properties of a domain content.

NameTypeRequiredDescription
label
string
false

A text string appropriate for this instance of the domain.

majorNumber
integer
false

The major version number.

minorNumber
integer
false

The minor version number.

status
string
false

The status of this instance of the domain. The choices are "developing", "candidate", "activating" and "production". However, "activating" is only a system assignable value.

standing
string
false

The system assigned value for this instance of the domain. The system assigned values are "inactive", "legacy", "current", or "future". This value compares one instance to another.

activationStatus
string
false

Indicates whether the domain content is being activated, is activated, or has failed to be activated.

activationError
string
false

When this field is present, the content has failed to be activated to one or more destination. This field carries error message for each of the failed destination.

keyLabel
string
false

The labels to be applied to the keys.

valueLabel
string
false

The labels to be applied to the values.

Responses

StatusMeaningDescription
200OKThe request succeeded.HeadersSchema
202AcceptedThe request is accepted.HeadersSchema
400Bad RequestThe request was invalid.Schema
404Not FoundNo domain or value list content exists at the requested path. Resource is not found.Schema
412Precondition FailedThe ETag value used in the If-Match header did not match the resource's last modified timestamp. The resource has changed.Schema
428Precondition RequiredThe `If-Match` request header did not match the resource's entity tag.Schema