Visualization
Reports
Base URLs:
- https://example.com/reports
Terms of service Email: SAS Developers Web: SAS Developers
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
You can use the Reports API to create, read, and update reports. This API enables basic tasks such as moving or renaming reports, as well as editorial tasks such as reading, writing, and updating report content.
Usage Notes
Overview
The Reports API provides persistence service of reports and their content, and validation for report content. Typical consumers are those who treat the report as an object, such as those who want to move or rename the object, and those who read, write, and update the content, such as report editors and viewers.
A report is identified uniquely by its ID and has sub-components which are its content and, optionally, its states. A report can have only one content, which is a document that can be presented in either XML or JSON format but is saved only in XML format. Report content in JSON format will be converted to XML format prior to being saved.
A report can also have zero or more states. Report state captures the current state of a report as a result of user interactions when viewing the report. Different users have different report states.
Report content is stored separately from the report. A new report has no content. Storing report content overwrites the previously stored content.
Error Codes
HTTP status code | errorCode | Description |
---|---|---|
400 | 10701 | An error occurred during deserialization of the input report. |
400 | 10702 | An error occurred during serialization of the response report. |
400, 409 | 10708 | The report could not be added to the specified folder. |
400 | 10709 | The parentFolderUri parameter is missing. |
400 | 10713 | The media type version could not be accepted. |
400 | 10714 | The report name is too long. |
400 | 10716 | The report name is empty. |
400 | 10746 | There is a media type mismatch between the request and report content. |
400 | 10755 | There is a data mismatch between the request and report content. |
400 | 10757 | A report content format conversion error occurred. |
400 | 10759 | A report content save error occurred. |
400 | 10761 | A reading report content error occurred. |
403 | 10738 | Adding a report as a member of a folder is not allowed. |
404 | 10715 | An invalid URI was provided during validation. |
404 | 10728 | The report could not be found. |
404 | 10730 | The report content could not be found. |
404 | 10736 | The folder could not be found. |
406 | 10712 | The media type or media type version is unacceptable. |
406 | 10743 | The downgrade media type version is not allowed. |
406 | 10748 | There is a missing media type in the request. |
412 | 10722 | There is a mismatched request ETag header. |
428 | 10720 | There is a missing request ETag header. |
500 | 10703 | An error occurred while reading from the report repository. |
500 | 10733 | The report content could not be found and generated a system error. |
500 | 10740 | A system error occurred while adding a report as a member of a folder. |
Operations
Root
The list of Reports service links.
Get header information for the service
Code samples
# You can also use wget
curl -X HEAD https://example.com/reports/
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/reports/',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/reports/')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/reports/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /
Retrieves header information for the service. It can also be used to verify that the service is available.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Service is running. | None |
404 | Not Found | Service is not available. | None |
Get a collection of top-level links
Code samples
# You can also use wget
curl -X GET https://example.com/reports/ \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.api+json'
const headers = {
'Accept':'application/vnd.sas.api+json'
};
fetch('https://example.com/reports/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.api+json'
}
r = requests.get('https://example.com/reports/', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.api+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /
Returns a collection of links to the top-level collections surfaced through this API.
Example responses
200 Response
{
"version": "1",
"links": [
{
"method": "GET",
"rel": "reports",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.summary+json"
},
{
"method": "POST",
"rel": "createReport",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "POST",
"rel": "validateName",
"href": "/reports/validations/name",
"uri": "/reports/validations/name"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/content/validation",
"uri": "/reports/content/validation",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content.validation"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Top-level links. | reportApi |
404 | Not Found | Service is not available. | None |
Report
The operations for the report resource.
Get a collection of reports
Code samples
# You can also use wget
curl -X GET https://example.com/reports/reports#reports \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Accept-Item: application/vnd.sas.summary+json' \
-H 'Accept-Language: string'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Item':'application/vnd.sas.summary+json',
'Accept-Language':'string'
};
fetch('https://example.com/reports/reports#reports',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json',
'Accept-Item': 'application/vnd.sas.summary+json',
'Accept-Language': 'string'
}
r = requests.get('https://example.com/reports/reports#reports', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
"Accept-Item": []string{"application/vnd.sas.summary+json"},
"Accept-Language": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/reports#reports", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reports
Returns a collection of reports with standard paging, filtering, and sorting options.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Item | header | string | false | Optional, media type of collection item. |
Accept-Language | header | string | false | Optional header. If present, the locale it represents is used in processing, sorting, and filtering. |
start | query | integer | false | 0-based offset of the first item to return. |
limit | query | integer | false | Maximum number of items to return. |
filter | query | string(filter-criteria) | false | The criteria for filtering. Report attributes that can be used are id , name , description , createdBy , creationTimeStamp , modifiedBy , and modifiedTimeStamp . See Filtering in REST APIs . |
sortBy | query | string(sort-criteria) | false | The criteria for sorting. Report attributes that can be used are id , name , description , createdBy , creationTimeStamp , modifiedBy , and modifiedTimeStamp . See Sorting in REST APIs . |
Enumerated Values
Parameter | Value |
---|---|
Accept-Item | application/vnd.sas.summary+json |
Accept-Item | application/vnd.sas.report+json |
Example responses
A collection of reports in standard report format.
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/reports/reports?sortBy=name&start=0&limit=20",
"uri": "/reports/reports?sortBy=name&start=0&limit=20",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "createReport",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
}
],
"name": "reports",
"accept": "application/vnd.sas.report",
"start": 0,
"count": 2,
"items": [
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"createdBy": "user1",
"creationTimeStamp": "2020-12-09T13:22:11.394Z",
"modifiedBy": "user1",
"modifiedTimeStamp": "2020-12-09T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
]
},
{
"id": "6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"name": "Sample Report 2",
"createdBy": "user2",
"creationTimeStamp": "2020-12-10T13:22:11.394Z",
"modifiedBy": "user2",
"modifiedTimeStamp": "2020-12-10T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"uri": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"type": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565/content",
"uri": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
]
}
],
"limit": 20,
"version": 2
}
A collection of reports in standard resource summary format.
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/reports/reports?sortBy=name&start=0&limit=20",
"uri": "/reports/reports?sortBy=name&start=0&limit=20",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "createReport",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
}
],
"name": "reports",
"accept": "application/vnd.sas.summary",
"start": 0,
"count": 2,
"items": [
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"createdBy": "user1",
"creationTimeStamp": "2020-12-09T13:22:11.394Z",
"modifiedBy": "user1",
"modifiedTimeStamp": "2020-12-09T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"type": "report",
"version": 1,
"iconUri": "/reports/icons/report.gif"
},
{
"id": "6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"name": "Sample Report 2",
"createdBy": "user2",
"creationTimeStamp": "2020-12-10T13:22:11.394Z",
"modifiedBy": "user2",
"modifiedTimeStamp": "2020-12-10T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"uri": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"type": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565/content",
"uri": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"type": "report",
"version": 1,
"iconUri": "/reports/icons/report.gif"
}
],
"limit": 20,
"version": 2
}
A collection of reports in standard report format.
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/reports/reports?sortBy=name&start=0&limit=20",
"uri": "/reports/reports?sortBy=name&start=0&limit=20",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "createReport",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
}
],
"name": "reports",
"accept": "application/vnd.sas.report",
"start": 0,
"count": 2,
"items": [
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"createdBy": "user1",
"creationTimeStamp": "2020-12-09T13:22:11.394Z",
"modifiedBy": "user1",
"modifiedTimeStamp": "2020-12-09T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
]
},
{
"id": "6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"name": "Sample Report 2",
"createdBy": "user2",
"creationTimeStamp": "2020-12-10T13:22:11.394Z",
"modifiedBy": "user2",
"modifiedTimeStamp": "2020-12-10T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"uri": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"type": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565/content",
"uri": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
]
}
],
"limit": 20,
"version": 2
}
A collection of reports in standard resource summary format.
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/reports/reports?sortBy=name&start=0&limit=20",
"uri": "/reports/reports?sortBy=name&start=0&limit=20",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "createReport",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
}
],
"name": "reports",
"accept": "application/vnd.sas.summary",
"start": 0,
"count": 2,
"items": [
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"createdBy": "user1",
"creationTimeStamp": "2020-12-09T13:22:11.394Z",
"modifiedBy": "user1",
"modifiedTimeStamp": "2020-12-09T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"type": "report",
"version": 1,
"iconUri": "/reports/icons/report.gif"
},
{
"id": "6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"name": "Sample Report 2",
"createdBy": "user2",
"creationTimeStamp": "2020-12-10T13:22:11.394Z",
"modifiedBy": "user2",
"modifiedTimeStamp": "2020-12-10T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"uri": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"type": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565/content",
"uri": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"type": "report",
"version": 1,
"iconUri": "/reports/icons/report.gif"
}
],
"limit": 20,
"version": 2
}
Reports collection not found, possibly due to incorrect URI or media type.
{
"errorCode": 404,
"message": "Not Found",
"details": [
"traceId: 85b7763697b4ba63",
"path: /reports/reports"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The reports in resource summary format. | reportCollection |
404 | Not Found | Reports collection not found, possibly due to incorrect URI or media type. | error2 |
Create report
Code samples
# You can also use wget
curl -X POST https://example.com/reports/reports?parentFolderUri=http%3A%2F%2Fexample.com \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report+json' \
-H 'Accept: application/vnd.sas.report+json'
const inputBody = '{
"name": "TEST New Report",
"description": "TEST New Description"
}';
const headers = {
'Content-Type':'application/vnd.sas.report+json',
'Accept':'application/vnd.sas.report+json'
};
fetch('https://example.com/reports/reports?parentFolderUri=http%3A%2F%2Fexample.com',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report+json',
'Accept': 'application/vnd.sas.report+json'
}
r = requests.post('https://example.com/reports/reports', params={
'parentFolderUri': 'https://example.com'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report+json"},
"Accept": []string{"application/vnd.sas.report+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reports/reports", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /reports
Creates a new report and adds it to a folder as a child.
Body parameter
{
"name": "TEST New Report",
"description": "TEST New Description"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
parentFolderUri | query | string(uri) | true | The URI of the parent folder of the report. |
body | body | newReport | true | The report to create. A full report can be included, but only the name and description are used to create the new report. |
Example responses
201 Response
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"description": "Description of a sample report.",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "user1",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "user1",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"imageUris": {
"icon": "/reports/icons/report.gif"
},
"version": 1
}
The input report is invalid, or the
parentFolderUri
is not a valid folder URI or is not found.
{
"errorCode\"": 10736,
"message": "An error occurred. The resource could not be added as a folder member because the specified folder URI cannot be found.",
"details": [
"traceId: 03b5f0c710eca2d6",
"path: /reports/reports"
],
"version": 2,
"httpStatusCode": 400
}
A report with the same name is already a member of the folder.
{
"errorCode": 10708,
"message": "An error occurred. A conflict occurred when adding the resource as a member to the folder.",
"details": [
"traceId: 23307dd5dead24fc",
"path: /reports/reports"
],
"version": 2,
"httpStatusCode": 409
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | New report created. Use the updateContent link in the new report to store the report content. ETag header is returned. See Conditional operations . |
report |
400 | Bad Request | The input report is invalid, or the parentFolderUri is not a valid folder URI or is not found. |
error2 |
409 | Conflict | A report with the same name is already a member of the folder. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | The URI of the newly created resource. | |
201 | ETag | string | A tag that identifies this revision of the resource. | |
201 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Check report status
Code samples
# You can also use wget
curl -X HEAD https://example.com/reports/reports/{reportId}#standard
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/reports/reports/{reportId}#standard',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/reports/reports/{reportId}#standard')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/reports/reports/{reportId}#standard", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /reports/{reportId}
Returns the headers for a report, including ETag
. See Conditional operations
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Check status operation is successful. | None |
404 | Not Found | Report does not exist. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Get a report
Code samples
# You can also use wget
curl -X GET https://example.com/reports/reports/{reportId}#standard \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.report+json'
const headers = {
'Accept':'application/vnd.sas.report+json'
};
fetch('https://example.com/reports/reports/{reportId}#standard',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.report+json'
}
r = requests.get('https://example.com/reports/reports/{reportId}#standard', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.report+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/reports/{reportId}#standard", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reports/{reportId}
Returns the specified report, including ETag
header. See Conditional operations
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
Example responses
200 Response
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"description": "Description of a sample report.",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "user1",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "user1",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"imageUris": {
"icon": "/reports/icons/report.gif"
},
"version": 1
}
An error for report not found.
{
"errorCode": 10728,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returned the report and ETag header. |
report |
404 | Not Found | Report does not exist. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Get resource summary report
Code samples
# You can also use wget
curl -X GET https://example.com/reports/reports/{reportId}#resourceSummary \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.summary+json'
const headers = {
'Accept':'application/vnd.sas.summary+json'
};
fetch('https://example.com/reports/reports/{reportId}#resourceSummary',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.summary+json'
}
r = requests.get('https://example.com/reports/reports/{reportId}#resourceSummary', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.summary+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/reports/{reportId}#resourceSummary", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reports/{reportId}
Returns the specified report in resource summary format.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
Example responses
200 Response
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"createdBy": "user1",
"creationTimeStamp": "2020-12-09T13:22:11.394Z",
"modifiedBy": "user1",
"modifiedTimeStamp": "2020-12-09T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf"
}
],
"type": "report",
"iconUri": "/reports/icons/report.gif",
"version": "1"
}
An error for report not found.
{
"errorCode": 10728,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns the report in resource summary format. | reportSummary |
404 | Not Found | Report does not exist. | error2 |
Delete a report
Code samples
# You can also use wget
curl -X DELETE https://example.com/reports/reports/{reportId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/reports/reports/{reportId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('https://example.com/reports/reports/{reportId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/reports/reports/{reportId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /reports/{reportId}
Deletes the specified report and its content. Remove the report from the parent folder.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
Example responses
An error for report not found.
{
"errorCode": 10728,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Report is deleted. | None |
404 | Not Found | Report does not exist. | error2 |
Update a report
Code samples
# You can also use wget
curl -X PUT https://example.com/reports/reports/{reportId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report+json' \
-H 'Accept: application/vnd.sas.report+json' \
-H 'If-Match: string' \
-H 'If-Unmodified-Since: string'
const inputBody = '{
"id": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Update Report",
"description": "TEST New Description"
}';
const headers = {
'Content-Type':'application/vnd.sas.report+json',
'Accept':'application/vnd.sas.report+json',
'If-Match':'string',
'If-Unmodified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report+json',
'Accept': 'application/vnd.sas.report+json',
'If-Match': 'string',
'If-Unmodified-Since': 'string'
}
r = requests.put('https://example.com/reports/reports/{reportId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report+json"},
"Accept": []string{"application/vnd.sas.report+json"},
"If-Match": []string{"string"},
"If-Unmodified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/reports/reports/{reportId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /reports/{reportId}
Updates the specified report. Requires an If-Match
or If-Unmodified-Since
request header. See Conditional operations
.
Body parameter
{
"id": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Update Report",
"description": "TEST New Description"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
If-Match | header | 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 | header | string | false | The value of the modifiedTimeStamp of the resource. If the resource has been updated since this time, the update will fail. |
body | body | updateReport | true | Report to update. A full report can be included, but only id , name , and description are used to update the report. |
Example responses
200 Response
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"description": "Description of a sample report.",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "user1",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "user1",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"imageUris": {
"icon": "/reports/icons/report.gif"
},
"version": 1
}
The input report was not valid.
{
"errorCode\"": 400,
"message": "An error occurred. The report could not be updated due to bad content.",
"details": [
"traceId: 47a466b8c6c9e386",
"path: /reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7"
],
"version": 2,
"httpStatusCode": 400
}
An error for report not found.
{
"errorCode": 10728,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5"
],
"version": 2,
"httpStatusCode": 404
}
An error for report is found but with mismatched ETag.
{
"errorCode": 10722,
"message": "An error occurred. The action could not be performed. The provided resource is not the most current.",
"details": [
"traceId: ded22333af820cae",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5"
],
"version": 2,
"httpStatusCode": 412
}
The request is missing the required ETag ('If-Match' or 'If-Unmodified-Since') header.
{
"errorCode": 10720,
"message": "An error occurred. The action could not be performed: at least one header of the type 'If-Match' or 'If-Unmodified-Since' is required.",
"details": [
"traceId: fbcfd5f6cb5b4dc6",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5"
],
"version": 2,
"httpStatusCode": 428
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Report was updated. | report |
400 | Bad Request | The input report was not valid. | error2 |
404 | Not Found | Report does not exist. | error2 |
412 | Precondition Failed | The If-Match or If-Unmodified-Since header did not match the current version of the resource. |
error2 |
428 | Precondition Required | The If-Match or If-Unmodified-Since was not provided when updating the report. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Validate report name
Code samples
# You can also use wget
curl -X POST https://example.com/reports/validations/name#validateName?value=string&parentFolderUri=http%3A%2F%2Fexample.com \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/reports/validations/name#validateName?value=string&parentFolderUri=http%3A%2F%2Fexample.com',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.post('https://example.com/reports/validations/name#validateName', params={
'value': 'string', 'parentFolderUri': 'https://example.com'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reports/validations/name#validateName", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /validations/name#validateName
Ensures that the name does not exceed the maximum length and, if parentFolderUri
is provided, that a report with the name can be added as a member without conflict. The validation does not check whether or not the user can actually add a report with the given name to the folder.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
value | query | string | true | The report name in url-encoded format. |
parentFolderUri | query | string(uri) | true | The URI of the parent folder of the report. |
Example responses
The report name exceeds the maximum allowed length.
{
"errorCode": 10714,
"message": "The given report name exceeds the maximum 100 characters: abc.......................",
"details": [
"traceId: 211434df45ab0dfd",
"path: /reports/validations/name"
],
"version": 2,
"httpStatusCode": 400
}
The folder does not exist.
{
"errorCode": 10715,
"message": "The folder with 'validateNewMemberName' link as specified by the URI cannot be found.",
"details": [
"traceId: b155b43f6db843ed",
"path: /reports/validations/name"
],
"version": 2,
"httpStatusCode": 404
}
A report with the same name is already a member of the folder.
{
"errorCode": 1177,
"message": "An error occurred. The report 'ABC' could not be added to the folder.",
"details": [
"traceId: 584b0d18b140b777",
"path: /reports/validations/name"
],
"version": 2,
"httpStatusCode": 409
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The report name is valid. | None |
400 | Bad Request | The report name exceeds the maximum allowed length. | error2 |
404 | Not Found | The folder does not exist. | error2 |
409 | Conflict | A report with the same name is already a member of the folder. | error2 |
ReportContent
The operations for the report content resource.
Check status of report content
Code samples
# You can also use wget
curl -X HEAD https://example.com/reports/reports/{reportId}/content \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept-Language: string' \
-H 'If-None-Match: string' \
-H 'If-Modified-Since: string'
const headers = {
'Accept-Language':'string',
'If-None-Match':'string',
'If-Modified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}/content',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept-Language': 'string',
'If-None-Match': 'string',
'If-Modified-Since': 'string'
}
r = requests.head('https://example.com/reports/reports/{reportId}/content', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept-Language": []string{"string"},
"If-None-Match": []string{"string"},
"If-Modified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/reports/reports/{reportId}/content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /reports/{reportId}/content
Returns the headers for report content, including the ETag
. See Conditional operations
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
Accept-Language | header | string | false | Optional header. If present, the locale it represents is used in processing, sorting, and filtering. |
If-None-Match | header | string | false | The ETag that was returned from a GET , POST , PUT , or HEAD of this resource. If the ETag matches, the operation will not proceed. |
If-Modified-Since | header | string | false | The value of the modifiedTimeStamp the resource. If the resource has not been updated since this time, the operation will not proceed. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Check status operation was successful. | None |
304 | Not Modified | The caller has the most current resource. | None |
404 | Not Found | Report or report content does not exist. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
|
200 | Content-Language | string | This header represents the locale of the result. It may not be present if there is issue during localization, in which case the result is what is persisted. |
Get report content
Code samples
# You can also use wget
curl -X GET https://example.com/reports/reports/{reportId}/content \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.report.content+json' \
-H 'Accept-Language: string' \
-H 'If-None-Match: string' \
-H 'If-Modified-Since: string'
const headers = {
'Accept':'application/vnd.sas.report.content+json',
'Accept-Language':'string',
'If-None-Match':'string',
'If-Modified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}/content',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.report.content+json',
'Accept-Language': 'string',
'If-None-Match': 'string',
'If-Modified-Since': 'string'
}
r = requests.get('https://example.com/reports/reports/{reportId}/content', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.report.content+json"},
"Accept-Language": []string{"string"},
"If-None-Match": []string{"string"},
"If-Modified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/reports/{reportId}/content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reports/{reportId}/content
Returns the report content, including ETag
. See Conditional operations
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
Accept-Language | header | string | false | Optional header. If present, the locale it represents is used in processing, sorting, and filtering. |
If-None-Match | header | string | false | The ETag that was returned from a GET , POST , PUT , or HEAD of this resource. If the ETag matches, the operation will not proceed. |
If-Modified-Since | header | string | false | The value of the modifiedTimeStamp the resource. If the resource has not been updated since this time, the operation will not proceed. |
Example responses
200 Response
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<SASReport>
<label>Small Report</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<Results/>
<DataDefinitions/>
<VisualElements/>
<PromptDefinitions/>
<View>
<Sections>
<Section>
<name>vi1</name>
<label>Section1</label>
<Body>
<MediaContainer>
<target>mt111</target>
<RelativeLayout/>
</MediaContainer>
</Body>
</Section>
</Sections>
</View>
<Interactions/>
<MediaDefinitionResource>
<file>/files/files/0499563b-9425-42ab-b6e2-d99804e54299</file>
</MediaDefinitionResource>
<MediaSchemes>
<MediaScheme>
<name>ms201</name>
</MediaScheme>
</MediaSchemes>
<MediaTargets>
<MediaTarget>
<name>mt111</name>
<scheme>ms201</scheme>
<definition>table-1280x768</definition>
</MediaTarget>
</MediaTargets>
</SASReport>
An error for report content not found.
{
"errorCode": 10728,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Report content. | reportContentXml |
304 | Not Modified | The caller has the most current resource. | None |
404 | Not Found | Report or report content does not exist. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
|
200 | Content-Language | string | This header represents the locale of the result. It may not be present if there is issue during localization, in which case the result is what is persisted. |
Save report content
Code samples
# You can also use wget
curl -X PUT https://example.com/reports/reports/{reportId}/content \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.content+json' \
-H 'Accept: application/vnd.sas.error+json' \
-H 'If-Match: string' \
-H 'If-Unmodified-Since: string'
const inputBody = '{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}';
const headers = {
'Content-Type':'application/vnd.sas.report.content+json',
'Accept':'application/vnd.sas.error+json',
'If-Match':'string',
'If-Unmodified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}/content',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.content+json',
'Accept': 'application/vnd.sas.error+json',
'If-Match': 'string',
'If-Unmodified-Since': 'string'
}
r = requests.put('https://example.com/reports/reports/{reportId}/content', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.content+json"},
"Accept": []string{"application/vnd.sas.error+json"},
"If-Match": []string{"string"},
"If-Unmodified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/reports/reports/{reportId}/content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /reports/{reportId}/content
Saves the report content. Does not return the stored content. An ETag
is not required for the initial save, but is required for all subsequent saves. In some situations, where an Accept type header is automatically generated, setting it to '*/*' will achieve the same effect as omitting it. See Conditional operations
.
Body parameter
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<reportContentJson element="SASReport">
<xmlns>http://www.sas.com/sasreportmodel/bird-4.3.0</xmlns>
<label>Small Report</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<view element="View">
<sections element="Section">
<name>vi1</name>
<label>Section1</label>
<body element="Body">
<mediaContainerList element="MediaContainer">
<target>mt111</target>
<layout element="ResponsiveLayout"/>
</mediaContainerList>
</body>
<mediaSchemes element="MediaScheme">
<name>ms201</name>
</mediaSchemes>
<mediaTargets element="MediaTarget">
<name>mt111</name>
<scheme">ms201</scheme">
</mediaTargets>
</sections>
</view>
</reportContentJson>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
If-Match | header | 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 | header | string | false | The value of the modifiedTimeStamp of the resource. If the resource has been updated since this time, the update will fail. |
copyDependentFiles | query | boolean | false | The flag to create copy of all dependent file resources. |
body | body | reportContentJson | true | The report content to be saved. |
Example responses
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
An error for report content not found.
{
"errorCode": 10728,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content"
],
"version": 2,
"httpStatusCode": 404
}
An error for report content is found but with mismatched ETag.
{
"errorCode": 10722,
"message": "An error occurred. The action could not be performed. The provided resource is not the most current.",
"details": [
"traceId: ded22333af820cae",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content"
],
"version": 2,
"httpStatusCode": 412
}
The request is missing the required ETag ('If-Match' or 'If-Unmodified-Since') header.
{
"errorCode": 10720,
"message": "An error occurred. The action could not be performed: at least one header of the type 'If-Match' or 'If-Unmodified-Since' is required.",
"details": [
"traceId: fbcfd5f6cb5b4dc6",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content"
],
"version": 2,
"httpStatusCode": 428
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The report content was stored. | None |
400 | Bad Request | The input report content was not valid. | error2 |
404 | Not Found | The report or report content does not exist. | error2 |
412 | Precondition Failed | The If-Match or If-Unmodified-Since header did not match the current version of the resource. |
error2 |
428 | Precondition Required | The If-Match or If-Unmodified-Since was not provided when updating the report content. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
204 | ETag | string | A tag that identifies this revision of the resource. | |
204 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Save and return report content
Code samples
# You can also use wget
curl -X PUT https://example.com/reports/reports/{reportId}/content#updateContentWithReturn \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.content+json' \
-H 'Accept: application/vnd.sas.report.content+json' \
-H 'If-Match: string' \
-H 'If-Unmodified-Since: string'
const inputBody = '{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}';
const headers = {
'Content-Type':'application/vnd.sas.report.content+json',
'Accept':'application/vnd.sas.report.content+json',
'If-Match':'string',
'If-Unmodified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}/content#updateContentWithReturn',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.content+json',
'Accept': 'application/vnd.sas.report.content+json',
'If-Match': 'string',
'If-Unmodified-Since': 'string'
}
r = requests.put('https://example.com/reports/reports/{reportId}/content#updateContentWithReturn', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.content+json"},
"Accept": []string{"application/vnd.sas.report.content+json"},
"If-Match": []string{"string"},
"If-Unmodified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/reports/reports/{reportId}/content#updateContentWithReturn", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /reports/{reportId}/content
An ETag
is not required for the initial save, but is required for all subsequent saves. See Conditional operations
. A different response code is returned depending on whether the request is for the initial save or a subsequent save.
Body parameter
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<reportContentJson element="SASReport">
<xmlns>http://www.sas.com/sasreportmodel/bird-4.3.0</xmlns>
<label>Small Report</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<view element="View">
<sections element="Section">
<name>vi1</name>
<label>Section1</label>
<body element="Body">
<mediaContainerList element="MediaContainer">
<target>mt111</target>
<layout element="ResponsiveLayout"/>
</mediaContainerList>
</body>
<mediaSchemes element="MediaScheme">
<name>ms201</name>
</mediaSchemes>
<mediaTargets element="MediaTarget">
<name>mt111</name>
<scheme">ms201</scheme">
</mediaTargets>
</sections>
</view>
</reportContentJson>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
If-Match | header | 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 | header | string | false | The value of the modifiedTimeStamp of the resource. If the resource has been updated since this time, the update will fail. |
copyDependentFiles | query | boolean | false | The flag to create copy of all dependent file resources. |
body | body | reportContentJson | true | The report content to be saved. |
Example responses
200 Response
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<SASReport>
<label>Small Report</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<Results/>
<DataDefinitions/>
<VisualElements/>
<PromptDefinitions/>
<View>
<Sections>
<Section>
<name>vi1</name>
<label>Section1</label>
<Body>
<MediaContainer>
<target>mt111</target>
<RelativeLayout/>
</MediaContainer>
</Body>
</Section>
</Sections>
</View>
<Interactions/>
<MediaDefinitionResource>
<file>/files/files/0499563b-9425-42ab-b6e2-d99804e54299</file>
</MediaDefinitionResource>
<MediaSchemes>
<MediaScheme>
<name>ms201</name>
</MediaScheme>
</MediaSchemes>
<MediaTargets>
<MediaTarget>
<name>mt111</name>
<scheme>ms201</scheme>
<definition>table-1280x768</definition>
</MediaTarget>
</MediaTargets>
</SASReport>
An error for report content is not valid.
{
"errorCode\"": 10759,
"message": "An error occurred. The report content could not be saved.",
"details": [
"traceId: 87b3021faef6ac38",
"path: /reports/reports/c1e6b57b-bafc-4200-b900-7d8828b7845f/content"
],
"version": 2,
"httpStatusCode": 400
}
An error for report content not found.
{
"errorCode": 10728,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content"
],
"version": 2,
"httpStatusCode": 404
}
An error for report content is found but with mismatched ETag.
{
"errorCode": 10722,
"message": "An error occurred. The action could not be performed. The provided resource is not the most current.",
"details": [
"traceId: ded22333af820cae",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content"
],
"version": 2,
"httpStatusCode": 412
}
The request is missing the required ETag ('If-Match' or 'If-Unmodified-Since') header.
{
"errorCode": 10720,
"message": "An error occurred. The action could not be performed: at least one header of the type 'If-Match' or 'If-Unmodified-Since' is required.",
"details": [
"traceId: fbcfd5f6cb5b4dc6",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content"
],
"version": 2,
"httpStatusCode": 428
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The report content was updated. | reportContentXml |
201 | Created | The report content was created. | reportContentXml |
400 | Bad Request | Report does not exist. | error2 |
404 | Not Found | Report or report content does not exist. | error2 |
412 | Precondition Failed | The If-Match or If-Unmodified-Since header did not match the current version of the object. |
error2 |
428 | Precondition Required | The If-Match or If-Unmodified-Since was not provided when updating the report. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
|
201 | ETag | string | A tag that identifies this revision of the resource. | |
201 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Get persisted report content version
Code samples
# You can also use wget
curl -X GET https://example.com/reports/reports/{reportId}/content/version \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.report.version+json'
const headers = {
'Accept':'application/vnd.sas.report.version+json'
};
fetch('https://example.com/reports/reports/{reportId}/content/version',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.report.version+json'
}
r = requests.get('https://example.com/reports/reports/{reportId}/content/version', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.report.version+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/reports/{reportId}/content/version", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reports/{reportId}/content/version
Returns the persisted report content version.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
Example responses
200 Response
{
"schema": "4.3.0",
"mediaType": 8,
"version": 1
}
An error for report content not found.
{
"errorCode": 10728,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The persisted report content version. | reportVersion |
404 | Not Found | Report, report content does not exist, or, the content version cannot be determined. | error2 |
Validate the persisted report content schema
Code samples
# You can also use wget
curl -X POST https://example.com/reports/reports/{reportId}/content/validation#validatePersistedContent \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.report.content.validation+json'
const headers = {
'Accept':'application/vnd.sas.report.content.validation+json'
};
fetch('https://example.com/reports/reports/{reportId}/content/validation#validatePersistedContent',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.report.content.validation+json'
}
r = requests.post('https://example.com/reports/reports/{reportId}/content/validation#validatePersistedContent', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.report.content.validation+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reports/reports/{reportId}/content/validation#validatePersistedContent", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /reports/{reportId}/content/validation
Validates the report content against a schema. The schema specified in the report content is used for validation.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
Example responses
200 Response
{
"level": "schemaInvalid",
"schema": "bird-4.1.2.xsd",
"messages": [
{
"type": "schemaError",
"message": "Line 89: Value 'binder' is not facet-valid with respect to enumeration '[column, page]'. It must be a value from the enumeration."
},
{
"type": "schemaError",
"message": "Line 89: The value 'binder' of attribute 'type' on element 'Axis' is not valid with respect to its type, 'relationalAxisTypeEnum'."
}
],
"version": 1
}
Report or report content does not exist.
{
"errorCode": 0,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content/validation"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Report content is valid. | reportContentValidation |
404 | Not Found | Report or report content does not exist. | error2 |
Get available versions of report content
Code samples
# You can also use wget
curl -X GET https://example.com/reports/versions \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/reports/versions',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/reports/versions', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/versions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /versions
Return all available versions of report content.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | 0-based offset of the first item to return. |
limit | query | integer | false | Maximum number of items to return. |
filter | query | string(filter-criteria) | false | The criteria for filtering. Report version attributes that can be used are schema , mediaType , and version . See Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | The criteria for sorting. Report version attributes that can be used are schema , mediaType , and version . See Sorting in REST APIs. |
Example responses
200 Response
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/reports/versions",
"uri": "/reports/versions",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/reports/versions?sortBy=name&start=0&limit=20",
"uri": "/reports/versions?sortBy=name&start=0&limit=20",
"type": "application/vnd.sas.collection"
}
],
"name": "report-versions",
"accept": "application/vnd.sas.report.version",
"start": "0",
"count": "2",
"items": [
{
"schema": "4.0.2",
"mediaType": "1",
"version": "1"
},
{
"schema": "4.4.0",
"mediaType": "9",
"version": "1"
}
],
"limit": "20",
"version": "2"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The report versions collection. | reportVersionCollection |
Get the default version of report content
Code samples
# You can also use wget
curl -X GET https://example.com/reports/versions/@defaultVersion \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.report.version+json'
const headers = {
'Accept':'application/vnd.sas.report.version+json'
};
fetch('https://example.com/reports/versions/@defaultVersion',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.report.version+json'
}
r = requests.get('https://example.com/reports/versions/@defaultVersion', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.report.version+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/versions/@defaultVersion", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /versions/@defaultVersion
Return the current default versions of report content.
Example responses
200 Response
{
"schema": "4.3.0",
"mediaType": 8,
"version": 1
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The default report content version. | reportVersion |
Get the report content version for the given semantic version
Code samples
# You can also use wget
curl -X GET https://example.com/reports/versions/{semanticVersion} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.report.version+json'
const headers = {
'Accept':'application/vnd.sas.report.version+json'
};
fetch('https://example.com/reports/versions/{semanticVersion}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.report.version+json'
}
r = requests.get('https://example.com/reports/versions/{semanticVersion}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.report.version+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/versions/{semanticVersion}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /versions/{semanticVersion}
Return the report content version for the given semantic version.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
semanticVersion | path | string | true | The version in the format of major.minor.patch. |
Example responses
200 Response
{
"schema": "4.3.0",
"mediaType": 8,
"version": 1
}
Invalid major, minor, patch of report content version.
{
"errorCode": 0,
"message": "Invalid version '99.99.99' is queried.",
"details": [
"traceId: 5da047bb467bc8b5",
"path: /reports/versions/99.99.99"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The report content version. | reportVersion |
404 | Not Found | Invalid major, minor, patch of report content version. | error2 |
Check report content elements status
Code samples
# You can also use wget
curl -X HEAD https://example.com/reports/reports/{reportId}/content/elements \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept-Language: string' \
-H 'Accept-Item: application/vnd.sas.report.content.element+json;version=2'
const headers = {
'Accept-Language':'string',
'Accept-Item':'application/vnd.sas.report.content.element+json;version=2'
};
fetch('https://example.com/reports/reports/{reportId}/content/elements',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept-Language': 'string',
'Accept-Item': 'application/vnd.sas.report.content.element+json;version=2'
}
r = requests.head('https://example.com/reports/reports/{reportId}/content/elements', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept-Language": []string{"string"},
"Accept-Item": []string{"application/vnd.sas.report.content.element+json;version=2"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/reports/reports/{reportId}/content/elements", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /reports/{reportId}/content/elements
Returns the headers for a report content elements, including ETag
. See Conditional operations
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
characteristics | query | string | false | A '|' (bar) separated list of characteristics of elements to return. A characteristic is a set of attributes of an element. An element has only one type but it can have many characteristics. If no characteristic is specified, then all elements are returned. Valid values are visualElement , dataSource , and visualElementsBySection |
Accept-Language | header | string | false | Optional header. If present, the locale it represents is used in processing, sorting, and filtering. |
Accept-Item | header | string | false | Optional header. If omitted, items of application/vnd.sas.report.content.element+json type are returned. |
Enumerated Values
Parameter | Value |
---|---|
Accept-Item | application/vnd.sas.report.content.element+json |
Accept-Item | application/vnd.sas.report.content.element+json;version=1 |
Accept-Item | application/vnd.sas.report.content.element+json;version=2 |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Check status operation was successful. | None |
404 | Not Found | The report or report content does not exist. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Content-Language | string | This header represents the locale of the result. It may not be present if there is issue during localization, in which case the result is what is persisted. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Get report content elements
Code samples
# You can also use wget
curl -X GET https://example.com/reports/reports/{reportId}/content/elements \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Accept-Language: string' \
-H 'Accept-Item: application/vnd.sas.report.content.element+json;version=2'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Language':'string',
'Accept-Item':'application/vnd.sas.report.content.element+json;version=2'
};
fetch('https://example.com/reports/reports/{reportId}/content/elements',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json',
'Accept-Language': 'string',
'Accept-Item': 'application/vnd.sas.report.content.element+json;version=2'
}
r = requests.get('https://example.com/reports/reports/{reportId}/content/elements', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
"Accept-Language": []string{"string"},
"Accept-Item": []string{"application/vnd.sas.report.content.element+json;version=2"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/reports/{reportId}/content/elements", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reports/{reportId}/content/elements
Returns the collection of elements.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
characteristics | query | string | false | A '|' (bar) separated list of characteristics of elements to return. A characteristic is a set of attributes of an element. An element has only one type but it can have many characteristics. If no characteristic is specified, then all elements are returned. Valid values are visualElement , dataSource , and visualElementsBySection |
Accept-Language | header | string | false | Optional header. If present, the locale it represents is used in processing, sorting, and filtering. |
Accept-Item | header | string | false | Optional header. If omitted, items of application/vnd.sas.report.content.element+json type are returned. |
Enumerated Values
Parameter | Value |
---|---|
Accept-Item | application/vnd.sas.report.content.element+json |
Accept-Item | application/vnd.sas.report.content.element+json;version=1 |
Accept-Item | application/vnd.sas.report.content.element+json;version=2 |
Example responses
200 Response
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/content/elements",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/content/elements",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "GET",
"rel": "up",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5",
"type": "application/vnd.sas.report"
}
],
"name": "reportContentElements",
"accept": "application/vnd.sas.report.content.element",
"count": "3",
"items": [
{
"name": "vi6",
"label": "Migration Timeline",
"type": "Section",
"version": 1
},
{
"name": "vi357",
"label": "EG Project Status",
"type": "HiddenSection",
"version": 1
},
{
"name": "ve27",
"label": "Import details for EG projects",
"type": "Table",
"version": 1
}
],
"version": 2
}
The report or report content does not exist.
{
"errorCode": 0,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content/elements"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A collection of report content elements. Paging and sorting are not supported. | reportContentElementsCollection |
404 | Not Found | The report or report content does not exist. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Content-Language | string | This header represents the locale of the result. It may not be present if there is issue during localization, in which case the result is what is persisted. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Convert content from XML to JSON
Code samples
# You can also use wget
curl -X POST https://example.com/reports/content#toJSON \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.content+xml' \
-H 'Accept: application/vnd.sas.report.content+json'
const inputBody = '{
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"Results": {},
"DataDefinitions": {},
"VisualElements": {},
"PromptDefinitions": {},
"View": {
"Sections": {
"Section": {
"name": "vi1",
"label": "Section1",
"Body": {
"MediaContainer": {
"target": "mt111",
"RelativeLayout": {}
}
}
}
}
},
"Interactions": {},
"MediaDefinitionResource": {
"file": "/files/files/0499563b-9425-42ab-b6e2-d99804e54299"
},
"MediaSchemes": {
"MediaScheme": {
"name": "ms201"
}
},
"MediaTargets": {
"MediaTarget": {
"name": "mt111",
"scheme": "ms201",
"definition": "table-1280x768"
}
}
}';
const headers = {
'Content-Type':'application/vnd.sas.report.content+xml',
'Accept':'application/vnd.sas.report.content+json'
};
fetch('https://example.com/reports/content#toJSON',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.content+xml',
'Accept': 'application/vnd.sas.report.content+json'
}
r = requests.post('https://example.com/reports/content#toJSON', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.content+xml"},
"Accept": []string{"application/vnd.sas.report.content+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reports/content#toJSON", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /content
Returns the converted report content.
Body parameter
<?xml version="1.0" encoding="UTF-8" ?>
<SASReport>
<label>Small Report</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<Results/>
<DataDefinitions/>
<VisualElements/>
<PromptDefinitions/>
<View>
<Sections>
<Section>
<name>vi1</name>
<label>Section1</label>
<Body>
<MediaContainer>
<target>mt111</target>
<RelativeLayout/>
</MediaContainer>
</Body>
</Section>
</Sections>
</View>
<Interactions/>
<MediaDefinitionResource>
<file>/files/files/0499563b-9425-42ab-b6e2-d99804e54299</file>
</MediaDefinitionResource>
<MediaSchemes>
<MediaScheme>
<name>ms201</name>
</MediaScheme>
</MediaSchemes>
<MediaTargets>
<MediaTarget>
<name>mt111</name>
<scheme>ms201</scheme>
<definition>table-1280x768</definition>
</MediaTarget>
</MediaTargets>
</SASReport>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | reportContentXml | true | The report content to be converted. |
Example responses
200 Response
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
Bad Request. The input report content was not valid.
{
"errorCode\"": 0,
"message": "An error occurred.",
"details": [
"traceId: 03b5f0c710eca2d6",
"path: /reports/content"
],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Report content. | reportContentJson |
400 | Bad Request | Bad Request. The input report content was not valid. | error2 |
Convert content from JSON to XML
Code samples
# You can also use wget
curl -X POST https://example.com/reports/content#toXML \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.content+json' \
-H 'Accept: application/vnd.sas.report.content+xml'
const inputBody = '{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}';
const headers = {
'Content-Type':'application/vnd.sas.report.content+json',
'Accept':'application/vnd.sas.report.content+xml'
};
fetch('https://example.com/reports/content#toXML',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.content+json',
'Accept': 'application/vnd.sas.report.content+xml'
}
r = requests.post('https://example.com/reports/content#toXML', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.content+json"},
"Accept": []string{"application/vnd.sas.report.content+xml"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reports/content#toXML", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /content
Returns the converted report content.
Body parameter
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | reportContentJson | true | The report content to be converted. |
Example responses
200 Response
<?xml version="1.0" encoding="UTF-8" ?>
<SASReport>
<label>Small Report</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<Results/>
<DataDefinitions/>
<VisualElements/>
<PromptDefinitions/>
<View>
<Sections>
<Section>
<name>vi1</name>
<label>Section1</label>
<Body>
<MediaContainer>
<target>mt111</target>
<RelativeLayout/>
</MediaContainer>
</Body>
</Section>
</Sections>
</View>
<Interactions/>
<MediaDefinitionResource>
<file>/files/files/0499563b-9425-42ab-b6e2-d99804e54299</file>
</MediaDefinitionResource>
<MediaSchemes>
<MediaScheme>
<name>ms201</name>
</MediaScheme>
</MediaSchemes>
<MediaTargets>
<MediaTarget>
<name>mt111</name>
<scheme>ms201</scheme>
<definition>table-1280x768</definition>
</MediaTarget>
</MediaTargets>
</SASReport>
Bad Request. The input report content was not valid.
{
"errorCode\"": 0,
"message": "An error occurred.",
"details": [
"traceId: 03b5f0c710eca2d6",
"path: /reports/content"
],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Report content. | reportContentXml |
400 | Bad Request | Bad Request. The input report content was not valid. | error2 |
Validate report content schema
Code samples
# You can also use wget
curl -X POST https://example.com/reports/content/validation#validateAnyContent \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.content+json' \
-H 'Accept: application/vnd.sas.report.content.validation+json'
const inputBody = '{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}';
const headers = {
'Content-Type':'application/vnd.sas.report.content+json',
'Accept':'application/vnd.sas.report.content.validation+json'
};
fetch('https://example.com/reports/content/validation#validateAnyContent',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.content+json',
'Accept': 'application/vnd.sas.report.content.validation+json'
}
r = requests.post('https://example.com/reports/content/validation#validateAnyContent', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.content+json"},
"Accept": []string{"application/vnd.sas.report.content.validation+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reports/content/validation#validateAnyContent", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /content/validation
Validates the report content against a schema. The schema specified in the report content is used for validation.
Body parameter
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<reportContentJson element="SASReport">
<xmlns>http://www.sas.com/sasreportmodel/bird-4.3.0</xmlns>
<label>Small Report</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<view element="View">
<sections element="Section">
<name>vi1</name>
<label>Section1</label>
<body element="Body">
<mediaContainerList element="MediaContainer">
<target>mt111</target>
<layout element="ResponsiveLayout"/>
</mediaContainerList>
</body>
<mediaSchemes element="MediaScheme">
<name>ms201</name>
</mediaSchemes>
<mediaTargets element="MediaTarget">
<name>mt111</name>
<scheme">ms201</scheme">
</mediaTargets>
</sections>
</view>
</reportContentJson>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | reportContentJson | true | The report content to be converted. |
Example responses
200 Response
{
"level": "schemaInvalid",
"schema": "bird-4.1.2.xsd",
"messages": [
{
"type": "schemaError",
"message": "Line 89: Value 'binder' is not facet-valid with respect to enumeration '[column, page]'. It must be a value from the enumeration."
},
{
"type": "schemaError",
"message": "Line 89: The value 'binder' of attribute 'type' on element 'Axis' is not valid with respect to its type, 'relationalAxisTypeEnum'."
}
],
"version": 1
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Report content validation result. | reportContentValidation |
ReportState
The operations for the report state resource.
Get a collection of report states
Code samples
# You can also use wget
curl -X GET https://example.com/reports/reports/{reportId}/states \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Accept-Language: string'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Language':'string'
};
fetch('https://example.com/reports/reports/{reportId}/states',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json',
'Accept-Language': 'string'
}
r = requests.get('https://example.com/reports/reports/{reportId}/states', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
"Accept-Language": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/reports/{reportId}/states", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reports/{reportId}/states
Returns a collection of report states of the current user associated with a report with standard paging, filtering, and sorting options.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
Accept-Language | header | string | false | Optional header. If present, the locale it represents is used in processing, sorting, and filtering. |
start | query | integer | false | 0-based offset of the first item to return. |
limit | query | integer | false | Maximum number of items to return. |
filter | query | string(filter-criteria) | false | The criteria for filtering the items. Report state attributes that can be used are id , label , primary , createdBy , creationTimeStamp , modifiedBy , and modifiedTimeStamp . See Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | The criteria for sorting the items. Report attributes that can be used are id , label , primary , createdBy , creationTimeStamp , modifiedBy , and modifiedTimeStamp . See Sorting in REST APIs. |
Example responses
200 Response
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states?filter=and(eq(report.id,'8559a118-139b-46e4-adea-97198d9068f5'),eq(userId,'user1'))&sortBy=label&start=0&limit=20",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states?filter=and(eq(report.id,'8559a118-139b-46e4-adea-97198d9068f5'),eq(userId,'user1'))&sortBy=label&start=0&limit=20",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "createReportState",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states",
"type": "application/vnd.sas.report.state.info",
"responseType": "application/vnd.sas.report.state.info"
}
],
"name": "reportStates",
"accept": "application/vnd.sas.report.state.info",
"count": "1",
"items": [
{
"id": "cb237e1b-b11f-42fb-960c-a48a0c5b1688",
"label": "2020Timeline",
"userId": "user1",
"primary": "true",
"reportModifiedTimeStamp": "2018-03-02T19:33:41.124Z",
"creationTimeStamp": "2018-03-02T19:41:55.314Z",
"createdBy": "user1",
"modifiedTimeStamp": "2018-03-02T19:41:55.314Z",
"modifiedBy": "user5",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"uri": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"uri": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"type": "application/vnd.sas.report.state.info",
"responseType": "application/vnd.sas.report.state.info"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"uri": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content",
"uri": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content",
"type": "application/vnd.sas.report.state"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content",
"uri": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content",
"type": "application/vnd.sas.report.state",
"responseType": "application/vnd.sas.report.stat"
}
]
}
],
"version": "2"
}
Bad Request.
{
"errorCode\"": 0,
"message": "An error occurred.",
"details": [
"traceId: 03b5f0c710eca2d6",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states"
],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The report states in standard report state format. | reportStateCollection |
400 | Bad Request | Bad Request. | error2 |
Create report state
Code samples
# You can also use wget
curl -X POST https://example.com/reports/reports/{reportId}/states \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.state.info+json' \
-H 'Accept: application/vnd.sas.report.state.info+json'
const inputBody = '{
"label": "Test New Report State",
"primary": true,
"reportModifiedTimeStamp": "2018-03-02T19:33:41.124Z"
}';
const headers = {
'Content-Type':'application/vnd.sas.report.state.info+json',
'Accept':'application/vnd.sas.report.state.info+json'
};
fetch('https://example.com/reports/reports/{reportId}/states',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.state.info+json',
'Accept': 'application/vnd.sas.report.state.info+json'
}
r = requests.post('https://example.com/reports/reports/{reportId}/states', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.state.info+json"},
"Accept": []string{"application/vnd.sas.report.state.info+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reports/reports/{reportId}/states", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /reports/{reportId}/states
Creates a new report state.
Body parameter
{
"label": "Test New Report State",
"primary": true,
"reportModifiedTimeStamp": "2018-03-02T19:33:41.124Z"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
body | body | newReportState | true | 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. |
Example responses
201 Response
{
"id": "126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"userId": "user1",
"label": "Primary",
"primary": true,
"reportModifiedTimeStamp": "2021-05-10T22:31:33.400Z",
"createdBy": "user1",
"creationTimeStamp": "2021-05-13T15:01:28.708Z",
"modifiedBy": "user5",
"modifiedTimeStamp": "2021-05-13T15:01:29.055Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"type": "application/vnd.sas.report.state.info",
"responseType": "application/vnd.sas.report.state.info"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"version": 1
}
Bad Request. The input report state was not valid.
{
"errorCode\"": 0,
"message": "An error occurred.",
"details": [
"traceId: 03b5f0c710eca2d6",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states"
],
"version": 2,
"httpStatusCode": 400
}
Report does not exist.
{
"errorCode": 0,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | New report state created. ETag header is returned. See Conditional operations . |
reportState |
400 | Bad Request | Bad Request. The input report state was not valid. | error2 |
404 | Not Found | Report does not exist. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | The URI of the newly created resource. | |
201 | ETag | string | A tag that identifies this revision of the resource. | |
201 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Check report state status
Code samples
# You can also use wget
curl -X HEAD https://example.com/reports/reports/{reportId}/states/{stateId}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/reports/reports/{reportId}/states/{stateId}',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/reports/reports/{reportId}/states/{stateId}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/reports/reports/{reportId}/states/{stateId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /reports/{reportId}/states/{stateId}
Returns the headers for a report state, including ETag
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
stateId | path | string(object-id) | true | Report state id to check. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Check status was successful. | None |
404 | Not Found | Report or report state does not exist. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Get report state
Code samples
# You can also use wget
curl -X GET https://example.com/reports/reports/{reportId}/states/{stateId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.report.state.info+json'
const headers = {
'Accept':'application/vnd.sas.report.state.info+json'
};
fetch('https://example.com/reports/reports/{reportId}/states/{stateId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.report.state.info+json'
}
r = requests.get('https://example.com/reports/reports/{reportId}/states/{stateId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.report.state.info+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/reports/{reportId}/states/{stateId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reports/{reportId}/states/{stateId}
Returns the specified report state, including ETag header. See Conditional operations
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Identifier of the report. |
stateId | path | string(object-id) | true | Report state id to get. |
Example responses
200 Response
{
"id": "126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"userId": "user1",
"label": "Primary",
"primary": true,
"reportModifiedTimeStamp": "2021-05-10T22:31:33.400Z",
"createdBy": "user1",
"creationTimeStamp": "2021-05-13T15:01:28.708Z",
"modifiedBy": "user5",
"modifiedTimeStamp": "2021-05-13T15:01:29.055Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"type": "application/vnd.sas.report.state.info",
"responseType": "application/vnd.sas.report.state.info"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"version": 1
}
Report or report state does not exist.
{
"errorCode": 0,
"message": "An error occurred. The resource could not be found. Identifier: 412f6f71-64eb-4840-a6a5-9a8e18fcad74.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns the report state. ETag header is included. | reportState |
404 | Not Found | Report or report state does not exist. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the object. | |
200 | Last-Modified | string | The last modified timestamp of the object. |
Delete report state
Code samples
# You can also use wget
curl -X DELETE https://example.com/reports/reports/{reportId}/states/{stateId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/reports/reports/{reportId}/states/{stateId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('https://example.com/reports/reports/{reportId}/states/{stateId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/reports/reports/{reportId}/states/{stateId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /reports/{reportId}/states/{stateId}
Deletes the specified report state.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
stateId | path | string(object-id) | true | Report state id to check. |
Example responses
Report or report state does not exist.
{
"errorCode": 0,
"message": "An error occurred. The resource could not be found. Identifier: 412f6f71-64eb-4840-a6a5-9a8e18fcad74.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Report state was deleted. | None |
404 | Not Found | Report or report state does not exist. | error2 |
Update report state
Code samples
# You can also use wget
curl -X PUT https://example.com/reports/reports/{reportId}/states/{stateId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.state.info+json' \
-H 'Accept: application/vnd.sas.report.state.info+json' \
-H 'If-Match: string' \
-H 'If-Unmodified-Since: string'
const inputBody = '{
"id": "412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"label": "Test Updated Report State",
"primary": true,
"reportModifiedTimeStamp": "2018-03-02T19:33:41.124Z"
}';
const headers = {
'Content-Type':'application/vnd.sas.report.state.info+json',
'Accept':'application/vnd.sas.report.state.info+json',
'If-Match':'string',
'If-Unmodified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}/states/{stateId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.state.info+json',
'Accept': 'application/vnd.sas.report.state.info+json',
'If-Match': 'string',
'If-Unmodified-Since': 'string'
}
r = requests.put('https://example.com/reports/reports/{reportId}/states/{stateId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.state.info+json"},
"Accept": []string{"application/vnd.sas.report.state.info+json"},
"If-Match": []string{"string"},
"If-Unmodified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/reports/reports/{reportId}/states/{stateId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /reports/{reportId}/states/{stateId}
Updates the specified report state. Either an If-Match
or If-Unmodified-Since
request header is required. See Conditional operations
.
Body parameter
{
"id": "412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"label": "Test Updated Report State",
"primary": true,
"reportModifiedTimeStamp": "2018-03-02T19:33:41.124Z"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
stateId | path | string(object-id) | true | Report state id to check. |
If-Match | header | 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 | header | string | false | The value of the modifiedTimeStamp of the resource. If the resource has been updated since this time, the update will fail. |
body | body | updateReportState | true | Report state to update. A full report state can be included, but only the label and primary are used to update the report state. |
Example responses
200 Response
{
"id": "126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"userId": "user1",
"label": "Primary",
"primary": true,
"reportModifiedTimeStamp": "2021-05-10T22:31:33.400Z",
"createdBy": "user1",
"creationTimeStamp": "2021-05-13T15:01:28.708Z",
"modifiedBy": "user5",
"modifiedTimeStamp": "2021-05-13T15:01:29.055Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"type": "application/vnd.sas.report.state.info",
"responseType": "application/vnd.sas.report.state.info"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"version": 1
}
Bad Request. The input report state was not valid.
{
"errorCode\"": 0,
"message": "An error occurred.",
"details": [
"traceId: 03b5f0c710eca2d6",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 400
}
Report or report state does not exist or the report state belongs to another user.
{
"errorCode\"": 0,
"message": "An error occurred. The user does not have permission to access the resouirce.",
"details": [
"traceId: 03b5f0c710eca2d6",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 403
}
An error for report state is found but with mismatched ETag.
{
"errorCode": 0,
"message": "An error occurred. The action could not be performed. The provided resource is not the most current.",
"details": [
"traceId: ded22333af820cae",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 412
}
An error for report state content is found but with mismatched ETag.
{
"errorCode": 0,
"message": "An error occurred. The action could not be performed: at least one header of the type 'If-Match' or 'If-Unmodified-Since' is required.",
"details": [
"traceId: fbcfd5f6cb5b4dc6",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 428
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Report state was updated. | reportState |
400 | Bad Request | Bad Request. The input report state was not valid. | error2 |
403 | Forbidden | Report or report state does not exist or the report state belongs to another user. | error2 |
412 | Precondition Failed | The ETag (If-Match) provided did not match the current version of the object, or the last modified date did not match. | error2 |
428 | Precondition Required | The ETag (If-Match), or the last modified date was not provided when updating the report state. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
ReportStateContent
The operations for the report state content resource.
Check report state content status
Code samples
# You can also use wget
curl -X HEAD https://example.com/reports/reports/{reportId}/states/{stateId}/content \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept-Language: string' \
-H 'If-None-Match: string' \
-H 'If-Modified-Since: string'
const headers = {
'Accept-Language':'string',
'If-None-Match':'string',
'If-Modified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}/states/{stateId}/content',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept-Language': 'string',
'If-None-Match': 'string',
'If-Modified-Since': 'string'
}
r = requests.head('https://example.com/reports/reports/{reportId}/states/{stateId}/content', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept-Language": []string{"string"},
"If-None-Match": []string{"string"},
"If-Modified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/reports/reports/{reportId}/states/{stateId}/content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /reports/{reportId}/states/{stateId}/content
Returns the headers for a report state content, including ETag
. See Conditional operations
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
stateId | path | string(object-id) | true | Report state id to check. |
Accept-Language | header | string | false | Optional header. If present, the locale it represents is used in processing, sorting, and filtering. |
If-None-Match | header | string | false | The ETag that was returned from a GET , POST , PUT , or HEAD of this resource. If the ETag matches, the operation will not proceed. |
If-Modified-Since | header | string | false | The value of the modifiedTimeStamp the resource. If the resource has not been updated since this time, the operation will not proceed. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Check status operation was successful. | None |
304 | Not Modified | The caller has the most current object. | None |
404 | Not Found | Report, report state or their content does not exist. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
|
200 | Content-Language | string | This header represents the locale of the result. It may not be present if there is issue during localization, in which case the result is what is persisted. |
Get report state content
Code samples
# You can also use wget
curl -X GET https://example.com/reports/reports/{reportId}/states/{stateId}/content \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.report.content+json' \
-H 'Accept-Language: string' \
-H 'If-None-Match: string' \
-H 'If-Modified-Since: string'
const headers = {
'Accept':'application/vnd.sas.report.content+json',
'Accept-Language':'string',
'If-None-Match':'string',
'If-Modified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}/states/{stateId}/content',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.report.content+json',
'Accept-Language': 'string',
'If-None-Match': 'string',
'If-Modified-Since': 'string'
}
r = requests.get('https://example.com/reports/reports/{reportId}/states/{stateId}/content', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.report.content+json"},
"Accept-Language": []string{"string"},
"If-None-Match": []string{"string"},
"If-Modified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/reports/{reportId}/states/{stateId}/content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reports/{reportId}/states/{stateId}/content
Returns the report state content, including ETag
. See Conditional operations
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
stateId | path | string(object-id) | true | Report state id to check. |
Accept-Language | header | string | false | Optional header. If present, the locale it represents is used in processing, sorting, and filtering. |
If-None-Match | header | string | false | The ETag that was returned from a GET , POST , PUT , or HEAD of this resource. If the ETag matches, the operation will not proceed. |
If-Modified-Since | header | string | false | The value of the modifiedTimeStamp the resource. If the resource has not been updated since this time, the operation will not proceed. |
Example responses
200 Response
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report State",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<SASReport>
<label>Small Report State</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<Results/>
<DataDefinitions/>
<VisualElements/>
<PromptDefinitions/>
<View>
<Sections>
<Section>
<name>vi1</name>
<label>Section1</label>
<Body>
<MediaContainer>
<target>mt111</target>
<RelativeLayout/>
</MediaContainer>
</Body>
</Section>
</Sections>
</View>
<Interactions/>
<MediaDefinitionResource>
<file>/files/files/0499563b-9425-42ab-b6e2-d99804e54299</file>
</MediaDefinitionResource>
<MediaSchemes>
<MediaScheme>
<name>ms201</name>
</MediaScheme>
</MediaSchemes>
<MediaTargets>
<MediaTarget>
<name>mt111</name>
<scheme>ms201</scheme>
<definition>table-1280x768</definition>
</MediaTarget>
</MediaTargets>
</SASReport>
Report, report state, or their content does not exist.
{
"errorCode": 0,
"message": "An error occurred. The resource could not be found. Identifier: 8559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Report state content. | reportStateContentXml |
304 | Not Modified | The caller has the most current resource. | None |
404 | Not Found | Report, report state, or their content does not exist. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
|
200 | Content-Language | string | This header represents the locale of the result. It may not be present if there is issue during localization, in which case the result is what is persisted. |
Save report state content
Code samples
# You can also use wget
curl -X PUT https://example.com/reports/reports/{reportId}/states/{stateId}/content \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.content+json' \
-H 'Accept: application/vnd.sas.error+json' \
-H 'If-Match: string' \
-H 'If-Unmodified-Since: string'
const inputBody = '{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report State",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}';
const headers = {
'Content-Type':'application/vnd.sas.report.content+json',
'Accept':'application/vnd.sas.error+json',
'If-Match':'string',
'If-Unmodified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}/states/{stateId}/content',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.content+json',
'Accept': 'application/vnd.sas.error+json',
'If-Match': 'string',
'If-Unmodified-Since': 'string'
}
r = requests.put('https://example.com/reports/reports/{reportId}/states/{stateId}/content', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.content+json"},
"Accept": []string{"application/vnd.sas.error+json"},
"If-Match": []string{"string"},
"If-Unmodified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/reports/reports/{reportId}/states/{stateId}/content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /reports/{reportId}/states/{stateId}/content
Saves the report state content. Does not return the stored state content. An ETag
is not required for the initial save, but is required for all subsequent saves. In some situations where Accept
type header is automatically generated, setting it to '*/*' will achieve the same effect as not including it. See Conditional operations
.
Body parameter
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report State",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<reportStateContentJson element="SASReport">
<xmlns>http://www.sas.com/sasreportmodel/bird-4.3.0</xmlns>
<label>Small Report State</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<view element="View">
<sections element="Section">
<name>vi1</name>
<label>Section1</label>
<body element="Body">
<mediaContainerList element="MediaContainer">
<target>mt111</target>
<layout element="ResponsiveLayout"/>
</mediaContainerList>
</body>
<mediaSchemes element="MediaScheme">
<name>ms201</name>
</mediaSchemes>
<mediaTargets element="MediaTarget">
<name>mt111</name>
<scheme">ms201</scheme">
</mediaTargets>
</sections>
</view>
</reportStateContentJson>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
stateId | path | string(object-id) | true | Report state id to check. |
If-Match | header | 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 | header | string | false | The value of the modifiedTimeStamp of the resource. If the resource has been updated since this time, the update will fail. |
body | body | reportStateContentJson | true | The report state content to be saved. |
Example responses
Bad Request. The input report state content was not valid.
{
"errorCode\"": 0,
"message": "An error occurred.",
"details": [
"traceId: 03b5f0c710eca2d6",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content"
],
"version": 2,
"httpStatusCode": 400
}
Report state or report state content does not exist.
{
"errorCode": 0,
"message": "An error occurred. The resource could not be found. Identifier: 8559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content"
],
"version": 2,
"httpStatusCode": 404
}
An error for report state is found but with mismatched ETag.
{
"errorCode": 0,
"message": "An error occurred. The action could not be performed. The provided resource is not the most current.",
"details": [
"traceId: ded22333af820cae",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 412
}
An error for report state content is found but with mismatched ETag.
{
"errorCode": 0,
"message": "An error occurred. The action could not be performed: at least one header of the type 'If-Match' or 'If-Unmodified-Since' is required.",
"details": [
"traceId: fbcfd5f6cb5b4dc6",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 428
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Report state content was stored. | None |
400 | Bad Request | Bad Request. The input report state content was not valid. | error2 |
404 | Not Found | Report state or report state content does not exist. | error2 |
412 | Precondition Failed | The ETag (If-Match) provided did not match the current version of the object, or the last modified date did not match. | error2 |
428 | Precondition Required | The ETag (If-Match), or the last modified date was not provided when updating the report state content. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
204 | ETag | string | A tag that identifies this revision of the resource. | |
204 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Store and return report state content
Code samples
# You can also use wget
curl -X PUT https://example.com/reports/reports/{reportId}/states/{stateId}/content#updateReportStateContentWithReturn \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.content+json' \
-H 'Accept: application/vnd.sas.report.content+json' \
-H 'If-Match: string' \
-H 'If-Unmodified-Since: string'
const inputBody = '{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report State",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}';
const headers = {
'Content-Type':'application/vnd.sas.report.content+json',
'Accept':'application/vnd.sas.report.content+json',
'If-Match':'string',
'If-Unmodified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}/states/{stateId}/content#updateReportStateContentWithReturn',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.content+json',
'Accept': 'application/vnd.sas.report.content+json',
'If-Match': 'string',
'If-Unmodified-Since': 'string'
}
r = requests.put('https://example.com/reports/reports/{reportId}/states/{stateId}/content#updateReportStateContentWithReturn', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.content+json"},
"Accept": []string{"application/vnd.sas.report.content+json"},
"If-Match": []string{"string"},
"If-Unmodified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/reports/reports/{reportId}/states/{stateId}/content#updateReportStateContentWithReturn", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /reports/{reportId}/states/{stateId}/content
Saves and returns the report state content. An ETag
is not required for the initial save, but required for all subsequent saves. See Conditional operations
. A different response code is returned depending on whether the request is for the initial save or a subsequent save.
Body parameter
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report State",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<reportStateContentJson element="SASReport">
<xmlns>http://www.sas.com/sasreportmodel/bird-4.3.0</xmlns>
<label>Small Report State</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<view element="View">
<sections element="Section">
<name>vi1</name>
<label>Section1</label>
<body element="Body">
<mediaContainerList element="MediaContainer">
<target>mt111</target>
<layout element="ResponsiveLayout"/>
</mediaContainerList>
</body>
<mediaSchemes element="MediaScheme">
<name>ms201</name>
</mediaSchemes>
<mediaTargets element="MediaTarget">
<name>mt111</name>
<scheme">ms201</scheme">
</mediaTargets>
</sections>
</view>
</reportStateContentJson>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
stateId | path | string(object-id) | true | Report state id to check. |
If-Match | header | 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 | header | string | false | The value of the modifiedTimeStamp of the resource. If the resource has been updated since this time, the update will fail. |
body | body | reportStateContentJson | true | The report state content to be saved. |
Example responses
200 Response
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report State",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<SASReport>
<label>Small Report State</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<Results/>
<DataDefinitions/>
<VisualElements/>
<PromptDefinitions/>
<View>
<Sections>
<Section>
<name>vi1</name>
<label>Section1</label>
<Body>
<MediaContainer>
<target>mt111</target>
<RelativeLayout/>
</MediaContainer>
</Body>
</Section>
</Sections>
</View>
<Interactions/>
<MediaDefinitionResource>
<file>/files/files/0499563b-9425-42ab-b6e2-d99804e54299</file>
</MediaDefinitionResource>
<MediaSchemes>
<MediaScheme>
<name>ms201</name>
</MediaScheme>
</MediaSchemes>
<MediaTargets>
<MediaTarget>
<name>mt111</name>
<scheme>ms201</scheme>
<definition>table-1280x768</definition>
</MediaTarget>
</MediaTargets>
</SASReport>
Bad Request. The input report state content was not valid.
{
"errorCode\"": 0,
"message": "An error occurred.",
"details": [
"traceId: 03b5f0c710eca2d6",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content"
],
"version": 2,
"httpStatusCode": 400
}
Report state or report state content does not exist.
{
"errorCode": 0,
"message": "An error occurred. The resource could not be found. Identifier: 8559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content"
],
"version": 2,
"httpStatusCode": 404
}
An error for report state is found but with mismatched ETag.
{
"errorCode": 0,
"message": "An error occurred. The action could not be performed. The provided resource is not the most current.",
"details": [
"traceId: ded22333af820cae",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 412
}
An error for report state content is found but with mismatched ETag.
{
"errorCode": 0,
"message": "An error occurred. The action could not be performed: at least one header of the type 'If-Match' or 'If-Unmodified-Since' is required.",
"details": [
"traceId: fbcfd5f6cb5b4dc6",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 428
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The report state content was updated. | reportStateContentXml |
201 | Created | Report state content was created. | reportStateContentXml |
400 | Bad Request | Bad Request. The input report state content was not valid. | error2 |
404 | Not Found | Report state or report state content does not exist. | error2 |
412 | Precondition Failed | The ETag (If-Match) provided did not match the current version of the object, or the last modified date did not match. | error2 |
428 | Precondition Required | The ETag (If-Match), or the last modified date was not provided when updating the report state content. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
|
201 | ETag | string | A tag that identifies this revision of the resource. | |
201 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Schemas
reportApi
{
"version": "1",
"links": [
{
"method": "GET",
"rel": "reports",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.summary+json"
},
{
"method": "POST",
"rel": "createReport",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "POST",
"rel": "validateName",
"href": "/reports/validations/name",
"uri": "/reports/validations/name"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/content/validation",
"uri": "/reports/content/validation",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content.validation"
}
]
}
API
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
API | api | false | none | The list of links to top-level resources and operations available from the root of the API. |
newReport
{
"name": "TEST New Report",
"description": "TEST New Description"
}
New Report
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The localizable report name. |
description | string | false | none | The localizable report description. |
updateReport
{
"id": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Update Report",
"description": "TEST New Description"
}
Update Report
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(object-id) | false | none | Report id. |
name | string | false | none | The localizable report name. |
description | string | false | none | The localizable report description. |
reportCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"description": "Description of a sample report.",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "user1",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "user1",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"imageUris": {
"icon": "/reports/icons/report.gif"
},
"version": 1
}
]
}
Report Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Report Collection | any | false | none | A collection of reports. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | baseCollection2 | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [report] | false | none | The array of report representations. |
report
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"description": "Description of a sample report.",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "user1",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "user1",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"imageUris": {
"icon": "/reports/icons/report.gif"
},
"version": 1
}
Report
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(object-id) | false | none | unique identifier of the report |
name | string | true | none | name of the report |
description | string | false | none | description of the report. |
creationTimeStamp | string(date-time) | false | none | date and time when the report was created |
createdBy | string | false | none | the user who created the report |
modifiedTimeStamp | string(date-time) | false | none | date and time when the report was modified |
modifiedBy | string | false | none | the user who modified the report |
links | [link] | false | none | a set of links to related resources or operations |
imageUris | object | false | none | none |
» additionalProperties | string | false | none | none |
» icon | string | true | none | none |
version | integer | false | none | media type's schema version number |
reportSummary
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"createdBy": "user1",
"creationTimeStamp": "2020-12-09T13:22:11.394Z",
"modifiedBy": "user1",
"modifiedTimeStamp": "2020-12-09T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf"
}
],
"type": "report",
"iconUri": "/reports/icons/report.gif",
"version": "1"
}
Resource Summary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Resource Summary | summary | false | none | The summarized representation of a resource. Often used in collection responses when more specific details aren't needed. |
reportContentJson
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
Report Content JSON
Properties
None
reportContentXml
{
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"Results": {},
"DataDefinitions": {},
"VisualElements": {},
"PromptDefinitions": {},
"View": {
"Sections": {
"Section": {
"name": "vi1",
"label": "Section1",
"Body": {
"MediaContainer": {
"target": "mt111",
"RelativeLayout": {}
}
}
}
}
},
"Interactions": {},
"MediaDefinitionResource": {
"file": "/files/files/0499563b-9425-42ab-b6e2-d99804e54299"
},
"MediaSchemes": {
"MediaScheme": {
"name": "ms201"
}
},
"MediaTargets": {
"MediaTarget": {
"name": "mt111",
"scheme": "ms201",
"definition": "table-1280x768"
}
}
}
Report Content XML
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
label | string | false | none | none |
dateCreated | string | false | none | none |
dateModified | string | false | none | none |
Results | object | false | none | none |
DataDefinitions | object | false | none | none |
VisualElements | object | false | none | none |
PromptDefinitions | object | false | none | none |
View | object | false | none | none |
» Sections | object | false | none | none |
»» Section | object | false | none | none |
»»» name | any | false | none | none |
»»» label | any | false | none | none |
»»» Body | object | false | none | none |
»»»» MediaContainer | object | false | none | none |
»»»»» target | any | false | none | none |
»»»»» RelativeLayout | object | false | none | none |
Interactions | object | false | none | none |
MediaDefinitionResource | object | false | none | none |
» file | any | false | none | none |
MediaSchemes | object | false | none | none |
» MediaScheme | object | false | none | none |
»» name | any | false | none | none |
MediaTargets | object | false | none | none |
» MediaTarget | object | false | none | none |
»» name | any | false | none | none |
»» scheme | any | false | none | none |
»» definition | any | false | none | none |
reportContentValidation
{
"level": "schemaInvalid",
"schema": "bird-4.1.2.xsd",
"messages": [
{
"type": "schemaError",
"message": "Line 89: Value 'binder' is not facet-valid with respect to enumeration '[column, page]'. It must be a value from the enumeration."
},
{
"type": "schemaError",
"message": "Line 89: The value 'binder' of attribute 'type' on element 'Axis' is not valid with respect to its type, 'relationalAxisTypeEnum'."
}
],
"version": 1
}
Report Content Validation
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
level | string | true | none | The level of the report content validation. Valid values are schemaInvalid and schemaValid . |
schema | string | true | none | The schema used for the report content validation. |
messages | [any] | false | none | The messages generated for the report content validation. |
» type | string | false | none | The type of validation error. Valid values are schemaFatal and schemaError . |
» message | string | false | none | The message of validation error. |
version | integer | false | none | The version number of the report content validation representation. This representation is version 1. |
reportVersionCollection
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/reports/versions",
"uri": "/reports/versions",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/reports/versions?sortBy=name&start=0&limit=20",
"uri": "/reports/versions?sortBy=name&start=0&limit=20",
"type": "application/vnd.sas.collection"
}
],
"name": "report-versions",
"accept": "application/vnd.sas.report.version",
"start": "0",
"count": "2",
"items": [
{
"schema": "4.0.2",
"mediaType": "1",
"version": "1"
},
{
"schema": "4.4.0",
"mediaType": "9",
"version": "1"
}
],
"limit": "20",
"version": "2"
}
Report Version Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Report Version Collection | any | false | none | A collection of report versions. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | baseCollection2 | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [reportVersion] | false | none | The array of report versions. |
reportVersion
{
"schema": "4.3.0",
"mediaType": 8,
"version": 1
}
Report Version
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
schema | string | true | none | The major.minor.patch of this report version representation. |
mediaType | integer | true | none | The media type version of the report version representation. |
version | integer | true | none | The version number of the report version representation. This representation is version 1. |
reportContentElementsCollection
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/content/elements",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/content/elements",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "GET",
"rel": "up",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5",
"type": "application/vnd.sas.report"
}
],
"name": "reportContentElements",
"accept": "application/vnd.sas.report.content.element",
"count": "3",
"items": [
{
"name": "vi6",
"label": "Migration Timeline",
"type": "Section",
"version": 1
},
{
"name": "vi357",
"label": "EG Project Status",
"type": "HiddenSection",
"version": 1
},
{
"name": "ve27",
"label": "Import details for EG projects",
"type": "Table",
"version": 1
}
],
"version": 2
}
Report Content Elements Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Report Content Elements Collection | any | false | none | A collection of report content elements. |
oneOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | any | false | none | none |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | baseCollection2 | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | none |
»» items | [reportContentElement] | false | none | The array of report content element representations. |
xor
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | any | false | none | none |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | baseCollection2 | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | none |
»» items | [reportContentElement2] | false | none | The array of report content element representations. |
reportStateCollection
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states?filter=and(eq(report.id,'8559a118-139b-46e4-adea-97198d9068f5'),eq(userId,'user1'))&sortBy=label&start=0&limit=20",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states?filter=and(eq(report.id,'8559a118-139b-46e4-adea-97198d9068f5'),eq(userId,'user1'))&sortBy=label&start=0&limit=20",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "createReportState",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states",
"type": "application/vnd.sas.report.state.info",
"responseType": "application/vnd.sas.report.state.info"
}
],
"name": "reportStates",
"accept": "application/vnd.sas.report.state.info",
"count": "1",
"items": [
{
"id": "cb237e1b-b11f-42fb-960c-a48a0c5b1688",
"label": "2020Timeline",
"userId": "user1",
"primary": "true",
"reportModifiedTimeStamp": "2018-03-02T19:33:41.124Z",
"creationTimeStamp": "2018-03-02T19:41:55.314Z",
"createdBy": "user1",
"modifiedTimeStamp": "2018-03-02T19:41:55.314Z",
"modifiedBy": "user5",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"uri": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"uri": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"type": "application/vnd.sas.report.state.info",
"responseType": "application/vnd.sas.report.state.info"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"uri": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content",
"uri": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content",
"type": "application/vnd.sas.report.state"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content",
"uri": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content",
"type": "application/vnd.sas.report.state",
"responseType": "application/vnd.sas.report.stat"
}
]
}
],
"version": "2"
}
Report State Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Report State Collection | any | false | none | A collection of report states. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | baseCollection2 | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [reportState] | false | none | The array of report state representations. |
newReportState
{
"label": "Test New Report State",
"primary": true,
"reportModifiedTimeStamp": "2018-03-02T19:33:41.124Z"
}
New Report State
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
label | string | false | none | The report state label. |
primary | boolean | false | none | 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 | none | The time stamp of the associated report when the report state was created. |
reportState
{
"id": "126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"userId": "user1",
"label": "Primary",
"primary": true,
"reportModifiedTimeStamp": "2021-05-10T22:31:33.400Z",
"createdBy": "user1",
"creationTimeStamp": "2021-05-13T15:01:28.708Z",
"modifiedBy": "user5",
"modifiedTimeStamp": "2021-05-13T15:01:29.055Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"type": "application/vnd.sas.report.state.info",
"responseType": "application/vnd.sas.report.state.info"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"version": 1
}
Report State
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The string ID for the report state. |
label | string | true | none | The label for the report state. |
userId | string | false | none | The user ID associated with the report state. |
primary | boolean | false | none | The flag which indicates whether or not this report state is the one to be applied when the request does not explicitly specify the ID for a given user-report combination. |
reportModifiedTimeStamp | string(date-time) | true | none | The time stamp of the associated report when the report state was created. |
creationTimeStamp | string(date-time) | false | none | The time stamp when the report state was created. |
createdBy | string | false | none | The user ID who created the report state. |
modifiedTimeStamp | string(date-time) | false | none | The time stamp when the report state properties was modified. |
modifiedBy | string | false | none | The user ID who modified the report state. |
links | [link] | false | none | The links that apply to the report state. |
version | integer | false | none | The version number of the report state representation. This representation is version 1. |
updateReportState
{
"id": "412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"label": "Test Updated Report State",
"primary": true,
"reportModifiedTimeStamp": "2018-03-02T19:33:41.124Z"
}
Update Report State
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(object-id) | false | none | Report state id. |
label | string | false | none | The report state label. |
primary | boolean | false | none | 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 | none | The time stamp of the associated report when the report state was created. |
reportStateContentJson
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report State",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
Report Content JSON
Properties
None
reportStateContentXml
{
"label": "Small Report State",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"Results": {},
"DataDefinitions": {},
"VisualElements": {},
"PromptDefinitions": {},
"View": {
"Sections": {
"Section": {
"name": "vi1",
"label": "Section1",
"Body": {
"MediaContainer": {
"target": "mt111",
"RelativeLayout": {}
}
}
}
}
},
"Interactions": {},
"MediaDefinitionResource": {
"file": "/files/files/0499563b-9425-42ab-b6e2-d99804e54299"
},
"MediaSchemes": {
"MediaScheme": {
"name": "ms201"
}
},
"MediaTargets": {
"MediaTarget": {
"name": "mt111",
"scheme": "ms201",
"definition": "table-1280x768"
}
}
}
Report State Content XML
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
label | string | false | none | none |
dateCreated | string | false | none | none |
dateModified | string | false | none | none |
Results | object | false | none | none |
DataDefinitions | object | false | none | none |
VisualElements | object | false | none | none |
PromptDefinitions | object | false | none | none |
View | object | false | none | none |
» Sections | object | false | none | none |
»» Section | object | false | none | none |
»»» name | any | false | none | none |
»»» label | any | false | none | none |
»»» Body | object | false | none | none |
»»»» MediaContainer | object | false | none | none |
»»»»» target | any | false | none | none |
»»»»» RelativeLayout | object | false | none | none |
Interactions | object | false | none | none |
MediaDefinitionResource | object | false | none | none |
» file | any | false | none | none |
MediaSchemes | object | false | none | none |
» MediaScheme | object | false | none | none |
»» name | any | false | none | none |
MediaTargets | object | false | none | none |
» MediaTarget | object | false | none | none |
»» name | any | false | none | none |
»» scheme | any | false | none | none |
»» definition | any | false | none | none |
transferDependencies
{
"uri": "https://example.com",
"version": 0,
"name": "string",
"dependentUris": [
"string"
]
}
Transfer Dependencies
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
uri | string(uri) | false | none | The URI of the object whose dependencies are being provided. |
version | integer | false | none | This media type's schema version number. This representation is version 1. |
name | string | false | none | The name of the object whose dependencies are being provided. |
dependentUris | [string] | false | none | none |
reportContentElement2
{
"name": "ve38",
"label": "Bar Chart 1",
"type": "Graph",
"subType": "BoxPlot",
"parent": "VisualElement",
"hidden": false,
"version": 2
}
Report content element
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The name for the report content element. |
label | string | false | none | The label for the report content element. |
type | string | false | none | The type of the report content element. |
subType | string | false | none | The sub-type of the report content element. |
parent | string | false | none | The parent of the report content element. |
hidden | boolean | false | none | Whether the report content element is hidden. |
version | integer | false | none | The version number of the report content element representation. This representation is version 2. |
error2
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Error
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
message | string | false | none | The message for the error. |
id | string | false | none | The string ID for the error. |
errorCode | integer | false | none | The numeric ID for the error. |
httpStatusCode | integer | true | none | The HTTP status code for the error. |
details | [string] | false | none | Messages that provide additional details about the cause of the error. |
remediation | string | false | none | A message that describes how to resolve the error. |
errors | [error2] | false | none | Any additional errors that occurred. |
links | [link] | false | none | The links that apply to the error. |
version | integer | true | none | The version number of the error representation. This representation is version 2. |
api
{
"version": 1,
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
API
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer | true | none | The version number of the API representation. This is version 1. |
links | [link] | true | none | The API's top-level links. |
summary
{
"id": "string",
"name": "string",
"type": "string",
"description": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Resource Summary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | none | The unique identifier for the resource. |
name | string | false | none | The name of the resource. |
type | string | false | none | The type of the resource. |
description | string | false | none | The description of the resource. |
createdBy | string | false | none | The user who created the resource. |
creationTimeStamp | string(date-time) | false | none | The timestamp in YYYY-MM-DDThh:mm:ss.sssZ format when the resource was created. |
modifiedBy | string | false | none | The user who most recently modified the resource. |
modifiedTimeStamp | string(date-time) | false | none | The timestamp in YYYY-MM-DDThh:mm:ss.sssZ format when the resource was last modified. |
links | [link] | true | none | The links that apply to the resource. |
version | integer | true | none | The version number of the resource. This representation is version 1. |
baseCollection2
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Base Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the collection. |
start | integer(int64) | false | none | The zero-based index of the first item in the collection. |
limit | integer | false | none | The number of items that were requested for the collection. |
count | integer(int64) | false | none | If populated indicates the number of items in the collection. |
accept | string | false | none | A space-delimited list of media types from which an Accept header may be constructed. |
links | [link] | false | none | The links that apply to the collection. |
version | integer | false | none | The version number of the collection representation. This representation is version 2. |
relationship
{
"id": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"resourceUri": "https://example.com",
"referenceId": "string",
"type": "string",
"relatedResourceUri": "https://example.com",
"relatedReferenceId": "string",
"source": "https://example.com",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Relationship
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | System-assigned unique ID for this object. |
createdBy | string | false | none | The id of the user who created the relationship. |
creationTimeStamp | string(date-time) | false | none | The date and time that the relationship was created. |
modifiedBy | string | false | none | The id of the last user who modified the relationship. |
modifiedTimeStamp | string(date-time) | false | none | The date and time that the relationship was last modified. |
resourceUri | string(uri) | true | none | The URI of the subject resource of this relationship. |
referenceId | string | false | none | The id of the reference for the subject resource. |
type | string | true | none | The id of this relationship type. |
relatedResourceUri | string(uri) | true | none | The URI of the related resource of this relationship. |
relatedReferenceId | string | false | none | The id of the reference for the related resource. |
source | string(uri) | false | none | The source of this relationship. Typically the URI of the resource that manages this relationship. |
links | [link] | false | none | Zero or more links to related resources or operations. |
version | integer | false | none | This media type's schema version number. This representation is version 1. |
indexableData
{
"version": 0,
"properties": [
{
"name": "string",
"value": "string"
}
],
"resourceUri": "string",
"sasType": "string"
}
Indexable representation
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer | false | none | The version number of Search Indexable data representation. This is version 1. |
properties | [nameValuePair] | true | none | Set of attributes which needs to be indexed |
resourceUri | string | true | none | The object id of the content object.This is a mandatory field which typeowner needs to provide as this would be used to populate Primary key while indexing data. |
sasType | string | true | none | The sasType of the representation. |
transferObject
{
"id": "string",
"version": 0,
"summary": {
"id": "string",
"name": "string",
"type": "string",
"description": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"content": {},
"fileServiceContent": "string",
"connectors": [
{
"id": "string",
"name": "string",
"version": 0,
"uri": "string",
"contentType": "string",
"type": "string",
"hints": [
"string"
]
}
],
"substitutions": {},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
Transfer Object
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(object-id) | false | none | unique identifier of the object |
version | integer | false | none | This media type's schema version number. This representation is version 1. |
summary | summary | false | none | The summarized representation of a resource. Often used in collection responses when more specific details aren't needed. |
content | object | false | none | optional. Choose this or fileServiceContent. This is the content object that must be serialized in a format that is valid for internet transmission. This includes valid encoding formats like Base64 or data structures like JSON. This is provided by the content provider and the transfer service expects no visibility into or understanding of this value. |
fileServiceContent | string | false | none | optional. Choose this or content. This holds the URI of a file service object that contains the transferrable object. |
connectors | [transferObjectConnector] | false | none | a list of associations or references to other external objects to be recreated on import |
substitutions | object | false | none | map with keys of parameter and value. Used to replace the value of parameter with the value of value |
links | [link] | false | none | Paging links that apply to this object |
reportContentElement
{
"name": "ve38",
"label": "Bar Chart 1",
"type": "Graph",
"version": 1
}
Report content element
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The name for the report content element. |
label | string | false | none | The label for the report content element. |
type | string | false | none | The type of the report content element. |
version | integer | false | none | The version number of the report content element representation. This representation is version 1. |
link
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
Link
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
method | string | false | none | The HTTP method for the link. |
rel | string | true | none | The relationship of the link to the resource. |
uri | string | false | none | The relative URI for the link. |
href | string | false | none | The URL for the link. |
title | string | false | none | The title for the link. |
type | string | false | none | The media type or link type for the link. |
itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
transferObjectConnector
{
"id": "string",
"name": "string",
"version": 0,
"uri": "string",
"contentType": "string",
"type": "string",
"hints": [
"string"
]
}
Transfer Object Connector
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(object-id) | false | none | unique identifier of the object |
name | string | false | none | name of the related object |
version | integer | false | none | transfer object connector version |
uri | string | false | none | the URI of the related object |
contentType | string | false | none | media type of the related object |
type | string | false | none | type of connection. This can be any value the creator of the connection wants but should be used to determine what to do to reconstitute the relationship. |
hints | [string] | false | none | hints that can be used to help find the object to connect to in the target system |
nameValuePair
{
"name": "string",
"value": "string"
}
Property
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | Name of the attribute |
value | string | true | none | Value of the attribute |
Report Images
Base URLs:
- https://example.com/reportImages
Terms of service Email: SAS Developers Web: SAS Developers
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
This API is deprecated as of 2021.2.6 and will be removed in a future release.
Replacement functionality is available in the "visualAnalytics" API and is documented here: https://developer.sas.com/apis/rest/Visualization/#export-svg-image-of-report-or-report-object
The reportImages API delivers SVG images representing elements of a report. The images are suitable to the current user, taking row-level-permissions and other factors into consideration.
Usage Notes
Overview
The Report Images service delivers SVG images that represent either an entire report or elements of a report. Clients that present a view of the folder structure or thumbnails of a report are candidates for using this service.
For example, you want to produce an image that is representative of an entire report. You create a job that returns 'state==running'. Then you poll (following the "self" link) until the job is completed. When completed, the job returns a URI, which is then passed to the browser for rendering.
By default a single image that represents the report is produced at the
requested size. This is equivalent to the option selectionType=report
.
To create one image per section, specify selectionType=perSection
.
Concepts
Asynchronous operation
This service creates an asynchronous job. The output of the job includes the details of each produced image, including a URI that can be used in an HTML IMG tag.
Because the job is asynchronous, a response is returned in a timely fashion. Although job completion is often sub-second, some queries can take longer than you might want to hold a browser request for. This is why the service supports long polling for both the job creation and the subsequent get. While awaiting completion, the request can wait in the service, returning immediately upon completion or timeout.
Caching and Security
Cached images are shared between users with identical data security
rules for the table(s) supporting an image. However, the URL returned to
the user to get the image (link relation image
) is valid only for the
current user. Users should not share URLs.
Direct image mode
For clients that cannot address the job pattern. For example, a link in an email message, it is possible to specify a URL which "directly" returns an image. However, because each call can hold a "browser thread", consumers are urged to use this feature sparingly.
ETag
An entity tag or ETag is an identifier assigned to a specific version of a resource. This service fully supports entity tags. Caching headers encourage the browser to cache the image. Clients that use modern browsers can depend on the browser to handle local caching and ETag handling.
Failure
A single job can generate several images. Some of those images can fail, while other images in the job are successfully generated. A job is only marked "failed" if every image failed. Check each image's state
.
Image size
Because the rendering process takes the actual size into account when
determining how much detail to include, the caller must supply the size
of the requested image, rather than an aspect ratio. The size parameter
has the format of "width x height" (with no spaces), for example:
268x151. This size represents CSS Style pixels
.
Clients can request a single image to represent the report, or one image per section of the report.
Job Deletion
By default, an hour after job creation, a job is available for automatic deletion.
Layout type
thumbnail
(the default) reduces detail to render more suitably at a smaller size.normal
does not reduce detail.entireSection
renders the entire section.
Long Polling
A technique for polling a service for information without the network overhead of continuous polling. In long polling the client requests new information from the service. The service holds the request open until the data is available or the timeout is reached. If the data becomes available, the service sends the data. This technique essentially emulates a server push.
The default timeout is 500 milliseconds; the maximum timeout is 30 seconds.
Paging through images
For reports with multiple sections, the caller can request images for a
subset of the report. The caller indicates the start
index (0 based)
and a limit
on how many images to generate and return. The result
includes a count
that is the total number of images available.
Partial results
The job will quickly return partial results in the "images" array.
The array includes the state
of each image so that the
client can determine if processing for that image is complete.
When the image is available, the results include a link to the image,
and state
is changed to "completed".
Refresh
Specify refresh=true
to bypass all caches and forcibly generate new
results. Because this service achieves much of its performance by
caching and sharing results from users with identical profiles,
refreshing should be considered an exception (not a default for a
client).
Row-level Permissions
The delivery of images respects row-level permissions, so images are always suitable for the current user. And because users with identical restrictions can see the same query results, this service can cache images for sharing while ensuring that the result is appropriate to each user. Clients should not share images; images generated by this service are intended only for the current user.
State
The state of the job, and each image within the job can be one of the following:
pending
running
completed
failed
Images have one additional state that indicates when an
image was not generated because of renderLimit
:
ignored
In such cases, the image details will include a link render
that can
be used to create a job for the image.
States pending
and running
are the non-terminal states for the job;
completed
and failed
are the terminal states.
Terminology
administrator
A user who is a qualifying application administrator
(member of ApplicationAdministrators
).
report
A SAS Visual Analytics Report.
section
A report is divided into one or more sections. The user facing term for section is page
.
SVG
Scalable Vector Graphics (SVG) is an XML-based vector image format for two-dimensional graphics with support for interactivity and animation (see Wikipedia). This service produces only SVG images. Note that SVG
is always in XML
; there is no JSON
equivalent.
stale image
An image that has not been recently updated, but reflects the security considerations for a user.
Error Codes
HTTP Status Code | Error Code | Description |
---|---|---|
400 | 1017 | The value of a required field is invalid (null or too long). |
400 | 22000 | A required parameter was not specified. |
400 | 22001 | Invalid layout type. (Supported are: thumbnail , normal , entireSection .) |
400 | 22002 | Size must be specified. |
400 | 22003 | Invalid section index. |
400 | 22004 | Report table definition error. |
400 | 22005 | Requested element is not a suitable type to render. |
400 | 22006 | Report has no suitable report elements. |
400 | 22007 | Report conversion failure (JSON to XML). |
400 | 22008 | Invalid selection type. (Supported types: report , perSection , visualElements ) |
400 | 22009 | Invalid input. Possible HTML script attack. |
404 | 22010 | Report not found. |
404 | 22011 | Report element not found. |
404 | 22012 | Job not found. |
404 | 22013 | Image ID not found. |
404 | 22014 | Image not found. |
500 | 22020 | Error with service CAS Management. |
500 | 22021 | Error with service CAS Access Management. |
500 | 22022 | Error with service Report Packages. |
500 | 22023 | Error with service Report Renderer. |
500 | 22024 | Unexpected failure generating the image. |
500 | 22025 | Failure generating the report package. |
500 | 22026 | Failure reading report. |
500 | 22027 | Report parse failure. |
500 | 22028 | Table not readable. |
500 | 22029 | Renderer did not return the image. |
500 | 22030 | Renderer did not return the images. |
500 | 22031 | Renderer reported an error. |
500 | 22032 | Image generation interrupted. |
500 | 22033 | Direct Image generation failed. |
500 | 22034 | External service timeout. |
- The following errors apply if the job is created using the thumbnails provider media type (
application/vnd.sas.thumbnails.job.request
).
HTTP Status Code | Error Code | Description |
---|---|---|
400 | 76701 | Resource specified by objectUri member cannot be opened. |
400 | 76703 | The type of the object referenced by the objectUri member is not supported by this service. |
400 | 76704 | Request validation error. |
76705 | Other error encountered by the thumbnail provider. | |
400 | 76706 | Required parameter is missing. |
406 | 76702 | The thumbnail media type this service supplies is not acceptable according to provided acceptItem member. |
Operations
Jobs
Asynchronous jobs for obtaining images.
Get report images via request parameters
Code samples
# You can also use wget
curl -X POST https://example.com/reportImages/jobs#requestParams?reportUri=string&size=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.report.images.job+json' \
-H 'Accept-Language: string' \
-H 'Accept-Locale: string'
const headers = {
'Accept':'application/vnd.sas.report.images.job+json',
'Accept-Language':'string',
'Accept-Locale':'string'
};
fetch('https://example.com/reportImages/jobs#requestParams?reportUri=string&size=string',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.report.images.job+json',
'Accept-Language': 'string',
'Accept-Locale': 'string'
}
r = requests.post('https://example.com/reportImages/jobs#requestParams', params={
'reportUri': 'string', 'size': 'string'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.report.images.job+json"},
"Accept-Language": []string{"string"},
"Accept-Locale": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reportImages/jobs#requestParams", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /jobs
Creates an asynchronous job for obtaining SVG images for the report. To specify report elements to render, use POST /jobs.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportUri | query | string | true | The report from which to generate images. |
layoutType | query | string | false | The type of image to render.
|
selectionType | query | string | false | The selected operation.
|
size | query | string | true | The size of the rendered image. Format is widthxheight , with no spaces. For example, "268x151". |
wait | query | number(float) | false | The number of seconds to wait for an update before returning from the "long poll". The maximum is 30 seconds. |
refresh | query | boolean | false | If true, bypass caches and generate a new image. |
sectionIndex | query | integer(int32) | false | The section to render. This parameter applies when layoutType==entireSection . |
renderLimit | query | integer(int32) | false | Limit how many images to render. For no limit, set to -1. Clients can specify "1" to quickly get the first image and how many remaining images are available. |
imageType | query | string | false | In addition to the default "svg" for SVG image generation, "png" is now supported and results in a png image being created. |
style | query | string | false | The only non-empty value supported is "highContrast", which results in a high contrast image being rendered. |
visualElementNames | query | string | false | If "selectionType=visualElements" is specified, this parameter lists the element names to render. Separate multiple elements with commas. |
Accept-Language | header | string | false | The user's locale. For non-thumbnail operations, this locale is a factor for both rendering and caching. For thumbnail requests, typically only the right-to-left aspect is considered. Thumbnails do not typically include localizable content, and consequently are shareable among users with different locales. For details, see Accept-Language. |
Accept-Locale | header | string | false | A "format locale" distinct from the user's language (Accept-Language). Usage and syntax is similar to Accept-Language. |
Enumerated Values
Parameter | Value |
---|---|
layoutType | thumbnail |
layoutType | normal |
layoutType | entireSection |
selectionType | report |
selectionType | perSection |
selectionType | visualElements |
imageType | svg |
imageType | png |
style | (null/empty string) |
style | highContrast |
Example responses
201 Response
{
"id": "d145d576-78d0-42d4-a5fc-569cd0533903",
"version": 2,
"state": "running",
"durationMSec": 155,
"creationTimeStamp": "2017-11-17T18:46:59.774Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903",
"uri": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903",
"type": "application/vnd.sas.report.images.job+json"
},
{
"method": "GET",
"rel": "state",
"href": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903/state",
"uri": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903/state",
"type": "text/plain"
}
],
"images": [
{
"sectionIndex": 0,
"sectionName": "vi6",
"sectionLabel": "Page 1",
"elementName": "ve41",
"modifiedTimeStamp": "2017-11-16T18:19:23.600Z",
"visualType": "Table",
"size": "268x151",
"state": "completed",
"links": [
{
"method": "GET",
"rel": "image",
"href": "/reportImages/images/K738605462B1380786238.svg",
"uri": "/reportImages/images/K738605462B1380786238.svg",
"type": "image/svg+xml"
}
]
},
{
"sectionIndex": 1,
"sectionName": "vi47",
"sectionLabel": "Page 2",
"elementName": "ve50",
"modifiedTimeStamp": "2017-11-12T14:05:13.450Z",
"visualType": "pie",
"size": "268x151",
"state": "running",
"links": [
{
"method": "GET",
"rel": "staleImage",
"href": "/reportImages/images/K738605462B1234567890.svg",
"uri": "/reportImages/images/K738605462B1234567890.svg",
"type": "image/svg+xml"
}
]
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The job has both been created and is in the "completed" state; the image(s) are ready. | job |
202 | Accepted | The job has been created, but has not completed. | job |
400 | Bad Request | The request was invalid. | error2 |
404 | Not Found | The report could not be found. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | Location of the completed job. | |
202 | Location | string | Location of the running job. | |
400 | Content-Type | string | No description | |
404 | Content-Type | string | No description |
Get report images using request body
Code samples
# You can also use wget
curl -X POST https://example.com/reportImages/jobs#requestBody \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.images.job.request+json' \
-H 'Accept: application/vnd.sas.report.images.job+json' \
-H 'Accept-Language: string' \
-H 'Accept-Locale: string'
const inputBody = '{
"version": 3,
"reportUri": "/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f",
"layoutType": "thumbnail",
"size": "268x151",
"refresh": true
}';
const headers = {
'Content-Type':'application/vnd.sas.report.images.job.request+json',
'Accept':'application/vnd.sas.report.images.job+json',
'Accept-Language':'string',
'Accept-Locale':'string'
};
fetch('https://example.com/reportImages/jobs#requestBody',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.images.job.request+json',
'Accept': 'application/vnd.sas.report.images.job+json',
'Accept-Language': 'string',
'Accept-Locale': 'string'
}
r = requests.post('https://example.com/reportImages/jobs#requestBody', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.images.job.request+json"},
"Accept": []string{"application/vnd.sas.report.images.job+json"},
"Accept-Language": []string{"string"},
"Accept-Locale": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reportImages/jobs#requestBody", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /jobs
Creates an asynchronous job for obtaining SVG images for the report. All the functionality of the create job with parameters operation is supported, plus the ability to specify a list of report elements to render, each with its own size. (new w/ version 4, body member "style" similar to "style" request parameter elsewhere.)
Body parameter
{
"version": 3,
"reportUri": "/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f",
"layoutType": "thumbnail",
"size": "268x151",
"refresh": true
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
wait | query | number(float) | false | The number of seconds to wait for an update before returning from the "long poll". The maximum is 30 seconds. |
refresh | query | boolean | false | If true, bypass caches and generate a new image. |
Accept-Language | header | string | false | The user's locale. For non-thumbnail operations, this locale is a factor for both rendering and caching. For thumbnail requests, typically only the right-to-left aspect is considered. Thumbnails do not typically include localizable content, and consequently are shareable among users with different locales. For details, see Accept-Language. |
Accept-Locale | header | string | false | A "format locale" distinct from the user's language (Accept-Language). Usage and syntax is similar to Accept-Language. |
body | body | jobRequest | true | The job details here parallel those in the operation that uses request parameters. In addition, supports an array of name/size pairs to specify multiple renderings. |
Example responses
201 Response
{
"id": "d145d576-78d0-42d4-a5fc-569cd0533903",
"version": 2,
"state": "running",
"durationMSec": 155,
"creationTimeStamp": "2017-11-17T18:46:59.774Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903",
"uri": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903",
"type": "application/vnd.sas.report.images.job+json"
},
{
"method": "GET",
"rel": "state",
"href": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903/state",
"uri": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903/state",
"type": "text/plain"
}
],
"images": [
{
"sectionIndex": 0,
"sectionName": "vi6",
"sectionLabel": "Page 1",
"elementName": "ve41",
"modifiedTimeStamp": "2017-11-16T18:19:23.600Z",
"visualType": "Table",
"size": "268x151",
"state": "completed",
"links": [
{
"method": "GET",
"rel": "image",
"href": "/reportImages/images/K738605462B1380786238.svg",
"uri": "/reportImages/images/K738605462B1380786238.svg",
"type": "image/svg+xml"
}
]
},
{
"sectionIndex": 1,
"sectionName": "vi47",
"sectionLabel": "Page 2",
"elementName": "ve50",
"modifiedTimeStamp": "2017-11-12T14:05:13.450Z",
"visualType": "pie",
"size": "268x151",
"state": "running",
"links": [
{
"method": "GET",
"rel": "staleImage",
"href": "/reportImages/images/K738605462B1234567890.svg",
"uri": "/reportImages/images/K738605462B1234567890.svg",
"type": "image/svg+xml"
}
]
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The requested job has both been created, and is in the "completed" state; the image(s) are ready. | job |
202 | Accepted | The requested job has been created but has not completed. | job |
400 | Bad Request | The request was invalid. | error2 |
404 | Not Found | The report could not be found. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | Location of the completed job. | |
202 | Location | string | Location of the running job. | |
400 | Content-Type | string | No description | |
404 | Content-Type | string | No description |
Get report images via report in request body
Code samples
# You can also use wget
curl -X POST https://example.com/reportImages/jobs#reportInBody?size=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.content+json' \
-H 'Accept: application/vnd.sas.report.images.job+json' \
-H 'Accept-Language: string' \
-H 'Accept-Locale: string'
const inputBody = 'string';
const headers = {
'Content-Type':'application/vnd.sas.report.content+json',
'Accept':'application/vnd.sas.report.images.job+json',
'Accept-Language':'string',
'Accept-Locale':'string'
};
fetch('https://example.com/reportImages/jobs#reportInBody?size=string',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.content+json',
'Accept': 'application/vnd.sas.report.images.job+json',
'Accept-Language': 'string',
'Accept-Locale': 'string'
}
r = requests.post('https://example.com/reportImages/jobs#reportInBody', params={
'size': 'string'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.content+json"},
"Accept": []string{"application/vnd.sas.report.images.job+json"},
"Accept-Language": []string{"string"},
"Accept-Locale": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reportImages/jobs#reportInBody", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /jobs
This operation is identical to POST /jobs (createJobWithParams), except instead of supplying the reportUri parameter, you supply the BIRD report (in JSON or XML) in the request body.
This operation should be used by a client that has edited the BIRD report.
To access this operation, the "Content-Type" must be "application/vnd.sas.report.content+json" or "application/vnd.sas.report.content+xml".
This operation does not benefit from cache-based performance.Body parameter
"string"
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
layoutType | query | string | false | The type of image to render.
|
selectionType | query | string | false | The selected operation.
|
size | query | string | true | The size of the rendered image. Format is widthxheight , with no spaces. For example, "268x151". |
wait | query | number(float) | false | The number of seconds to wait for an update before returning from the "long poll". The maximum is 30 seconds. |
refresh | query | boolean | false | If true, bypass caches and generate a new image. |
sectionIndex | query | integer(int32) | false | The section to render. This parameter applies when layoutType==entireSection . |
renderLimit | query | integer(int32) | false | Limit how many images to render. For no limit, set to -1. Clients can specify "1" to quickly get the first image and how many remaining images are available. |
imageType | query | string | false | In addition to the default "svg" for SVG image generation, "png" is now supported and results in a png image being created. |
style | query | string | false | The only non-empty value supported is "highContrast", which results in a high contrast image being rendered. |
visualElementNames | query | string | false | If "selectionType=visualElements" is specified, this parameter lists the element names to render. Separate multiple elements with commas. |
Accept-Language | header | string | false | The user's locale. For non-thumbnail operations, this locale is a factor for both rendering and caching. For thumbnail requests, typically only the right-to-left aspect is considered. Thumbnails do not typically include localizable content, and consequently are shareable among users with different locales. For details, see Accept-Language. |
Accept-Locale | header | string | false | A "format locale" distinct from the user's language (Accept-Language). Usage and syntax is similar to Accept-Language. |
body | body | string | true | The report from which to generate images (JSON or XML, per Content-Type header). |
Enumerated Values
Parameter | Value |
---|---|
layoutType | thumbnail |
layoutType | normal |
layoutType | entireSection |
selectionType | report |
selectionType | perSection |
selectionType | visualElements |
imageType | svg |
imageType | png |
style | (null/empty string) |
style | highContrast |
Example responses
201 Response
{
"id": "d145d576-78d0-42d4-a5fc-569cd0533903",
"version": 2,
"state": "running",
"durationMSec": 155,
"creationTimeStamp": "2017-11-17T18:46:59.774Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903",
"uri": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903",
"type": "application/vnd.sas.report.images.job+json"
},
{
"method": "GET",
"rel": "state",
"href": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903/state",
"uri": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903/state",
"type": "text/plain"
}
],
"images": [
{
"sectionIndex": 0,
"sectionName": "vi6",
"sectionLabel": "Page 1",
"elementName": "ve41",
"modifiedTimeStamp": "2017-11-16T18:19:23.600Z",
"visualType": "Table",
"size": "268x151",
"state": "completed",
"links": [
{
"method": "GET",
"rel": "image",
"href": "/reportImages/images/K738605462B1380786238.svg",
"uri": "/reportImages/images/K738605462B1380786238.svg",
"type": "image/svg+xml"
}
]
},
{
"sectionIndex": 1,
"sectionName": "vi47",
"sectionLabel": "Page 2",
"elementName": "ve50",
"modifiedTimeStamp": "2017-11-12T14:05:13.450Z",
"visualType": "pie",
"size": "268x151",
"state": "running",
"links": [
{
"method": "GET",
"rel": "staleImage",
"href": "/reportImages/images/K738605462B1234567890.svg",
"uri": "/reportImages/images/K738605462B1234567890.svg",
"type": "image/svg+xml"
}
]
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The job has both been created and is in the "completed" state; the image(s) are ready. | job |
202 | Accepted | The requested job has been created but has not completed. | job |
400 | Bad Request | The request was invalid. | error2 |
404 | Not Found | The report could not be found. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | Location of the completed job. | |
202 | Location | string | Location of the running job. | |
400 | Content-Type | string | No description | |
404 | Content-Type | string | No description |
Get specified job
Code samples
# You can also use wget
curl -X GET https://example.com/reportImages/jobs/{jobId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.report.images.job+json' \
-H 'If-None-Match: string'
const headers = {
'Accept':'application/vnd.sas.report.images.job+json',
'If-None-Match':'string'
};
fetch('https://example.com/reportImages/jobs/{jobId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.report.images.job+json',
'If-None-Match': 'string'
}
r = requests.get('https://example.com/reportImages/jobs/{jobId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.report.images.job+json"},
"If-None-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reportImages/jobs/{jobId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /jobs/{jobId}
Returns the asynchronous job.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobId | path | string | true | The jobId. |
wait | query | number(float) | false | The number of seconds to wait for an update before returning from the "long poll". The maximum is 30 seconds. |
If-None-Match | header | string | false | Optional eTag. On a match, 304 (not modified) is returned. |
Example responses
200 Response
{
"id": "d145d576-78d0-42d4-a5fc-569cd0533903",
"version": 2,
"state": "running",
"durationMSec": 155,
"creationTimeStamp": "2017-11-17T18:46:59.774Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903",
"uri": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903",
"type": "application/vnd.sas.report.images.job+json"
},
{
"method": "GET",
"rel": "state",
"href": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903/state",
"uri": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903/state",
"type": "text/plain"
}
],
"images": [
{
"sectionIndex": 0,
"sectionName": "vi6",
"sectionLabel": "Page 1",
"elementName": "ve41",
"modifiedTimeStamp": "2017-11-16T18:19:23.600Z",
"visualType": "Table",
"size": "268x151",
"state": "completed",
"links": [
{
"method": "GET",
"rel": "image",
"href": "/reportImages/images/K738605462B1380786238.svg",
"uri": "/reportImages/images/K738605462B1380786238.svg",
"type": "image/svg+xml"
}
]
},
{
"sectionIndex": 1,
"sectionName": "vi47",
"sectionLabel": "Page 2",
"elementName": "ve50",
"modifiedTimeStamp": "2017-11-12T14:05:13.450Z",
"visualType": "pie",
"size": "268x151",
"state": "running",
"links": [
{
"method": "GET",
"rel": "staleImage",
"href": "/reportImages/images/K738605462B1234567890.svg",
"uri": "/reportImages/images/K738605462B1234567890.svg",
"type": "image/svg+xml"
}
]
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested job, which might be in a terminal state. Terminal states are "completed" and "failed". | job |
404 | Not Found | The job could not be found. | error2 |
500 | Internal Server Error | An internal service error was returned by one of the services that this operation uses. The response object contains error text and codes to diagnose it. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | If present, this header contains the current datetime. | |
200 | ETag | string | The entity tag | |
404 | Content-Type | string | No description | |
500 | Content-Type | string | No description |
Get the state of the job
Code samples
# You can also use wget
curl -X GET https://example.com/reportImages/jobs/{jobId}/state \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain'
const headers = {
'Accept':'text/plain'
};
fetch('https://example.com/reportImages/jobs/{jobId}/state',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain'
}
r = requests.get('https://example.com/reportImages/jobs/{jobId}/state', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reportImages/jobs/{jobId}/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /jobs/{jobId}/state
Get the state of the specified job.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobId | path | string | true | The jobId. |
Example responses
200 Response
"string"
404 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The job state. | string |
404 | Not Found | The job could not be found. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | The content type of the response, text/plain . |
|
404 | Content-Type | string | No description |
Existence check state of the job
Code samples
# You can also use wget
curl -X HEAD https://example.com/reportImages/jobs/{jobId}/state \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain'
const headers = {
'Accept':'text/plain'
};
fetch('https://example.com/reportImages/jobs/{jobId}/state',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain'
}
r = requests.head('https://example.com/reportImages/jobs/{jobId}/state', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/reportImages/jobs/{jobId}/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /jobs/{jobId}/state
Existence check state of the specified job.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobId | path | string | true | The jobId. |
Example responses
200 Response
"string"
404 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The job state. | string |
404 | Not Found | The job could not be found. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | The content type of the response, text/plain . |
|
404 | Content-Type | string | No description |
Return the report image
Code samples
# You can also use wget
curl -X GET https://example.com/reportImages/directImage?reportUri=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: image/svg+xml'
const headers = {
'Accept':'image/svg+xml'
};
fetch('https://example.com/reportImages/directImage?reportUri=string',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'image/svg+xml'
}
r = requests.get('https://example.com/reportImages/directImage', params={
'reportUri': 'string'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"image/svg+xml"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reportImages/directImage", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /directImage
This operation hides the job architecture and directly generates and returns the image. It blocks synchronously until the image is ready or timeout occurs (default 10 seconds). If a timeout occurs, a redirect is returned to the browser, redirecting back to this operation for browser liveness purposes.
Use of this operation is discouraged. Using more than one can starve a browser's requests queue, as some browsers are limited to 6 active queries per site. Also, the redirect technique employed can fail in the browser after too many redirects, as some browsers allow only 10 redirects.
Any client capable of following the job pattern should NOT use this direct operation.
ParametersreportUri
and size
are required.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportUri | query | string | true | The report from which to generate images. |
layoutType | query | string | false | The type of image to render.
|
selectionType | query | string | false | The selected operation.
|
imageType | query | string | false | In addition to the default "svg" for SVG image generation, "png" is now supported and results in a png image being created. |
style | query | string | false | The only non-empty value supported is "highContrast", which results in a high contrast image being rendered. |
refresh | query | boolean | false | If true, bypass caches and generate a new image. |
sectionIndex | query | integer(int32) | false | The section to render. This parameter applies when layoutType==entireSection . |
visualElementName | query | string | false | The report element to render. |
size | query | string | false | The size of the rendered image. Format is widthxheight , with no spaces. For example, "300x200". |
wait | query | number(float) | false | The number of seconds to wait for the result. When this expires, a "redirect" is returned to continue the waiting process. Use caution when setting; some browsers abort after 10 redirects. |
Enumerated Values
Parameter | Value |
---|---|
layoutType | thumbnail |
layoutType | normal |
layoutType | entireSection |
selectionType | report |
selectionType | perSection |
selectionType | visualElements |
imageType | svg |
imageType | png |
style | (null/empty string) |
style | highContrast |
Example responses
200 Response
303 Response
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The SVG image is returned. | string |
303 | See Other | The operation could not be completed before the wait time expired. This redirect (See Other) continues the process of waiting for the image. It is used (rather than extending the wait period) to provide some liveness to the browser's transmit queue. Note that this redirect is common, clients that cannot follow a redirect must either not use this method or specify a very long timeout. | string |
400 | Bad Request | The request was invalid. | error2 |
500 | Internal Server Error | An internal service error was returned by one of the services that this operation uses. The response object contains error text and codes to diagnose it. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | The entity tag for this image. | |
200 | Cache-Control | string | Header returned encouraging the browser to cache this image. | |
200 | Expires | string | Header returned encouraging the browser to cache this image. | |
200 | Pragma | string | Header returned encouraging the browser to cache this image. | |
303 | Location | string | A URI back to this service to wait for this image. | |
400 | Content-Type | string | No description | |
500 | Content-Type | string | No description |
ThumbnailProvider
Asynchronous jobs conforming to the Thumbnail Provider contract.
Get thumbnail images
Code samples
# You can also use wget
curl -X POST https://example.com/reportImages/jobs#requestBodyThumbnail \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.thumbnails.job.request+json' \
-H 'Accept: application/vnd.sas.thumbnails.job+json' \
-H 'Accept-Language: string' \
-H 'Accept-Locale: string'
const inputBody = '{
"acceptItem": "string",
"resourceUri": "string",
"resourceType": "string",
"detailLevel": "low",
"scope": "element",
"returnMultiple": false,
"refresh": false,
"sizingOptions": {
"viewWidth": 0,
"viewHeight": 0,
"devicePixelRatio": 1,
"maxTextCharacters": 0,
"maxTableColumns": 0,
"maxTableRows": 0
},
"accessibilityOptions": {
"highContrast": false
},
"themeId": "string",
"pagingOptions": {
"start": 0,
"limit": 0
},
"version": 0
}';
const headers = {
'Content-Type':'application/vnd.sas.thumbnails.job.request+json',
'Accept':'application/vnd.sas.thumbnails.job+json',
'Accept-Language':'string',
'Accept-Locale':'string'
};
fetch('https://example.com/reportImages/jobs#requestBodyThumbnail',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.thumbnails.job.request+json',
'Accept': 'application/vnd.sas.thumbnails.job+json',
'Accept-Language': 'string',
'Accept-Locale': 'string'
}
r = requests.post('https://example.com/reportImages/jobs#requestBodyThumbnail', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.thumbnails.job.request+json"},
"Accept": []string{"application/vnd.sas.thumbnails.job+json"},
"Accept-Language": []string{"string"},
"Accept-Locale": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reportImages/jobs#requestBodyThumbnail", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /jobs
Creates an asynchronous job, but honors the media types and contract for a "thumbnail provider". Note with version 4 of the API, report images is now honoring the "thumbnails request" for high contrast; completing an end-to-end use case of high contrast from SAS Drive to the delivered report image thumbnail being in high contrast.
Body parameter
{
"acceptItem": "string",
"resourceUri": "string",
"resourceType": "string",
"detailLevel": "low",
"scope": "element",
"returnMultiple": false,
"refresh": false,
"sizingOptions": {
"viewWidth": 0,
"viewHeight": 0,
"devicePixelRatio": 1,
"maxTextCharacters": 0,
"maxTableColumns": 0,
"maxTableRows": 0
},
"accessibilityOptions": {
"highContrast": false
},
"themeId": "string",
"pagingOptions": {
"start": 0,
"limit": 0
},
"version": 0
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
wait | query | number(float) | false | The number of seconds to wait for an update before returning from the "long poll". The maximum is 30 seconds. |
Accept-Language | header | string | false | The user's locale. For non-thumbnail operations, this locale is a factor for both rendering and caching. For thumbnail requests, typically only the right-to-left aspect is considered. Thumbnails do not typically include localizable content, and consequently are shareable among users with different locales. For details, see Accept-Language. |
Accept-Locale | header | string | false | A "format locale" distinct from the user's language (Accept-Language). Usage and syntax is similar to Accept-Language. |
body | body | thumbnailRequest | true | The thumbnail job details. |
Example responses
201 Response
{
"id": "string",
"state": "pending",
"thumbnails": [
{
"state": "pending",
"error": {
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
],
"error": {
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"duration": 0,
"defaultThumbnailSasThemesIconKey": "string",
"pagingState": {
"start": 0,
"limit": 0,
"count": 0
},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The job was created and is in the "completed" state. The thumbnails(s) are ready. | thumbnailJob |
202 | Accepted | The requested job was created but has not completed. Some of the images can be in the "completed" state. Some images might have a "staleThumbnail" link. | thumbnailJob |
400 | Bad Request | Bad request. The request body is not well formed. | error2 |
404 | Not Found | The report could not be found. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | Location of the completed thumbnail job. | |
202 | Location | string | Location of the running job. | |
400 | Content-Type | string | No description | |
404 | Content-Type | string | No description |
Get thumbnail provider job
Code samples
# You can also use wget
curl -X GET https://example.com/reportImages/jobs/{jobId}#getThumbnailJob \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.thumbnails.job+json' \
-H 'If-None-Match: string'
const headers = {
'Accept':'application/vnd.sas.thumbnails.job+json',
'If-None-Match':'string'
};
fetch('https://example.com/reportImages/jobs/{jobId}#getThumbnailJob',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.thumbnails.job+json',
'If-None-Match': 'string'
}
r = requests.get('https://example.com/reportImages/jobs/{jobId}#getThumbnailJob', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.thumbnails.job+json"},
"If-None-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reportImages/jobs/{jobId}#getThumbnailJob", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /jobs/{jobId}
Returns the asynchronous job in the media type for "thumbnail provider".
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobId | path | string | true | the jobId |
wait | query | number(float) | false | The number of seconds to wait for an update before returning from the "long poll". The maximum is 30 seconds. |
If-None-Match | header | string | false | Optional eTag. On a match, 304 (not modified) is returned. |
Example responses
200 Response
{
"id": "string",
"state": "pending",
"thumbnails": [
{
"state": "pending",
"error": {
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
],
"error": {
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"duration": 0,
"defaultThumbnailSasThemesIconKey": "string",
"pagingState": {
"start": 0,
"limit": 0,
"count": 0
},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested thumbnail job, which might be in a terminal state. Terminal states are "completed" and "failed". | thumbnailJob |
404 | Not Found | The job could not be found. | error2 |
500 | Internal Server Error | An internal service error was returned by one of the services that this operation uses. The response object contains error text and codes to diagnose it. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | The entity tag | |
404 | Content-Type | string | No description | |
500 | Content-Type | string | No description |
Images
Get prepared images.
Get image
Code samples
# You can also use wget
curl -X GET https://example.com/reportImages/images/{imageId}.png \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: image/png' \
-H 'If-None-Match: string'
const headers = {
'Accept':'image/png',
'If-None-Match':'string'
};
fetch('https://example.com/reportImages/images/{imageId}.png',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'image/png',
'If-None-Match': 'string'
}
r = requests.get('https://example.com/reportImages/images/{imageId}.png', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"image/png"},
"If-None-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reportImages/images/{imageId}.png", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /images/{imageId}.png
This operation is used to retrieve the PNG image; It is determined by the "image" link relation from the job successfully creating a PNG image. This operation uses an explicit format modifier ('.png'). Doing so is to support the primary use case of embedding the link in a web page or other such context where the client cannot pass an 'Accept:' header to specify the image type.
This URL is secured, and valid only for the current user.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
imageId | path | string | true | The system-generated ID returned with the completed job (in the 'image' link). |
If-None-Match | header | string | false | Optional ETag. On a match, 304 (not modified) is returned. |
Example responses
200 Response
404 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The image is returned. Caching headers (Cache-Control, Expires, Pragma) are returned encouraging the browser to cache this image. | string |
304 | Not Modified | If the client-supplied entity tag (If-None-Match) matches the current state, the client's image is current. Nothing is then returned. | string |
404 | Not Found | Either the imageId cannot be found, or the underlying image is not in the database. If a user other than the one who generated the image uses this link, it is considered a security violation, and a 404 is returned so that the caller does not know the link is an otherwise-valid value. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | The entity tag for this image. | |
200 | Cache-Control | string | Header returned encouraging the browser to cache this image. | |
200 | Expires | string | Header returned encouraging the browser to cache this image. | |
200 | Pragma | string | Header returned encouraging the browser to cache this image. | |
304 | ETag | string | The entity tag for this image. | |
404 | Content-Type | string | No description |
Existence check image
Code samples
# You can also use wget
curl -X HEAD https://example.com/reportImages/images/{imageId}.png \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: image/png' \
-H 'If-None-Match: string'
const headers = {
'Accept':'image/png',
'If-None-Match':'string'
};
fetch('https://example.com/reportImages/images/{imageId}.png',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'image/png',
'If-None-Match': 'string'
}
r = requests.head('https://example.com/reportImages/images/{imageId}.png', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"image/png"},
"If-None-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/reportImages/images/{imageId}.png", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /images/{imageId}.png
Existence check image - This operation is used to retrieve the PNG image; It is determined by the "image" link relation from the job successfully creating a PNG image. This operation uses an explicit format modifier ('.png'). Doing so is to support the primary use case of embedding the link in a web page or other such context where the client cannot pass an 'Accept:' header to specify the image type.
This URL is secured, and valid only for the current user.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
imageId | path | string | true | The system-generated ID returned with the completed job (in the 'image' link). |
If-None-Match | header | string | false | Optional ETag. On a match, 304 (not modified) is returned. |
Example responses
200 Response
404 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The image is returned. Caching headers (Cache-Control, Expires, Pragma) are returned encouraging the browser to cache this image. | string |
304 | Not Modified | If the client-supplied entity tag (If-None-Match) matches the current state, the client's image is current. Nothing is then returned. | string |
404 | Not Found | Either the imageId cannot be found, or the underlying image is not in the database. If a user other than the one who generated the image uses this link, it is considered a security violation, and a 404 is returned so that the caller does not know the link is an otherwise-valid value. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | The entity tag for this image. | |
200 | Cache-Control | string | Header returned encouraging the browser to cache this image. | |
200 | Expires | string | Header returned encouraging the browser to cache this image. | |
200 | Pragma | string | Header returned encouraging the browser to cache this image. | |
304 | ETag | string | The entity tag for this image. | |
404 | Content-Type | string | No description |
Root
This API's root.
Get the top-level links
Code samples
# You can also use wget
curl -X GET https://example.com/reportImages/ \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.api+json'
const headers = {
'Accept':'application/vnd.sas.api+json'
};
fetch('https://example.com/reportImages/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.api+json'
}
r = requests.get('https://example.com/reportImages/', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.api+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reportImages/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /
The root links for this service.
Users receive:
- "createJob" -- initiates a job using a request body.
- "createJobWithParams" -- initiates a job using request parameters.
Administrators also receive:
- "deleteForReport" and "deleteAll" -- delete cached images.
Example responses
200 Response
{
"version": 1,
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The service's links. | api |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Admin
Operations restricted to an administrative user.
Delete cached images
Code samples
# You can also use wget
curl -X DELETE https://example.com/reportImages/images \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: */*'
const headers = {
'Accept':'*/*'
};
fetch('https://example.com/reportImages/images',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': '*/*'
}
r = requests.delete('https://example.com/reportImages/images', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"*/*"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/reportImages/images", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /images
Enables administrators to remove cached images for a single report or all cached images.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportUri | query | string(uri) | false | If supplied, deletes the cached images associated with the report. Otherwise, all cached images are deleted. |
Example responses
403 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The operation was successful, nothing to return. | None |
403 | Forbidden | This operation is restricted to administrators (by default, members of group "ApplicationAdministrators"). | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
403 | Content-Type | string | No description |
Schemas
error2
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Error
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
message | string | false | none | The message for the error. |
id | string | false | none | The string ID for the error. |
errorCode | integer | false | none | The numeric ID for the error. |
httpStatusCode | integer | true | none | The HTTP status code for the error. |
details | [string] | false | none | Messages that provide additional details about the cause of the error. |
remediation | string | false | none | A message that describes how to resolve the error. |
errors | [error2] | false | none | Any additional errors that occurred. |
links | [link] | false | none | The links that apply to the error. |
version | integer | true | none | The version number of the error representation. This representation is version 2. |
link
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
Link
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
method | string | false | none | The HTTP method for the link. |
rel | string | true | none | The relationship of the link to the resource. |
uri | string | false | none | The relative URI for the link. |
href | string | false | none | The URL for the link. |
title | string | false | none | The title for the link. |
type | string | false | none | The media type or link type for the link. |
itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
job
{
"id": "d145d576-78d0-42d4-a5fc-569cd0533903",
"version": 2,
"state": "running",
"durationMSec": 155,
"creationTimeStamp": "2017-11-17T18:46:59.774Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903",
"uri": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903",
"type": "application/vnd.sas.report.images.job+json"
},
{
"method": "GET",
"rel": "state",
"href": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903/state",
"uri": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903/state",
"type": "text/plain"
}
],
"images": [
{
"sectionIndex": 0,
"sectionName": "vi6",
"sectionLabel": "Page 1",
"elementName": "ve41",
"modifiedTimeStamp":