Create or replace reference for data domain entries

post/domains/{domainId}/contents/{contentId}/entries
Internal-Use Only

If the containing domain content has the status of "production", the creation or replacement of entries is not allowed. There are two media types that can be used with the Content-Type header of the request. The first one is application/vnd.sas.collection. The second one is text/csv. text/csv follows the RFC 4180 format.

The same media types can also be used with the Accept header of the request. However, the Content-Type and Accept combination of application/vnd.sas.collection and text/csv is not valid. When the Accept media type is application/vnd.sas.collection, the first page of the sorted entries, by ascending keys, is returned. When the Accept media type is text/csv, all the entries sorted in ascending keys are returned.

Request Samples

1

Response Samples

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": "1"
11 },
12 {
13 "key": "B",
14 "value": "2"
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": 2
68}

Path Parameters

NameTypeRequiredDescription
contentId
string
true

The identifier of a reference data domain content.

domainId
string
true

The identifier of a reference data domain.

Header Parameters

NameTypeRequiredDescription
Accept
string
false

Choose the representation of the returned entries.

Allowed values:
application/vnd.sas.collection+jsontext/csv
Default:
application/vnd.sas.collection+json
If-Match
string
false

The ETag value that was returned from a GET, POST, or PATCH of the domain entry collection. This is not required when creating domain entries but required when replacing domain entries. If the etag is required but the value does not match the ETag value of the resource, the replacement of domain entries fails.

Request Body

The collection holding the entries.

The data stored within a domain content.

NameTypeRequiredDescription
key
string
false

key

value
string
false

value

Responses

StatusMeaningDescription
200OKThe entries were replaced.HeadersSchema
201CreatedThe entries were created.HeadersSchema
400Bad RequestThe request was invalid.Schema
404Not FoundNo resource exists at the requested path. Resource is not found.Schema