Patch tags

patch/tags
Internal-Use Only

For each given tag, performs a set of actions as specified in a JSON Patch. These actions are performed synchronously and transactionally. For every action, the patch must specify an operation (add or remove) and a target URI (for example, /members/resources or, empty to create a new tag). Each operation requires a valid representation for the value. If the operation removes all tag members from a given tag then the tag will be deleted. This endpoint currently supports adding entire Tag resources, but only supports the manipulation of the following Tag fields:

  • name (add only)
  • members (add only)
  • members.resources

Request Samples

1

Response Samples

1{
2 "version": 1,
3 "tags": {
4 "a56ce67a-54e0-44e4-bce2-2398a8b27b2e": {
5 "creationTimeStamp": "2021-04-13T00:00:00Z",
6 "createdBy": "sasuser",
7 "modifiedTimeStamp": "2021-04-13T00:00:00Z",
8 "modifiedBy": "sasuser",
9 "id": "a56ce67a-54e0-44e4-bce2-2398a8b27b2e",
10 "links": [
11 {
12 "method": "GET",
13 "rel": "self",
14 "href": "/catalog/tags/a56ce67a-54e0-44e4-bce2-2398a8b27b2e",
15 "uri": "/catalog/tags/a56ce67a-54e0-44e4-bce2-2398a8b27b2e",
16 "type": "application/vnd.sas.metadata.tag"
17 },
18 {
19 "method": "GET",
20 "rel": "alternate",
21 "href": "/catalog/tags/a56ce67a-54e0-44e4-bce2-2398a8b27b2e",
22 "uri": "/catalog/tags/a56ce67a-54e0-44e4-bce2-2398a8b27b2e",
23 "type": "application/vnd.sas.metadata.tag.summary"
24 },
25 {
26 "method": "GET",
27 "rel": "up",
28 "href": "/catalog/tags",
29 "uri": "/catalog/tags",
30 "type": "application/vnd.sas.collection",
31 "itemType": "application/vnd.sas.metadata.tag.summary"
32 },
33 {
34 "method": "PUT",
35 "rel": "update",
36 "href": "/catalog/tags/a56ce67a-54e0-44e4-bce2-2398a8b27b2e",
37 "uri": "/catalog/tags/a56ce67a-54e0-44e4-bce2-2398a8b27b2e",
38 "type": "application/vnd.sas.metadata.tag",
39 "responseType": "application/vnd.sas.metadata.tag"
40 },
41 {
42 "method": "DELETE",
43 "rel": "delete",
44 "href": "/catalog/tags/a56ce67a-54e0-44e4-bce2-2398a8b27b2e",
45 "uri": "/catalog/tags/a56ce67a-54e0-44e4-bce2-2398a8b27b2e"
46 }
47 ],
48 "version": 1,
49 "name": "Sales",
50 "members": {
51 "version": 1,
52 "type": "id",
53 "template": "/catalog/instances/{id}",
54 "resources": [
55 "b7a9f8f7-e939-2f4d-bb4b-b6740702f2bf",
56 "91411bc6-a921-e443-80f0-c89c9c9216e6"
57 ]
58 }
59 },
60 "ed5b3359-1514-4ac5-9638-2014b398cb56": {
61 "creationTimeStamp": "2021-04-13T00:00:00Z",
62 "createdBy": "sasuser",
63 "modifiedTimeStamp": "2021-04-16T00:00:00Z",
64 "modifiedBy": "sasuser",
65 "id": "ed5b3359-1514-4ac5-9638-2014b398cb56",
66 "links": [
67 {
68 "method": "GET",
69 "rel": "self",
70 "href": "/catalog/tags/ed5b3359-1514-4ac5-9638-2014b398cb56",
71 "uri": "/catalog/tags/ed5b3359-1514-4ac5-9638-2014b398cb56",
72 "type": "application/vnd.sas.metadata.tag"
73 },
74 {
75 "method": "GET",
76 "rel": "alternate",
77 "href": "/catalog/tags/ed5b3359-1514-4ac5-9638-2014b398cb56",
78 "uri": "/catalog/tags/ed5b3359-1514-4ac5-9638-2014b398cb56",
79 "type": "application/vnd.sas.metadata.tag.summary"
80 },
81 {
82 "method": "GET",
83 "rel": "up",
84 "href": "/catalog/tags",
85 "uri": "/catalog/tags",
86 "type": "application/vnd.sas.collection",
87 "itemType": "application/vnd.sas.metadata.tag.summary"
88 },
89 {
90 "method": "PUT",
91 "rel": "update",
92 "href": "/catalog/tags/ed5b3359-1514-4ac5-9638-2014b398cb56",
93 "uri": "/catalog/tags/ed5b3359-1514-4ac5-9638-2014b398cb56",
94 "type": "application/vnd.sas.metadata.tag",
95 "responseType": "application/vnd.sas.metadata.tag"
96 },
97 {
98 "method": "DELETE",
99 "rel": "delete",
100 "href": "/catalog/tags/ed5b3359-1514-4ac5-9638-2014b398cb56",
101 "uri": "/catalog/tags/ed5b3359-1514-4ac5-9638-2014b398cb56"
102 }
103 ],
104 "version": 1,
105 "name": "Human Resources",
106 "members": {
107 "version": 1,
108 "type": "id",
109 "template": "/catalog/instances/{id}",
110 "resources": [
111 "b7a9f8f7-e939-2f4d-bb4b-b6740702f2bf",
112 "91411bc6-a921-e443-80f0-c89c9c9216e6"
113 ]
114 }
115 },
116 "491d80b5-f49f-4fc4-b7ea-3aabccb98ed6": {
117 "creationTimeStamp": "2021-04-01T00:00:00Z",
118 "createdBy": "sasuser",
119 "modifiedTimeStamp": "2021-04-16T00:00:00Z",
120 "modifiedBy": "sasuser",
121 "id": "491d80b5-f49f-4fc4-b7ea-3aabccb98ed6",
122 "links": [
123 {
124 "method": "GET",
125 "rel": "self",
126 "href": "/catalog/tags/491d80b5-f49f-4fc4-b7ea-3aabccb98ed6",
127 "uri": "/catalog/tags/491d80b5-f49f-4fc4-b7ea-3aabccb98ed6",
128 "type": "application/vnd.sas.metadata.tag"
129 },
130 {
131 "method": "GET",
132 "rel": "alternate",
133 "href": "/catalog/tags/491d80b5-f49f-4fc4-b7ea-3aabccb98ed6",
134 "uri": "/catalog/tags/491d80b5-f49f-4fc4-b7ea-3aabccb98ed6",
135 "type": "application/vnd.sas.metadata.tag.summary"
136 },
137 {
138 "method": "GET",
139 "rel": "up",
140 "href": "/catalog/tags",
141 "uri": "/catalog/tags",
142 "type": "application/vnd.sas.collection",
143 "itemType": "application/vnd.sas.metadata.tag.summary"
144 },
145 {
146 "method": "PUT",
147 "rel": "update",
148 "href": "/catalog/tags/491d80b5-f49f-4fc4-b7ea-3aabccb98ed6",
149 "uri": "/catalog/tags/491d80b5-f49f-4fc4-b7ea-3aabccb98ed6",
150 "type": "application/vnd.sas.metadata.tag",
151 "responseType": "application/vnd.sas.metadata.tag"
152 },
153 {
154 "method": "DELETE",
155 "rel": "delete",
156 "href": "/catalog/tags/491d80b5-f49f-4fc4-b7ea-3aabccb98ed6",
157 "uri": "/catalog/tags/491d80b5-f49f-4fc4-b7ea-3aabccb98ed6"
158 }
159 ],
160 "version": 1,
161 "name": "Marketing",
162 "members": {
163 "version": 1,
164 "type": "id",
165 "template": "/catalog/instances/{id}",
166 "resources": [
167 "b7a9f8f7-e939-2f4d-bb4b-b6740702f2bf",
168 "91411bc6-a921-e443-80f0-c89c9c9216e6"
169 ]
170 }
171 }
172 }
173}

Query Parameters

NameTypeRequiredDescription
onConflict
string
false

Specifies how to handle tags in the body with ids that already exist. If "update" is specified, those tags are updated. Otherwise, those tags are not updated and a 409 Conflict error is returned for each one.

Allowed values:
updateignore
Default:
ignore

Header Parameters

NameTypeRequiredDescription
Content-Type
string
true

The representation in the request body.

Allowed values:
application/vnd.sas.metadata.patch.archive+jsonapplication/json
Default:
application/vnd.sas.metadata.patch.archive+json
If-Unmodified-Since
string
false

The time after which any tags updated by this call cannot have been updated; a 412 (Precondition Failed) error will be returned for each tag that has been modified after this time. The value must use the RFC 1123 time format (e.g. Fri, 01 Jan 1960 00:00:00 GMT); if an invalid value is specified, a 400 (Bad Request) error will be returned for each tag that already exists. This value is required if the call wil update any existing tags, and ignored if the call will only create new tags; if this value is omitted, a 428 (Precondition Required) error will be returned for each tag that already exists.

Request Body

An archive containing sets of JSON Patch operations to apply to Tags.

NameTypeRequiredDescription
tags
object
false

The sets of JSON Patch operations to apply to Tags. They key is the ID of the tag to perform the operations on (or a new ID if creating a tag).

Responses

StatusMeaningDescription
200OKThe request succeeded, and the content contained no tags or at least one tag was created or updated successfully. If at least one operation succeeded, errors for individual tags are returned in the response body and do not result in an error status for the whole response. HeadersSchema
400Bad RequestBad request; either the request is not well-formed, or all individual operations failed. In the latter case, the response body is an object containing the errors as described above for a successful request; the response code is 400 if all operation status codes are not the same, or the shared status code if they are the same. Schema
401UnauthorizedNot authenticated.Schema
403ForbiddenThe user does not have permission to complete this request.Schema
404Not FoundThe specified resource was not found.Schema
409ConflictA conflict has occurred.Schema
412Precondition FailedPrecondition failed. The target has changed since it was last fetched.Schema
415Unsupported Media TypeUnsupported Media Type. Include a Content-Type header with a supported value in the request.Schema
428Precondition RequiredPrecondition required. Include an If-Match header with the request.Schema