Update or create references

post/references
Internal-Use Only

Updates or creates references. When the ID is provided for a reference in the collection, the operation performs a full replacement of the reference. If no ID is provided, and the resource URI is not unique in the system, the reference is not updated (the default). The parameter ?onConflict=update can be used to update existing references with a matching resource URI. The ID field can not be updated during this operation. If the reference does not exist, one is created. The response will be a collection of application/vnd.sas.relationship.reference resources. If a reference creation or update fails, the collection will include an application/vnd.sas.error object that describes why the reference failed. The specific media type of application/vnd.sas.collection+json is required for this endpoint to prevent ambiguity with other POST operations to this collection.

Request Samples

1

Response Samples

1{
2 "version": 2,
3 "accept": "application/vnd.sas.relationship.reference application/vnd.sas.error",
4 "count": 2,
5 "start": 0,
6 "limit": 2,
7 "name": "items",
8 "items": [
9 {
10 "version": 2,
11 "httpStatusCode": 409,
12 "errorCode": 10603,
13 "message": "Conflict",
14 "details": [
15 "A reference already exists for the resource URI \"/reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd\"."
16 ]
17 },
18 {
19 "creationTimeStamp": "2022-11-23T16:58:18.374000Z",
20 "createdBy": "etladm",
21 "modifiedTimeStamp": "2022-11-23T16:58:18.374000Z",
22 "modifiedBy": "etladm",
23 "id": "1cdf57c0-cd68-44a0-8cb6-f66ac767851a",
24 "links": [
25 {
26 "method": "GET",
27 "rel": "self",
28 "href": "/relationships/references/1cdf57c0-cd68-44a0-8cb6-f66ac767851a",
29 "uri": "/relationships/references/1cdf57c0-cd68-44a0-8cb6-f66ac767851a",
30 "type": "application/vnd.sas.relationship.reference"
31 },
32 {
33 "method": "GET",
34 "rel": "up",
35 "href": "/relationships/references",
36 "uri": "/relationships/references",
37 "type": "application/vnd.sas.collection",
38 "itemType": "application/vnd.sas.relationship.reference"
39 },
40 {
41 "method": "PUT",
42 "rel": "update",
43 "href": "/relationships/references/1cdf57c0-cd68-44a0-8cb6-f66ac767851a",
44 "uri": "/relationships/references/1cdf57c0-cd68-44a0-8cb6-f66ac767851a",
45 "type": "application/vnd.sas.relationship.reference",
46 "responseType": "application/vnd.sas.relationship.reference"
47 },
48 {
49 "method": "DELETE",
50 "rel": "delete",
51 "href": "/relationships/references/1cdf57c0-cd68-44a0-8cb6-f66ac767851a",
52 "uri": "/relationships/references/1cdf57c0-cd68-44a0-8cb6-f66ac767851a"
53 },
54 {
55 "method": "GET",
56 "rel": "getRelationships",
57 "href": "/relationships/relationships?referenceId=1cdf57c0-cd68-44a0-8cb6-f66ac767851a",
58 "uri": "/relationships/relationships?referenceId=1cdf57c0-cd68-44a0-8cb6-f66ac767851a",
59 "type": "application/vnd.sas.collection",
60 "responseType": "application/vnd.sas.collection",
61 "itemType": "application/vnd.sas.relationship"
62 }
63 ],
64 "name": "Quarter 3 results",
65 "resourceUri": "/reports/reports/85a5b46f-f9ca-4d69-8f6b-fc53bf482029",
66 "contentType": "report",
67 "source": "SAS",
68 "analysisTimeStamp": "2022-11-23T16:58:18.374000Z",
69 "version": 1
70 }
71 ],
72 "links": [
73 {
74 "method": "GET",
75 "rel": "self",
76 "href": "/relationships/references?start=0&limit=10&sortBy=name",
77 "uri": "/relationships/references?start=0&limit=10&sortBy=name",
78 "type": "application/vnd.sas.collection",
79 "itemType": "application/vnd.sas.relationship.reference application/vnd.sas.error"
80 },
81 {
82 "method": "GET",
83 "rel": "collection",
84 "href": "/relationships/references",
85 "uri": "/relationships/references",
86 "type": "application/vnd.sas.collection",
87 "itemType": "application/vnd.sas.relationship.reference application/vnd.sas.error"
88 },
89 {
90 "method": "POST",
91 "rel": "create",
92 "href": "/relationships/references",
93 "uri": "/relationships/references",
94 "type": "application/vnd.sas.relationship.reference",
95 "responseType": "application/vnd.sas.relationship.reference"
96 }
97 ]
98}

Query Parameters

NameTypeRequiredDescription
onConflict
string
false

How to handle conflicts when a reference already exists.

Allowed values:
updateignore

Header Parameters

NameTypeRequiredDescription
If-Unmodified-Since
string
false

The value of the lastModified date of the reference. If the reference has been updated since this time, the update will fail. This header is required only when the onConflict='update' parameter is specified and is applied only to updated references.

Request Body

A collection of application/vnd.sas.relationship.reference resources.

A collection used to create multiple references.

NameTypeRequiredDescription
accept
string
false

A space-delimited list of media types from which an Accept header may be constructed.

count
integer<int64>
false

If populated indicates the number of items in the collection.

limit
integer
false

The number of items that were requested for the collection.

links
array [Link]
false

The links that apply to the collection.

name
string
false

The name of the collection.

start
integer<int64>
false

The zero-based index of the first item in the collection.

version
integer
false

The version number of the collection representation. This representation is version 2.

items
array [Create reference]
false

The array of application/vnd.sas.relationship.reference representations.

Responses

StatusMeaningDescription
200OKOk.HeadersSchema
400Bad RequestBad request (the request is not well-formed).Schema