Update report state

put/reports/{reportId}/states/{stateId}
Internal-Use Only

Updates the specified report state. Either an If-Match or If-Unmodified-Since request header is required. See Conditional Operations.

Request Samples

1

Response Samples

1{
2 "id": "126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
3 "userId": "user1",
4 "label": "Primary",
5 "primary": true,
6 "reportModifiedTimeStamp": "2021-05-10T22:31:33.400Z",
7 "createdBy": "user1",
8 "creationTimeStamp": "2021-05-13T15:01:28.708Z",
9 "modifiedBy": "user5",
10 "modifiedTimeStamp": "2021-05-13T15:01:29.055Z",
11 "links": [
12 {
13 "method": "GET",
14 "rel": "self",
15 "href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
16 "uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
17 "type": "application/vnd.sas.report.state.info"
18 },
19 {
20 "method": "PUT",
21 "rel": "update",
22 "href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
23 "uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
24 "type": "application/vnd.sas.report.state.info",
25 "responseType": "application/vnd.sas.report.state.info"
26 },
27 {
28 "method": "DELETE",
29 "rel": "delete",
30 "href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
31 "uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796"
32 },
33 {
34 "method": "GET",
35 "rel": "content",
36 "href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
37 "uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
38 "type": "application/vnd.sas.report.content"
39 },
40 {
41 "method": "PUT",
42 "rel": "updateContent",
43 "href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
44 "uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
45 "type": "application/vnd.sas.report.content",
46 "responseType": "application/vnd.sas.report.content"
47 }
48 ],
49 "version": 1
50}

Path Parameters

NameTypeRequiredDescription
reportId
string<object-id>
true

Report id for this operation.

stateId
string<object-id>
true

Report state id to check.

Header Parameters

NameTypeRequiredDescription
If-Match
string
false

The ETag that was returned from a GET, POST, PUT, or HEAD of this resource. If the ETag does not match, the update will fail.

If-Unmodified-Since
string
false

The value of the modifiedTimeStamp of the resource. If the resource has been updated since this time, the update will fail.

Request Body

Report state to update. A full report state can be included, but only the label and primary are used to update the report state.

The representation of an updated report state.

Example:
{"id":"412f6f71-64eb-4840-a6a5-9a8e18fcad74","label":"Test Updated Report State","primary":true,"reportModifiedTimeStamp":"2018-03-02T19:33:41.124Z"}
NameTypeRequiredDescription
id
string<object-id>
false

Report state id.

label
string
false

The report state label.

primary
boolean
false

The flag that indicates whether this report state is applied when the request does not specify the ID for a given user-report combination.

reportModifiedTimeStamp
string<date-time>
false

The time stamp of the associated report when the report state was created.

Responses

StatusMeaningDescription
200OKReport state was updated.HeadersSchema
400Bad RequestBad Request. The input report state was not valid.Schema
403ForbiddenReport or report state does not exist or the report state belongs to another user.Schema
412Precondition FailedThe ETag (If-Match) provided did not match the current version of the object, or the last modified date did not match.Schema
428Precondition RequiredThe ETag (If-Match), or the last modified date was not provided when updating the report state.Schema