Create report state
post/reports/{reportId}/states
Creates a new report state.
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": 150}
Name | Type | Required | Description |
---|---|---|---|
reportId | string<object-id> | true | Report id for this operation. |
Report state to create. A full report state can be included, but only the label and primary attributes are used to create the new report state.
The representation of a new report state.
Example:
{"label":"Test New Report State","primary":true,"reportModifiedTimeStamp":"2018-03-02T19:33:41.124Z"}
Name | Type | Required | Description |
---|---|---|---|
label | string | false | The report state label. |
primary | boolean | false | A flag to indicate whether or not this report state is the one to apply when the request does not explicitly 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. |
Status | Meaning | Description | ||
---|---|---|---|---|
201 | Created | New report state created. ETag header is returned. See [`Conditional Operations`](https://developer.sas.com/apis/rest/Topics/#conditional-operations). | Headers | Schema |
400 | Bad Request | Bad Request. The input report state was not valid. | Schema | |
404 | Not Found | Report does not exist. | Schema |