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.
Creates, reads, updates, and deletes reports and report states. Updates report and report state contents.
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/
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 '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/reports/name/validation",
"uri": "/reports/reports/name/validation"
},
{
"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 '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 '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
parentFolderUriis 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
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 '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 '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 '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 '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/reports/validations/name#validateName?value=string&parentFolderUri=http%3A%2F%2Fexample.com \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/reports/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/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/reports/validations/name#validateName", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /reports/validations/name}
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 '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 '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 '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 '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. |
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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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}
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 '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 '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 '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 '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 '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 '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 '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/reports/name/validation",
"uri": "/reports/reports/name/validation"
},
{
"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 |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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
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.
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.normaldoes not reduce detail.entireSectionrenders 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:
pendingrunningcompletedfailed
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 '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. |
| 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 |
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"
},
{
"method": "POST",
"rel": "render",
"href": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"uri": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"type": "application/vnd.sas.report.images.job"
},
{
"method": "POST",
"rel": "resize",
"href": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"uri": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"type": "application/vnd.sas.report.images.job"
}
]
},
{
"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"
},
{
"method": "POST",
"rel": "render",
"href": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"uri": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"type": "application/vnd.sas.report.images.job"
},
{
"method": "POST",
"rel": "resize",
"href": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"uri": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"type": "application/vnd.sas.report.images.job"
}
]
}
]
}
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 '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": 2,
"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.
Body parameter
{
"version": 2,
"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"
},
{
"method": "POST",
"rel": "render",
"href": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"uri": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"type": "application/vnd.sas.report.images.job"
},
{
"method": "POST",
"rel": "resize",
"href": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"uri": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"type": "application/vnd.sas.report.images.job"
}
]
},
{
"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"
},
{
"method": "POST",
"rel": "render",
"href": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"uri": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"type": "application/vnd.sas.report.images.job"
},
{
"method": "POST",
"rel": "resize",
"href": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"uri": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"type": "application/vnd.sas.report.images.job"
}
]
}
]
}
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 '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. |
| 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 |
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"
},
{
"method": "POST",
"rel": "render",
"href": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"uri": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"type": "application/vnd.sas.report.images.job"
},
{
"method": "POST",
"rel": "resize",
"href": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"uri": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"type": "application/vnd.sas.report.images.job"
}
]
},
{
"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"
},
{
"method": "POST",
"rel": "render",
"href": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"uri": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"type": "application/vnd.sas.report.images.job"
},
{
"method": "POST",
"rel": "resize",
"href": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"uri": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"type": "application/vnd.sas.report.images.job"
}
]
}
]
}
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 'Accept: application/vnd.sas.report.images.job+json'
const headers = {
'Accept':'application/vnd.sas.report.images.job+json'
};
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'
}
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"},
}
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. |
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"
},
{
"method": "POST",
"rel": "render",
"href": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"uri": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"type": "application/vnd.sas.report.images.job"
},
{
"method": "POST",
"rel": "resize",
"href": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"uri": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"type": "application/vnd.sas.report.images.job"
}
]
},
{
"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"
},
{
"method": "POST",
"rel": "render",
"href": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"uri": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"type": "application/vnd.sas.report.images.job"
},
{
"method": "POST",
"rel": "resize",
"href": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"uri": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"type": "application/vnd.sas.report.images.job"
}
]
}
]
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | The requested job, which may 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 | Content-Type | string | No description | |
| 200 | Last-Modified | string | If present, this header contains the current datetime. | |
| 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 '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 |
Return the report image
Code samples
# You can also use wget
curl -X GET https://example.com/reportImages/directImage?reportUri=string \
-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.
|
| 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 |
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 |
| 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 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 | |
| 404 | 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 '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".
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 'Accept: application/vnd.sas.thumbnails.job+json'
const headers = {
'Accept':'application/vnd.sas.thumbnails.job+json'
};
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'
}
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"},
}
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. |
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 may 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 | Content-Type | string | No description | |
| 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}.svg \
-H 'Accept: image/svg+xml' \
-H 'If-None-Match: string'
const headers = {
'Accept':'image/svg+xml',
'If-None-Match':'string'
};
fetch('https://example.com/reportImages/images/{imageId}.svg',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'image/svg+xml',
'If-None-Match': 'string'
}
r = requests.get('https://example.com/reportImages/images/{imageId}.svg', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"image/svg+xml"},
"If-None-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reportImages/images/{imageId}.svg", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /images/{imageId}.svg
This operation is used by POST /jobs to return the GET links.
This operation uses an explicit format modifier ('.svg'). 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.
By protocol, SVG images are always XML. The media type is always 'image/svg+xml'.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
304 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. | |
| 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 '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 '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": "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"
},
{
"method": "POST",
"rel": "render",
"href": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"uri": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"type": "application/vnd.sas.report.images.job"
},
{
"method": "POST",
"rel": "resize",
"href": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"uri": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"type": "application/vnd.sas.report.images.job"
}
]
},
{
"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"
},
{
"method": "POST",
"rel": "render",
"href": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"uri": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"type": "application/vnd.sas.report.images.job"
},
{
"method": "POST",
"rel": "resize",
"href": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"uri": "/reportImages/jobs?elementId=ve50&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"type": "application/vnd.sas.report.images.job"
}
]
}
]
}
The operation to create image(s)
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | string | true | none | The unique identifier of this job. |
| state | string | true | none | The overall state of this job. "Completed" and "failed" are the terminal states. |
| duration | number(float) | false | none | How many seconds to complete this job. Returned with completed and failed jobs. |
| creationTimeStamp | string(date-time) | true | none | When the job was created. |
| pagingState | pagingState | false | none | Object returned if paging had been requested |
| error | error2 | false | none | The representation of an error. |
| images | [imageDetail] | false | none | An array of image detail, one array for each image this job produces. After the report analysis phase completes, this array contains the image metadata, missing only the retrieval link to be complete. |
| links | [link] | false | none | An array of links to related resources and actions. |
| version | integer(int32) | true | none | This media type's schema version number. This representation is version 2. If the client specifies version=1, the "modifiedTimeStamp" member is not included with the associated images, and an early return with a "cached" image will not occur. |
Enumerated Values
| Property | Value |
|---|---|
| state | pending |
| state | running |
| state | completed |
| state | failed |
imageDetail
{
"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"
},
{
"method": "GET",
"rel": "staleImage",
"href": "/reportImages/images/K738605462B1234567890.svg",
"uri": "/reportImages/images/K738605462B1234567890.svg",
"type": "image/svg+xml"
},
{
"method": "POST",
"rel": "render",
"href": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"uri": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size=268x151",
"type": "application/vnd.sas.report.images.job"
},
{
"method": "POST",
"rel": "resize",
"href": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"uri": "/reportImages/jobs?elementId=ve41&reportUri=/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f&layoutType=thumbnail&size={size}",
"type": "application/vnd.sas.report.images.job"
}
]
}
Describes an individual image
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| sectionIndex | integer(int32) | true | none | The section (page, 0-based) of this report from which this image came. |
| sectionName | string | true | none | The internal name of the section. |
| sectionLabel | string | true | none | The user label of the section. |
| elementName | string | true | none | The internal name of the element this image represents. |
| visualType | string | true | none | The type of the element. For a graph it is the graphType. For example: "pie" or "bar". For a section, it is "Section". For a composite (such as linear regression) the type is "Composite". For a table or crosstable, the type is "Table" and "Crosstab", respectively. For a text-only element, it is "Text". These types come from the report definition. |
| size | string | true | none | The requested size. For example, "268x151". |
| state | string | true | none | The state of this job. Terminal states: completed, failed, ignored. |
| modifiedTimeStamp | string(date-time) | false | none | The timestamp in YYYY-MM-DDThh:mm:ss.sssZ format of when the referenced image was last updated. This member is present only when a link to an image is also present (either image or staleImage), and indicates the modified time of that image. This member was not available in version 1 of this media type. |
| error | error2 | false | none | The representation of an error. |
| links | [link] | false | none | An array of links for retrieving the image or initiating a new job. Expect link relations "image", "render", and "resize". The "image" URI is how the SVG image is retrieved. |
Enumerated Values
| Property | Value |
|---|---|
| state | pending |
| state | running |
| state | completed |
| state | failed |
| state | ignored |
jobRequest
{
"version": 2,
"reportUri": "/reports/reports/ffdfe936-80a9-4969-a786-4a314df13f3f",
"layoutType": "thumbnail",
"size": "268x151",
"refresh": true
}
Job request details
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| reportUri | string | true | none | The report from which to generate images. |
| layoutType | string | false | none | The type of image. |
| selectionType | string | false | none | The type of operation selected. -"report" gets a single image that represents the entire report. -"perSection" gets one image per section. -"visualElements" enables the caller to specify the visual elements to render (in parameter "visualElementNames"). |
| size | string | false | none | The image size. Format is widthxheight, with no spaces. For example, "268x151". |
| specificVisualElements | [nameAndSize] | false | none | An array of name/size pairs, each representing a visual element to render. |
| sectionIndex | integer(int32) | false | none | The section (page) to render. Applies only when layoutType==entireSection. |
| refresh | boolean | false | none | If true, bypass caches and generate a new image. |
| renderLimit | integer(int32) | false | none | 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. |
| pagingOptions | pagingOptions | false | none | Paging details for page-oriented requests. |
| version | integer(int32) | false | none | This media type's schema version number. This representation is version 2. |
Enumerated Values
| Property | Value |
|---|---|
| layoutType | thumbnail |
| layoutType | normal |
| layoutType | entireSection |
| selectionType | report |
| selectionType | perSection |
| selectionType | visualElements |
| selectionType | paging |
nameAndSize
{
"name": "ve41",
"size": "268x151"
}
Report element name and size.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| name | string | true | none | The report element name. |
| size | string | true | none | The image size. For example, "268x151". |
pagingOptions
{
"start": 0,
"limit": 0
}
Paging Options
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| start | integer | true | none | Start index, 0-based, of the first thumbnail to return. |
| limit | integer | true | none | Number of thumbnails to return in a single "page". |
pagingState
{
"start": 0,
"limit": 0,
"count": 0
}
Paging State
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| start | integer | true | none | start index (0-based) of the first thumbnai. |
| limit | integer | true | none | number of thumbnails returned in a single "page" |
| count | integer | true | none | number of available thumbnails. |
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. |
thumbnailRequest
{
"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
}
Thumbnail Request
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| acceptItem | string | true | none | A media type string listing acceptable media types, possibly with quality values. Example: "image/*,text/plain;q=0.9,text/csv;q=0.8". |
| resourceUri | string | true | none | URI to the resource for which a thumbnail is needed. |
| resourceType | string | false | none | The SAS type of the resource for which a thumbnail is needed. |
| detailLevel | string | false | none | The expected level of detail. (default is "low") |
| scope | string | false | none | Whether a single element is to be represented, or the entire page. (default is "element") |
| returnMultiple | boolean | false | none | Whether a single thumbnail is to be returned (false) or multiple thumbnails (true). (default is false) |
| refresh | boolean | false | none | Whether the freshest possible result is requested. (default is false) |
| sizingOptions | sizingOptions | false | none | Sizing options; providers should honor values suitable to the type of object for which they provide thumbnails, and clients should supply values suitable to their presentation needs. |
| accessibilityOptions | accessibilityOptions | false | none | Sizing options; providers should honor values suitable to the type of object for which they provide thumbnails, and clients should supply values suitable to their presentation needs. (default is null) |
| themeId | string | false | none | The client's current theme. |
| pagingOptions | pagingOptions | false | none | Paging details for page-oriented requests. (must be null if returnMultiple is false; must not be null if returnMultiple is true) |
| version | integer(int32) | false | none | The version number of the thumbnail representation. This representation is version 1. |
Enumerated Values
| Property | Value |
|---|---|
| detailLevel | low |
| detailLevel | high |
| scope | element |
| scope | page |
thumbnailJob
{
"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
}
Thumbnail Job
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | string | true | none | The generated id for this job. |
| state | string | true | none | The state of this job. |
| thumbnails | [thumbnail] | false | none | Thumbnail objects, typically 1 unless paging had been requested. |
| error | error2 | false | none | Error response for the job. |
| duration | number(float) | false | none | duration, in seconds, of the job. |
| defaultThumbnailSasThemesIconKey | string | false | none | A number of fully themed "icons" are available within SAS Clients. If provided, this is that representation and should be used in preference to the the image specified by link relation "defaultThumbnailImage". |
| pagingState | pagingState | false | none | Object returned if paging had been requested |
| links | [link] | true | none | Link relations for this job. Expect 'self' and 'defaultThumbnailImage'. |
| version | integer(int32) | true | none | The version number of the thumbnail job. This representation is version 1. |
Enumerated Values
| Property | Value |
|---|---|
| state | pending |
| state | running |
| state | completed |
| state | failed |
sizingOptions
{
"viewWidth": 0,
"viewHeight": 0,
"devicePixelRatio": 1,
"maxTextCharacters": 0,
"maxTableColumns": 0,
"maxTableRows": 0
}
Sizing Options
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| viewWidth | integer | false | none | CSS Pixel image width. |
| viewHeight | integer | false | none | CSS Pixel image height. |
| devicePixelRatio | number(float) | false | none | device pixel ratio; some mobile devices support values greater than 1. (default is 1.0) |
| maxTextCharacters | integer | false | none | if plain text is returned, the maximum number of characters to return. |
| maxTableColumns | integer | false | none | if a table or other CSV presentation is returned, the maximum number of columns to return. |
| maxTableRows | integer | false | none | if a table or other CSV presentation is returned, the maximum number of rows to return. |
accessibilityOptions
{
"highContrast": false
}
Accessibility Options
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| highContrast | boolean | false | none | indicates whether "high contrast" visual adjustments are desired. (default is false) |
thumbnail
{
"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"
}
]
}
Thumbnail
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| state | string | true | none | the state of this thumbnail |
| error | error2 | false | none | Error response for this thumbnail |
| modifiedTimeStamp | string(date-time) | false | none | The timestamp in EEE, dd MMM yyyy HH:mm:ss GMT format when the thumbnail was last modified. |
| links | [link] | false | none | Link relations for this thumbnail. Expect: 'thumbnail' (the thumbnail to pick up) and 'staleThumbnail' (an older thumbnail that can be picked up while a more current thumbnail is being prepared) |
Enumerated Values
| Property | Value |
|---|---|
| state | pending |
| state | running |
| state | completed |
| state | failed |
Examples
Github Examples
Detailed examples on how to use this API can be found on Github.
Media Type Samples
- application/vnd.sas.report.images.job.request
- application/vnd.sas.report.images.job
- Shared Media Types
- External Media Types
application/vnd.sas.report.images.job.request
The request body when creating a job. The schema is at application/vnd.sas.report.images.job.request.
Note that the operation creating a job is overloaded, there is an overloaded resource that takes this input as request parameters rather than the request body, and a third operation that accepts the report as input.
application/vnd.sas.report.images.job.request+json
{
"reportUri" : "/reports/reports/234086e1-ac04-46ed-9e1b-32666bfb1bb1",
"layoutType" : "thumbnail",
"selectionType" : "report",
"size" : "268x151",
"version" : 1,
"refresh" : false
}
application/vnd.sas.report.images.job
Provides metadata about the report images job.
The schema is at application/vnd.sas.report.images.job, the current version is: 2.
application/vnd.sas.report.images.job+json
Below is an example of the JSON representation of this media type.
{
"id": "77bc0a8e-a0e3-422c-8c06-1e0652978f0a",
"version": 2,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reportImages/jobs/77bc0a8e-a0e3-422c-8c06-1e0652978f0a",
"uri": "/reportImages/jobs/77bc0a8e-a0e3-422c-8c06-1e0652978f0a",
"type": "application/vnd.sas.report.images.job"
},
{
"method": "GET",
"rel": "state",
"href": "/reportImages/jobs/77bc0a8e-a0e3-422c-8c06-1e0652978f0a/state",
"uri": "/reportImages/jobs/77bc0a8e-a0e3-422c-8c06-1e0652978f0a/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "renderAll",
"href": "/reportImages/jobs?selectionType=report&size=268x151&reportUri=/reports/reports/234086e1-ac04-46ed-9e1b-32666bfb1bb1&layoutType=thumbnail",
"uri": "/reportImages/jobs?selectionType=report&size=268x151&reportUri=/reports/reports/234086e1-ac04-46ed-9e1b-32666bfb1bb1&layoutType=thumbnail",
"type": "application/vnd.sas.report.images.job"
}
],
"state": "completed",
"duration": 0.136,
"creationTimeStamp": "2017-07-17T17:13:49.690Z",
"images": [
{
"sectionIndex": 0,
"sectionName": "vi6",
"sectionLabel": "Page 1",
"elementName": "ve40",
"visualType": "wordCloud",
"size": "268x151",
"state": "completed",
"modifiedTimeStamp": "2017-11-16T18:19:23.600Z"
"links": [
{
"method": "GET",
"rel": "image",
"href": "/reportImages/images/K1380786238B1394189146.svg",
"uri": "/reportImages/images/K1380786238B1394189146.svg",
"type": "image/svg+xml"
},
{
"method": "GET",
"rel": "staleImage",
"href": "/reportImages/images/K1380786238B9753186427.svg",
"uri": "/reportImages/images/K1380786238B9753186427.svg",
"type": "image/svg+xml"
},
{
"method": "POST",
"rel": "render",
"href": "/reportImages/jobs?selectionType=visualElements&size=268x151&reportUri=/reports/reports/234086e1-ac04-46ed-9e1b-32666bfb1bb1&layoutType=thumbnail&visualElementNames=ve40",
"uri": "/reportImages/jobs?selectionType=visualElements&size=268x151&reportUri=/reports/reports/234086e1-ac04-46ed-9e1b-32666bfb1bb1&layoutType=thumbnail&visualElementNames=ve40",
"type": "application/vnd.sas.report.images.job"
},
{
"method": "POST",
"rel": "resize",
"href": "/reportImages/jobs?selectionType=visualElements&reportUri=/reports/reports/234086e1-ac04-46ed-9e1b-32666bfb1bb1&layoutType=thumbnail&visualElementNames=ve40&size={size}",
"uri": "/reportImages/jobs?selectionType=visualElements&reportUri=/reports/reports/234086e1-ac04-46ed-9e1b-32666bfb1bb1&layoutType=thumbnail&visualElementNames=ve40&size={size}",
"type": "application/vnd.sas.report.images.job"
}
]
}
]
}
Shared Media Types
The reportImages API uses the following shared media types:
application/vnd.sas.api
Contains top-level links for an API. See
application/vnd.sas.api
application/vnd.sas.error (v2)
Standard SAS error format. This is returned for most 400 and 500-level
responses, and is a member of the "job" media type.
application/vnd.sas.error
application/vnd.sas.thumbnails.job.request
A request using the Thumbnails Provider Contract to create a job.
application/vnd.sas.thumbnails.job.request
application/vnd.sas.thumbnails.job
The job created using the Thumbnails Provider Contract.
application/vnd.sas.thumbnails.job
External Media Types
The reportImages API uses the following external media types:
image/svg+xml
SVG images are XML strings following the SVG protocol. Modern browsers are able to render them. Neither this service, nor a client, should need to parse this string.
For more information see wikipedia or https://www.w3.org/Graphics/SVG/.
Entity Relationship Diagram

All GET operations have a corresponding HEAD which are identical except for HEAD semantics.
Root
Path: /
The root of the API. This resource contains links to the top-level resources in the API.
The response uses the application/vnd.sas.api media type.
Links
The GET / response includes the following links.
| Relation | Method | Description |
|---|---|---|
printReport |
GET |
Generate and download the PDF form of a report. URI: /reports/{reportId}/pdfResponse type: application/pdf |
Jobs
Path: /reportImages/jobs
Path: /reportImages/jobs/{jobId}
This API provides for the creation of application/vnd.sas.report.images.job. These jobs run asynchronously. After the report analysis phase is complete, a job will include an array for each image that will be generated. This array contains metadata about the image, such as section, element name, visual element type, and status.
The client must poll until the job is completed (using either
the self or the state link). Terminal states are: completed and failed. Both the POST and
GET calls accept the request parameter wait, which specifies how long (in floating point seconds)
to wait before timing out and returning if the job is
not complete. The default value is 0.5 (1/2 second), the max is 30. This long poll returns
immediately when the job completes.
When an image's status is completed, the image object will include a
link image to obtain the image. This link will be suitable to pass to
a browser IMG tag.
Approximately one hour after a job is completed, it is destroyed automatically.
Links
Links associated with the job
| Relation | Method | Description |
|---|---|---|
self |
GET |
Get this job. URI: /jobs/{jobId} Response type: application/vnd.sas.report.images.job |
state |
GET |
Get only the state of this job. URI: /jobs/{jobId}/state Response type: text/plain |
renderAll |
POST |
Create a new job rendering all images. URI: /jobs?reportUri={reportUri}&size={size}&layoutType={layoutType}&selectionType={selectionType}Note that the parameter renderLimit is omitted. The use case for this link is the client which chooses renderLimit=1 to get the first image, but also needs to know how many images exist. Later, if the user explores further, the client will render the remaining images. (For this use case, the client does not need to worry about "re-rendering" the first image. There is no "request type" because all needed details are request parameters and no request body is needed.Response type: application/vnd.sas.report.images.job |
Links associated with the individual images
Each image object in the job can have these links. This image object is not a separate resource, so there is no self link. Either image or staleImage will be returned.
| Relation | Method | Description |
|---|---|---|
image |
GET |
Get the actual SVG image. This URI will be suitable to give to a browser IMG tag. This link will only be available for image(s) in the completed state. This link is valid for 1 hour and only for the current user.URI: /images/{imageId}.svg Response type: image/svg+xml |
staleImage |
GET |
Similar to image but may be stale.URI: /images/{imageId}.svg Response type: image/svg+xml (This link was not available in version 1) |
render |
POST |
Create a job to render this image. Note that typically the job which renders all images is much faster than iterating through the images with renderLimit==1.URI: /jobs?visualElementNames={elementId}&reportUri={reportUri}&layoutType={layoutType}&selectionType=visualElements&size={size} Response type: application/vnd.sas.report.images.job |
resize |
POST |
Create a job to render this image at a different size. This link will have one substitution parameter: {size} to specify the new size, e.g. 300x250. URI: /jobs?visualElementNames={elementId}&reportUri={reportUri}&layoutType={layoutType}&selectionType=visualElements&size={size} Response type: application/vnd.sas.report.images.job |
SVG Image
Path: /reportImages/images/{imageId}.svg
When a job provides an image, the job's image object's image link
will point here. This path is unique to the current user.
Because clients should only access this endpoint through the image link(s)
provided with the job, a collection view is omitted.
Links
None. This resource is an actual SVG image (media type: image/svg+xml).
Direct images
Path: /reportImages/directImage?reportUri={reportUri}&size={size}
This method hides the job architecture and directly generates and returns the image. It internally delays response, and if the result is not ready, it issues a redirect to the browser. Use of this method is discouraged because using more than one can starve a browser's requests and because the redirect technique employed can exhaust a browser's redirect patience.
This resource does not support cached images (there's no way to poll for the fresh image).
Any client capable of following the job pattern should NOT use this direct approach.
Administrator maintenance
Path: /reportImages/images
Path: /reportImages/images?reportUri={reportUri}
An administrator can delete all cached images (the first form) or all images associated with a specific report (the second form). There are no associated links or other inputs (204 response).
These operations should not be necessary because the per-user analysis should not return stale images. By default, cached images are automatically removed after 2 weeks.
Report Transforms
Base URLs:
- https://example.com/reportTransforms
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 creates and manipulates "transforms" of SAS reports that conform to the Business Intelligence Report Definition (BIRD) specification. A transform is a wrapper for a BIRD report. When a transform is part of a request, it contains instructions and parameters to perform an editing action or structural modification to the report. When a transform is part of a response, it describes the action or modification that was performed or attempted. The response transform contains either the BIRD report directly, or it has a reference to a persistent report. All GET operations have a corresponding HEAD that is identical in all respects, except that a response body is not returned.
Usage Notes
Overview
Context
This API is provided by the Report Transforms microservice.
Purpose
The Report Transforms microservice helps applications create relatively simple Business Intelligence Report Definition (BIRD) reports that they can display via Visual Analytics viewers. It also provides ways to make simple alterations of BIRD reports for some of the most common application requirements.
A few typical transformations are
- to replace one or more data source(s) in an existing report with different data source(s).
- to change the UI theme of the report.
- to translate labels in the report to a different national language.
- to change current or default parameter values inside the report. (version 3)
- to generate an automatic visualization report of a specified data source and columns. (version 3)
- to add filters (version 3) or apply rankings (version 3) to a report.
The API is designed as a general "report transformation" protocol and is extensible to other purposes in each subsequent release of the service.
Resources
The application/vnd.sas.report.transform resource is a description of
how a BIRD report is to be transformed or has been transformed. As the
body of a request, the transform resource object can contain the BIRD
report content as an input, or it can contain a reference to a report
resource in the repository. Likewise, in a response the transform can
contain the modified content of a report or a reference to a report
resource that has been saved. The report content is the same format as for
the media type application/vnd.sas.report.content, which is either XML or JSON.
The transform also has attributes to describe what should be done, or what has been done, to produce the "transformed report".
The transform resource normally has a short lifetime and is not persisted between requests, but, as an object in a client language, it could be retained by the client and reused as template action. For example, the client could repeatedly create new BIRD reports and save them as report resources.
A transform's specified actions are required to be quick and synchronous.
Transform actions must not take so long that an asynchronous job creation would be necessary.
Terminology
API version
the API version, from the info objects in an Open API document. The latest version may be accessed with id @latest.
API revision
a revision of a specific version of an Open API document. Each update to a specific version creates a new revision. The latest revion may be accessed with the revision id @latest.
SAS Report or BIRD report
an XML or JSON document that conforms to the Business Intelligence Report Definition.
report resource
a resource provided by the Reports microservice. It is represented by two primary media types: application/vnd.sas.report for the general metadata about the report and application/vnd.sas.report.content for the actual XML body. (The report service always stores reports as XML, which is the canonical form that can be validated by an XML Schema, but the report can also be read and written as JSON.)
transform
a description or specification of an operation that has been done, or or will be done, to a BIRD Report. The transform can contain a BIRD report for either the input or the output of the operation. Before the operation is done, the transform's attributes specify what to do to the report. After the operation is done, the transform's attributes specify what was done as well as information about the report that was recorded during the operation.
localization worksheet
a listing of keys and strings for a BIRD Report used by a human translator. The localization worksheet can be extracted from a BIRD Report for a given language, and the translator can substitute a translation in the given language for any or all strings in the list. The localization worksheet can then be submitted back to the service and attached to the report. The localization worksheet can be extracted and submitted any number of times as the translator works incrementally. (There are limits on what can be changed in a BIRD report after the localization process has started. Only minor editing can be done without invalidating the localization worksheets that have already been submitted.)
translated report
a BIRD report in which all the translatable strings in the original author's language have been replaced by strings in a target language taken from a localization worksheet, as defined above. Once a translated report has been created, it is typically saved as a copy separate from the original report.
rethemed report
a BIRD report whose theme has been changed.
parameterized report
a BIRD report in which the current values of prompts, parameters, and other items having such values have been changed so that they match replacement values specified by the input to a "parameterizing" action. (Version 2 "internal" feature)
automatic report
a BIRD report showing an automatically-selected visualization of a specified data source. Similar to the result one gets when selecting columns from a data source in the SAS Visual Analytics Editor and dragging them to the editor canvas. An appropriate single chart, table or cross tabulation is generated. (Version 2 "internal" feature)
Error Codes
Levels of Severity
Fatal Errors
For errors from which there is no recovery or for errors that are caused by unexpected system problems, the API uses the standard error response type, application/vnd.sas.error, to propagate error messages and codes to the client. This happens also when the request parameters or body cannot be processed by Spring prior to the service code being called. Fatal errors return immediately to the client with a 400 or 500 level application/vnd.sas.error response.
Severe Errors
Not all error codes are returned as application/vnd.sas.error. Many are caught and recorded but do not immediately halt the transform action. This allows for actually returning a response application/vnd.sas.report.transform and getting information about multiple problems. A typical case is when there are mismatches between variables in original and replacement data sources. Every mismatch by itself prevents the overall transform from being completed, but processing must continue because the application wants to know about all the errors in the response. In this case, the error code is returned with a localized message in the transform's "errorMessages" list, which lets the application interpret the error codes.
Severe errors do prevent the action from completing. For example, if columns cannot be matched when creating dataMappedReports,
the response transform's BIRD report will not be altered. Or, if the result was supposed to be saved to a new BIRD report, nothing will be persisted.
Schema validation errors and warnings do not necessarily stop processing of the transform.
If the process can continue, it will; but generally, if the client requires processing a report that is not schema valid,
it should override the query parameter "validate=false" to cause the process to skip validation entirely.
Problems
Questionable values or situations in the report are recorded in the response transform's messages list.
If the transform action is to create semantic evaluation,
this is where to look for individual problems. These messages have an error code value of zero.
Error Code Table
The errors are grouped by functional area. Some of the errors are shared by endpoints that use common platform services.
| HTTP Status Code | Error Code | Description |
|---|---|---|
| 200(+msgs) | 27505 | dataMappedReports (Data) Cannot change the data source as specified. Result returned, but left unchanged.(severe) |
| 200(+msgs) | 27506 | dataMappedReports (Data) Cannot obtain data service executor (severe) |
| 200(+msgs) | 27507 | dataMappedReports (Data) Cannot obtain data service executor (severe) |
| 200(+msgs) | 27508 | dataMappedReports (Data) Failure in getting metadata about replacement table. Usually means that the replacement table does not exist. (severe) |
| 400 | 27509 | dataMappedReports (Data) Invalid combination of original and replacement data sources. (fatal) |
| 200(+msgs) | 27510 | dataMappedReports (Data) No replacement data source was specified. No attempt was made to change anything.(fatal) |
| 200(+msgs) | 27511 | dataMappedReports (Data) One or more source columns could not be matched to a replacement. (severe) |
| 200(+msgs) | 27512 | dataMappedReports (Data) Original and replacement column names do not match. (severe) |
| 200(+msgs) | 27513 | dataMappedReports (Data) Original column usage conflicts with replacement column usage attribute.(severe) |
| 400 | 27514 | dataMappedReports (Data) The replacement data source specified was not found. (fatal) |
| 200(+msgs) | 27515 | dataMappedReports (Data) Transform data change parameters are inconsistent. (severe) |
| 500, 403 | 27530 | dataMappedReports,translationWorksheets (Report Repository) content read failed. (fatal) |
| 500, 403 | 27531 | dataMappedReports,translationWorksheets,translatedReports (Report Repository) content write failed.(fatal) |
| 200(+msgs) | 27532 | dataMappedReports,translationWorksheets (Report Repository) Invalid folder URI for writing result report. Changes to transform might have happened but report content was not saved. (severe) |
| 200(+msgs) | 27533 | dataMappedReports,translationWorksheets (Report Repository) Invalid report URI Changes to transform might have happened, but report content persistence failed. (severe) |
| 400 | 27534 | convertedReports (Report) converting between XML and JSON formats failed. (fatal) |
| 400 | 27535 | ALL (Report) Input BIRD report content is invalid. (fatal) |
| 500 | 27536 | ALL (Report) JSON content serialization or deserialization failed. (fatal) |
| 400 | 27537 | dataMappedReports,translationWorksheets,translatedReports Report content is not present in transform. (fatal) |
| 200(+msgs) | 27540 | ALL Schema: Report failed schema validation. Validation completed with errors. See msgs.(severe) |
| 200(+msgs) | 27541 | ALL Schema: XML Schema processing failed or schema not found. Validation was skipped, but other processing continued. (severe) |
| 500 | 27550 | translatedReports Translation failure with unknown cause. (fatal) |
| 200(+msgs) | 27541 | translatedReports The requested localization not present in report (severe) |
| 200(+msgs) | 27560 | translationWorksheets Worksheet: empty or otherwise invalid worksheet content (severe) |
| 409,412,428 | 27561 | translationWorksheets Worksheet: Update failed because report has changed, or precondition omitted, or precondition incorrect (fatal) |
| 400 | 27570 | rethemedReports (Themes)The specified report theme does not exist. (fatal) |
| 400 | 27575 | parameterizedReports (Report) To be added when decision is made that these are production in v3. (fatal) |
| 400 | 27580 | automaticReports (Report) To be added when decision is made that these are production in v3. (fatal) |
| 400 | 27590 | filteredReports (Report) To be added when decision is made that these are production in v3. (fatal) |
| 400 | 27595 | rankedReports (Report) To be added when decision is made that these are production in v3. (fatal) |
Operations
Service
Getting the status of the service and a description of the API.
Get list of top-level links
Code samples
# You can also use wget
curl -X GET https://example.com/reportTransforms/ \
-H 'Accept: application/vnd.sas.api+json'
const headers = {
'Accept':'application/vnd.sas.api+json'
};
fetch('https://example.com/reportTransforms/',
{
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/reportTransforms/', 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/reportTransforms/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /
Returns a list of top-level links to the resources available in the service.
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 | Return top-level links in type application/vnd.sas.api. | api |
| 400 | Bad Request | The request was invalid. An error in the request resulted in failure to perform the action. See the error codes table for additional details. | error2 |
Response Headers
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 200 | Content-Type | string | Format matches the request Accept header. | |
| 400 | Content-Type | string | No description |
Datasources
Mapping the data sources used by a BIRD report to different data sources.
Change report data source
Code samples
# You can also use wget
curl -X POST https://example.com/reportTransforms/dataMappedReports \
-H 'Content-Type: application/vnd.sas.report.transform+json' \
-H 'Accept: application/vnd.sas.report.transform+json'
const inputBody = '{
"id": "string",
"version": 0,
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"inputReportUri": "https://example.com",
"resultReportName": "https://example.com",
"resultParentFolderUri": "https://example.com",
"resultReport": {
"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
},
"dataSources": [
{
"purpose": "original",
"namePattern": "serverLibraryTable",
"server": "cas1",
"library": "public",
"table": "mailorders",
"replacementLabel": "Mail Orders for Current Year",
"dataItemReplacements": [
{
"originalName": "bi124",
"replacementColumn": "customer"
},
{
"originalColumn": "ADDR",
"replacementColumn": "Address"
}
]
}
],
"schemaValidationStatus": "schemaValid",
"evaluationStatus": "evaluationValid",
"evaluation": [
"string"
],
"messages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"errorMessages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"substitutionParameters": [
{
"key": "string",
"label": "string",
"site": "parameterDefinition",
"structure": "single",
"type": "string",
"values": [
"string"
]
}
],
"reportContent": {
"xmlns": "string",
"label": "string",
"modifiedBy": "string",
"dateCreated": "2019-08-24T14:15:22Z",
"dateModified": "2019-08-24T14:15:22Z",
"lastModifiedApplicationName": "string",
"createdBy": "string",
"createdApplicationName": "string",
"createdLocale": "string",
"createdVersion": "string"
},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.report.transform+json',
'Accept':'application/vnd.sas.report.transform+json'
};
fetch('https://example.com/reportTransforms/dataMappedReports',
{
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.transform+json',
'Accept': 'application/vnd.sas.report.transform+json'
}
r = requests.post('https://example.com/reportTransforms/dataMappedReports', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.transform+json"},
"Accept": []string{"application/vnd.sas.report.transform+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reportTransforms/dataMappedReports", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /dataMappedReports
Create a new report based on the input report. Swap one data source for another, and map data columns to corresponding replacement columns. The transform object must specify the original data source and the replacement data source. The replacement data source must exist, as its variables are matched against the original to determine whether the replacement is valid. The input and output formats must match. If a JSON request is posted, a JSON response must be accepted, and likewise for XML.
Body parameter
{
"id": "string",
"version": 0,
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"inputReportUri": "https://example.com",
"resultReportName": "https://example.com",
"resultParentFolderUri": "https://example.com",
"resultReport": {
"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
},
"dataSources": [
{
"purpose": "original",
"namePattern": "serverLibraryTable",
"server": "cas1",
"library": "public",
"table": "mailorders",
"replacementLabel": "Mail Orders for Current Year",
"dataItemReplacements": [
{
"originalName": "bi124",
"replacementColumn": "customer"
},
{
"originalColumn": "ADDR",
"replacementColumn": "Address"
}
]
}
],
"schemaValidationStatus": "schemaValid",
"evaluationStatus": "evaluationValid",
"evaluation": [
"string"
],
"messages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"errorMessages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"substitutionParameters": [
{
"key": "string",
"label": "string",
"site": "parameterDefinition",
"structure": "single",
"type": "string",
"values": [
"string"
]
}
],
"reportContent": {
"xmlns": "string",
"label": "string",
"modifiedBy": "string",
"dateCreated": "2019-08-24T14:15:22Z",
"dateModified": "2019-08-24T14:15:22Z",
"lastModifiedApplicationName": "string",
"createdBy": "string",
"createdApplicationName": "string",
"createdLocale": "string",
"createdVersion": "string"
},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
<?xml version="1.0" encoding="UTF-8" ?>
<transform>
<id>string</id>
<version>0</version>
<creationTimeStamp>2019-08-24T14:15:22Z</creationTimeStamp>
<createdBy>string</createdBy>
<modifiedTimeStamp>2019-08-24T14:15:22Z</modifiedTimeStamp>
<modifiedBy>string</modifiedBy>
<inputReportUri>https://example.com</inputReportUri>
<resultReportName>https://example.com</resultReportName>
<resultParentFolderUri>https://example.com</resultParentFolderUri>
<resultReport>
<id>f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</id>
<name>Sample Report</name>
<description>Description of a sample report.</description>
<creationTimeStamp>2019-08-24T14:15:22Z</creationTimeStamp>
<createdBy>user1</createdBy>
<modifiedTimeStamp>2019-08-24T14:15:22Z</modifiedTimeStamp>
<modifiedBy>user1</modifiedBy>
<links>
<method>GET</method>
<rel>self</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</uri>
<type>application/vnd.sas.report</type>
</links>
<links>
<method>GET</method>
<rel>alternate</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</uri>
<type>application/vnd.sas.summary</type>
</links>
<links>
<method>PUT</method>
<rel>update</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</uri>
<type>application/vnd.sas.report</type>
<responseType>application/vnd.sas.report</responseType>
</links>
<links>
<method>PUT</method>
<rel>updateContent</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content</uri>
<type>application/vnd.sas.report.content</type>
<responseType>application/vnd.sas.report.content</responseType>
</links>
<imageUris>
<icon>/reports/icons/report.gif</icon>
</imageUris>
<version>1</version>
</resultReport>
<dataSources>
<purpose>original</purpose>
<namePattern>serverLibraryTable</namePattern>
<server>cas1</server>
<library>public</library>
<table>mailorders</table>
<replacementLabel>Mail Orders for Current Year</replacementLabel>
<dataItemReplacements>
<originalName>bi124</originalName>
<replacementColumn>customer</replacementColumn>
</dataItemReplacements>
<dataItemReplacements>
<originalColumn>ADDR</originalColumn>
<replacementColumn>Address</replacementColumn>
</dataItemReplacements>
</dataSources>
<schemaValidationStatus>schemaValid</schemaValidationStatus>
<evaluationStatus>evaluationValid</evaluationStatus>
<evaluation>string</evaluation>
<messages>
<code>27599</code>
<text>There was a problem in transforming this element.</text>
<item>bi1349</item>
</messages>
<errorMessages>
<code>27599</code>
<text>There was a problem in transforming this element.</text>
<item>bi1349</item>
</errorMessages>
<substitutionParameters>
<key>string</key>
<label>string</label>
<site>parameterDefinition</site>
<structure>single</structure>
<type>string</type>
<values>string</values>
</substitutionParameters>
<reportContent>
<xmlns>string</xmlns>
<label>string</label>
<modifiedBy>string</modifiedBy>
<dateCreated>2019-08-24T14:15:22Z</dateCreated>
<dateModified>2019-08-24T14:15:22Z</dateModified>
<lastModifiedApplicationName>string</lastModifiedApplicationName>
<createdBy>string</createdBy>
<createdApplicationName>string</createdApplicationName>
<createdLocale>string</createdLocale>
<createdVersion>string</createdVersion>
</reportContent>
<links>
<method>string</method>
<rel>string</rel>
<uri>string</uri>
<href>string</href>
<title>string</title>
<type>string</type>
<itemType>string</itemType>
<responseType>string</responseType>
<responseItemType>string</responseItemType>
</links>
</transform>
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| useSavedReport | query | boolean | false | Specifies whether to find the source (or input) report as a permanent resource. If true, the input transform must contain the URI of a saved report resource that contains the input BIRD content. The default is false, meaning that the input report content is in the transform in the request body. |
| saveResult | query | boolean | false | Determines whether the transformed report is saved to the repository. If false, the transformed report is returned to the client as part of the body. If true, the BIRD content is not returned directly in the body of the response, but is saved in the repository as a report resource. The vnd.sas.report.transform in the response body contains links to retrieve the resulting resource. |
| failOnDataSourceError | query | boolean | false | When the replacement data source is tested for compatibility and serious errors occur, the service can either fail and return, or it can attempt to continue. This parameter can be used to force a change even if there are errors. |
| validate | query | boolean | false | Determine whether the report content should be validated against the XML schema. Defaults to true. Schema validation errors do not necessarily halt processing. Errors are reported in the transform's errorMessages list. |
| body | body | transform | true | The body of the request contains the input transform and the report content (or reference to the report) on which data mapping is performed. |
Example responses
201 Response
{
"id": "string",
"version": 0,
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"inputReportUri": "https://example.com",
"resultReportName": "https://example.com",
"resultParentFolderUri": "https://example.com",
"resultReport": {
"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
},
"dataSources": [
{
"purpose": "original",
"namePattern": "serverLibraryTable",
"server": "cas1",
"library": "public",
"table": "mailorders",
"replacementLabel": "Mail Orders for Current Year",
"dataItemReplacements": [
{
"originalName": "bi124",
"replacementColumn": "customer"
},
{
"originalColumn": "ADDR",
"replacementColumn": "Address"
}
]
}
],
"schemaValidationStatus": "schemaValid",
"evaluationStatus": "evaluationValid",
"evaluation": [
"string"
],
"messages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"errorMessages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"substitutionParameters": [
{
"key": "string",
"label": "string",
"site": "parameterDefinition",
"structure": "single",
"type": "string",
"values": [
"string"
]
}
],
"reportContent": {
"xmlns": "string",
"label": "string",
"modifiedBy": "string",
"dateCreated": "2019-08-24T14:15:22Z",
"dateModified": "2019-08-24T14:15:22Z",
"lastModifiedApplicationName": "string",
"createdBy": "string",
"createdApplicationName": "string",
"createdLocale": "string",
"createdVersion": "string"
},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
<?xml version="1.0" encoding="UTF-8" ?>
<transform>
<id>string</id>
<version>0</version>
<creationTimeStamp>2019-08-24T14:15:22Z</creationTimeStamp>
<createdBy>string</createdBy>
<modifiedTimeStamp>2019-08-24T14:15:22Z</modifiedTimeStamp>
<modifiedBy>string</modifiedBy>
<inputReportUri>https://example.com</inputReportUri>
<resultReportName>https://example.com</resultReportName>
<resultParentFolderUri>https://example.com</resultParentFolderUri>
<resultReport>
<id>f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</id>
<name>Sample Report</name>
<description>Description of a sample report.</description>
<creationTimeStamp>2019-08-24T14:15:22Z</creationTimeStamp>
<createdBy>user1</createdBy>
<modifiedTimeStamp>2019-08-24T14:15:22Z</modifiedTimeStamp>
<modifiedBy>user1</modifiedBy>
<links>
<method>GET</method>
<rel>self</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</uri>
<type>application/vnd.sas.report</type>
</links>
<links>
<method>GET</method>
<rel>alternate</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</uri>
<type>application/vnd.sas.summary</type>
</links>
<links>
<method>PUT</method>
<rel>update</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</uri>
<type>application/vnd.sas.report</type>
<responseType>application/vnd.sas.report</responseType>
</links>
<links>
<method>PUT</method>
<rel>updateContent</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content</uri>
<type>application/vnd.sas.report.content</type>
<responseType>application/vnd.sas.report.content</responseType>
</links>
<imageUris>
<icon>/reports/icons/report.gif</icon>
</imageUris>
<version>1</version>
</resultReport>
<dataSources>
<purpose>original</purpose>
<namePattern>serverLibraryTable</namePattern>
<server>cas1</server>
<library>public</library>
<table>mailorders</table>
<replacementLabel>Mail Orders for Current Year</replacementLabel>
<dataItemReplacements>
<originalName>bi124</originalName>
<replacementColumn>customer</replacementColumn>
</dataItemReplacements>
<dataItemReplacements>
<originalColumn>ADDR</originalColumn>
<replacementColumn>Address</replacementColumn>
</dataItemReplacements>
</dataSources>
<schemaValidationStatus>schemaValid</schemaValidationStatus>
<evaluationStatus>evaluationValid</evaluationStatus>
<evaluation>string</evaluation>
<messages>
<code>27599</code>
<text>There was a problem in transforming this element.</text>
<item>bi1349</item>
</messages>
<errorMessages>
<code>27599</code>
<text>There was a problem in transforming this element.</text>
<item>bi1349</item>
</errorMessages>
<substitutionParameters>
<key>string</key>
<label>string</label>
<site>parameterDefinition</site>
<structure>single</structure>
<type>string</type>
<values>string</values>
</substitutionParameters>
<reportContent>
<xmlns>string</xmlns>
<label>string</label>
<modifiedBy>string</modifiedBy>
<dateCreated>2019-08-24T14:15:22Z</dateCreated>
<dateModified>2019-08-24T14:15:22Z</dateModified>
<lastModifiedApplicationName>string</lastModifiedApplicationName>
<createdBy>string</createdBy>
<createdApplicationName>string</createdApplicationName>
<createdLocale>string</createdLocale>
<createdVersion>string</createdVersion>
</reportContent>
<links>
<method>string</method>
<rel>string</rel>
<uri>string</uri>
<href>string</href>
<title>string</title>
<type>string</type>
<itemType>string</itemType>
<responseType>string</responseType>
<responseItemType>string</responseItemType>
</links>
</transform>
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Successful transformation. The resulting transform was "created" and returned. | transform |
| 400 | Bad Request | The request was invalid. | error2 |
| 409 | Conflict | The service cannot return what is requested. This can happen if the data is unavailable or if there is a mismatch between the requested data and the report's current data. Error messages attempt to describe the root cause. | error2 |
| 415 | Unsupported Media Type | The media types and formats for the request and response should match (JSON or XML). | error2 |
Response Headers
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 201 | Content-Type | string | The application/vnd.sas.report.transform response contains the BIRD report in its reportContent property. If saveResult is true, the savedReportResource property of the transform contains the URI for the application/vnd.sas.report resource that was saved. |
|
| 201 | ETag | string | Identifier for preconditions of the saved report, when saveReport was specified. | |
| 201 | Last-Modified | string | Date and time at which the resulting report was saved. | |
| 201 | Location | string | Location of created report resource, if saved. Also contained in the links of the response transform. | |
| 400 | Content-Type | string | No description | |
| 400 | Location | string | This header is usually not set on an error response. | |
| 409 | Content-Type | string | No description | |
| 409 | Location | string | This header is generally not set on an error response. | |
| 415 | Content-Type | string | No description | |
| 415 | Location | string | Not generally set on this error. |
Translation
Assisting language translators and report authors to translate BIRD reports into a different human language.
Get translation worksheet for report
Code samples
# You can also use wget
curl -X GET https://example.com/reportTransforms/translationWorksheets/{reportId}/{translationLocale} \
-H 'Accept: text/plain'
const headers = {
'Accept':'text/plain'
};
fetch('https://example.com/reportTransforms/translationWorksheets/{reportId}/{translationLocale}',
{
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/reportTransforms/translationWorksheets/{reportId}/{translationLocale}', 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/reportTransforms/translationWorksheets/{reportId}/{translationLocale}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /translationWorksheets/{reportId}/{translationLocale}
Extract the translatable strings from an existing report and return a worksheet that can be used by a human translator to specify the strings in a different language.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| reportId | path | string | true | The resource Id of the report that should be processed. |
| translationLocale | path | string | true | The locale specifier for which strings should be extracted. If the locale is not defined in the report, an HTTP 400 error is returned. |
| validate | query | boolean | false | Determine whether to validate the report content against the XML schema. Defaults to true. Schema validation errors do not necessarily halt processing. Errors are reported in the transform's errorMessages list. Worksheet creation will be completed even after an error. |
Example responses
200 Response
{"locale":"string","lines":["string"],"links":[{"method":"string","rel":"string","uri":"string","href":"string","title":"string","type":"string","itemType":"string","responseType":"string","responseItemType":"string"}],"version":0}
{
"locale": "string",
"lines": [
"string"
],
"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 | Successfully retrieved the worksheet from the report. | translationWorksheet |
| 400 | Bad Request | The request was invalid. | error2 |
Response Headers
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 200 | Content-Type | string | As specified above. | |
| 200 | ETag | string | Identifier of existing report for precondition of PUT. | |
| 200 | Last-Modified | string | Not typically set. Use the ETag. | |
| 400 | Content-Type | string | No description | |
| 400 | ETag | string | Identifier of existing report for precondition of PUT. Not typically set on error condition | |
| 400 | Last-Modified | string | Not typically set. Use the ETag. |
Update localization in a report
Code samples
# You can also use wget
curl -X PUT https://example.com/reportTransforms/translationWorksheets/{reportId}/{translationLocale} \
-H 'Content-Type: text/plain' \
-H 'Accept: text/plain' \
-H 'If-Match: string'
const inputBody = '{
"locale": "string",
"lines": [
"string"
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}';
const headers = {
'Content-Type':'text/plain',
'Accept':'text/plain',
'If-Match':'string'
};
fetch('https://example.com/reportTransforms/translationWorksheets/{reportId}/{translationLocale}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'text/plain',
'Accept': 'text/plain',
'If-Match': 'string'
}
r = requests.put('https://example.com/reportTransforms/translationWorksheets/{reportId}/{translationLocale}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"text/plain"},
"Accept": []string{"text/plain"},
"If-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/reportTransforms/translationWorksheets/{reportId}/{translationLocale}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /translationWorksheets/{reportId}/{translationLocale}
Insert the translator's language worksheet into an existing report and save the report. This saves the human translator's strings for the specified locale so that the report can be generated later in the locale's language. This action returns no content.
Body parameter
{
"locale": "string",
"lines": [
"string"
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
locale: string
lines:
- string
links:
- method: string
rel: string
uri: string
href: string
title: string
type: string
itemType: string
responseType: string
responseItemType: string
version: 0
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| reportId | path | string | true | The report from which the original report should be read. |
| If-Match | header | string | false | The etag identifier from the last GET of the report. |
| translationLocale | path | string | true | The locale for which the translation should be extracted. |
| body | body | translationWorksheet | true | The body of the request is the translation worksheet. |
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}
{
"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 | See code 204. This is a departure from a typical PUT, which would return the modified object, but in this case, returning the modified report is undesirable. | None |
| 204 | No Content | Worksheet was inserted into the report. No content returned. | None |
| 400 | Bad Request | The request was invalid. | error2 |
| 412 | Precondition Failed | The header If-Match Etag value did not match. | error2 |
| 428 | Precondition Required | The precondition header If-Match was not provided. | error2 |
Response Headers
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 200 | ETag | string | See code 204. | |
| 204 | ETag | string | Identifier of modified report for precondition of subsequent PUT. | |
| 204 | Location | string | Location of modified report resource. Should be duplicate information that matches the input parameter. | |
| 400 | Content-Type | string | No description | |
| 412 | Content-Type | string | No description | |
| 428 | Content-Type | string | No description |
Get localization worksheet
Code samples
# You can also use wget
curl -X POST https://example.com/reportTransforms/translationWorksheets/{translationLocale}#content \
-H 'Content-Type: application/vnd.sas.report.transform+json' \
-H 'Accept: text/plain'
const inputBody = '{
"id": "string",
"version": 0,
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"inputReportUri": "https://example.com",
"resultReportName": "https://example.com",
"resultParentFolderUri": "https://example.com",
"resultReport": {
"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
},
"dataSources": [
{
"purpose": "original",
"namePattern": "serverLibraryTable",
"server": "cas1",
"library": "public",
"table": "mailorders",
"replacementLabel": "Mail Orders for Current Year",
"dataItemReplacements": [
{
"originalName": "bi124",
"replacementColumn": "customer"
},
{
"originalColumn": "ADDR",
"replacementColumn": "Address"
}
]
}
],
"schemaValidationStatus": "schemaValid",
"evaluationStatus": "evaluationValid",
"evaluation": [
"string"
],
"messages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"errorMessages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"substitutionParameters": [
{
"key": "string",
"label": "string",
"site": "parameterDefinition",
"structure": "single",
"type": "string",
"values": [
"string"
]
}
],
"reportContent": {
"xmlns": "string",
"label": "string",
"modifiedBy": "string",
"dateCreated": "2019-08-24T14:15:22Z",
"dateModified": "2019-08-24T14:15:22Z",
"lastModifiedApplicationName": "string",
"createdBy": "string",
"createdApplicationName": "string",
"createdLocale": "string",
"createdVersion": "string"
},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.report.transform+json',
'Accept':'text/plain'
};
fetch('https://example.com/reportTransforms/translationWorksheets/{translationLocale}#content',
{
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.transform+json',
'Accept': 'text/plain'
}
r = requests.post('https://example.com/reportTransforms/translationWorksheets/{translationLocale}#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.transform+json"},
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reportTransforms/translationWorksheets/{translationLocale}#content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /translationWorksheets/{translationLocale}
Extract the translator's localization worksheet from a report for the specified locale. The human translator can use the worksheet to translate individual strings, and the worksheet can later be saved back to the report.
Body parameter
{
"id": "string",
"version": 0,
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"inputReportUri": "https://example.com",
"resultReportName": "https://example.com",
"resultParentFolderUri": "https://example.com",
"resultReport": {
"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
},
"dataSources": [
{
"purpose": "original",
"namePattern": "serverLibraryTable",
"server": "cas1",
"library": "public",
"table": "mailorders",
"replacementLabel": "Mail Orders for Current Year",
"dataItemReplacements": [
{
"originalName": "bi124",
"replacementColumn": "customer"
},
{
"originalColumn": "ADDR",
"replacementColumn": "Address"
}
]
}
],
"schemaValidationStatus": "schemaValid",
"evaluationStatus": "evaluationValid",
"evaluation": [
"string"
],
"messages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"errorMessages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"substitutionParameters": [
{
"key": "string",
"label": "string",
"site": "parameterDefinition",
"structure": "single",
"type": "string",
"values": [
"string"
]
}
],
"reportContent": {
"xmlns": "string",
"label": "string",
"modifiedBy": "string",
"dateCreated": "2019-08-24T14:15:22Z",
"dateModified": "2019-08-24T14:15:22Z",
"lastModifiedApplicationName": "string",
"createdBy": "string",
"createdApplicationName": "string",
"createdLocale": "string",
"createdVersion": "string"
},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
<?xml version="1.0" encoding="UTF-8" ?>
<transform>
<id>string</id>
<version>0</version>
<creationTimeStamp>2019-08-24T14:15:22Z</creationTimeStamp>
<createdBy>string</createdBy>
<modifiedTimeStamp>2019-08-24T14:15:22Z</modifiedTimeStamp>
<modifiedBy>string</modifiedBy>
<inputReportUri>https://example.com</inputReportUri>
<resultReportName>https://example.com</resultReportName>
<resultParentFolderUri>https://example.com</resultParentFolderUri>
<resultReport>
<id>f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</id>
<name>Sample Report</name>
<description>Description of a sample report.</description>
<creationTimeStamp>2019-08-24T14:15:22Z</creationTimeStamp>
<createdBy>user1</createdBy>
<modifiedTimeStamp>2019-08-24T14:15:22Z</modifiedTimeStamp>
<modifiedBy>user1</modifiedBy>
<links>
<method>GET</method>
<rel>self</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</uri>
<type>application/vnd.sas.report</type>
</links>
<links>
<method>GET</method>
<rel>alternate</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</uri>
<type>application/vnd.sas.summary</type>
</links>
<links>
<method>PUT</method>
<rel>update</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</uri>
<type>application/vnd.sas.report</type>
<responseType>application/vnd.sas.report</responseType>
</links>
<links>
<method>PUT</method>
<rel>updateContent</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content</uri>
<type>application/vnd.sas.report.content</type>
<responseType>application/vnd.sas.report.content</responseType>
</links>
<imageUris>
<icon>/reports/icons/report.gif</icon>
</imageUris>
<version>1</version>
</resultReport>
<dataSources>
<purpose>original</purpose>
<namePattern>serverLibraryTable</namePattern>
<server>cas1</server>
<library>public</library>
<table>mailorders</table>
<replacementLabel>Mail Orders for Current Year</replacementLabel>
<dataItemReplacements>
<originalName>bi124</originalName>
<replacementColumn>customer</replacementColumn>
</dataItemReplacements>
<dataItemReplacements>
<originalColumn>ADDR</originalColumn>
<replacementColumn>Address</replacementColumn>
</dataItemReplacements>
</dataSources>
<schemaValidationStatus>schemaValid</schemaValidationStatus>
<evaluationStatus>evaluationValid</evaluationStatus>
<evaluation>string</evaluation>
<messages>
<code>27599</code>
<text>There was a problem in transforming this element.</text>
<item>bi1349</item>
</messages>
<errorMessages>
<code>27599</code>
<text>There was a problem in transforming this element.</text>
<item>bi1349</item>
</errorMessages>
<substitutionParameters>
<key>string</key>
<label>string</label>
<site>parameterDefinition</site>
<structure>single</structure>
<type>string</type>
<values>string</values>
</substitutionParameters>
<reportContent>
<xmlns>string</xmlns>
<label>string</label>
<modifiedBy>string</modifiedBy>
<dateCreated>2019-08-24T14:15:22Z</dateCreated>
<dateModified>2019-08-24T14:15:22Z</dateModified>
<lastModifiedApplicationName>string</lastModifiedApplicationName>
<createdBy>string</createdBy>
<createdApplicationName>string</createdApplicationName>
<createdLocale>string</createdLocale>
<createdVersion>string</createdVersion>
</reportContent>
<links>
<method>string</method>
<rel>string</rel>
<uri>string</uri>
<href>string</href>
<title>string</title>
<type>string</type>
<itemType>string</itemType>
<responseType>string</responseType>
<responseItemType>string</responseItemType>
</links>
</transform>
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| translationLocale | path | string | true | The locale for which the translation should be extracted. |
| validate | query | boolean | false | Determine whether to validate the report content against an XML schema. Defaults to true. Schema validation errors do not necessarily halt processing. Errors are reported in the transform's errorMessages list. The localization action will still be attempted, even if there are errors. |
| body | body | transform | true | The BIRD report from which to extract the translatable strings. |
Example responses
201 Response
{"locale":"string","lines":["string"],"links":[{"method":"string","rel":"string","uri":"string","href":"string","title":"string","type":"string","itemType":"string","responseType":"string","responseItemType":"string"}],"version":0}
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 |
|---|---|---|---|
| 201 | Created | Successful creation of language worksheet from the input report. | translationWorksheet |
| 400 | Bad Request | The request was invalid. Some error in the request resulted in failure to perform the action. See the error codes table for additional details. | error2 |
Response Headers
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 201 | Content-Type | string | As specified above for types produced. | |
| 201 | Location | string | Typically, the location of the persistent report resource, if there is one involved. Not applicable in this situation because results are returned directly to the user. | |
| 400 | Content-Type | string | No description |
Translate a saved report
Code samples
# You can also use wget
curl -X GET https://example.com/reportTransforms/translatedReports/{reportId}/{translationLocale} \
-H 'Accept: application/vnd.sas.report.transform+json'
const headers = {
'Accept':'application/vnd.sas.report.transform+json'
};
fetch('https://example.com/reportTransforms/translatedReports/{reportId}/{translationLocale}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.report.transform+json'
}
r = requests.get('https://example.com/reportTransforms/translatedReports/{reportId}/{translationLocale}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.report.transform+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reportTransforms/translatedReports/{reportId}/{translationLocale}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /translatedReports/{reportId}/{translationLocale}
Translate an existing report into the desired language. Substitutes previously translated strings for the specified language into the body of the report. Uses strings that are in the report's internal localizations.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| reportId | path | string | true | The report from which the report should be read, translated, and returned. |
| translationLocale | path | string | true | The language in which the report should be returned. |
| validate | query | boolean | false | Determine whether to validate the report content against an XML schema. Defaults to true. Schema validation errors do not necessarily halt processing. Errors are reported in the transform's errorMessages list. |
Example responses
200 Response
{
"id": "string",
"version": 0,
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"inputReportUri": "https://example.com",
"resultReportName": "https://example.com",
"resultParentFolderUri": "https://example.com",
"resultReport": {
"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
},
"dataSources": [
{
"purpose": "original",
"namePattern": "serverLibraryTable",
"server": "cas1",
"library": "public",
"table": "mailorders",
"replacementLabel": "Mail Orders for Current Year",
"dataItemReplacements": [
{
"originalName": "bi124",
"replacementColumn": "customer"
},
{
"originalColumn": "ADDR",
"replacementColumn": "Address"
}
]
}
],
"schemaValidationStatus": "schemaValid",
"evaluationStatus": "evaluationValid",
"evaluation": [
"string"
],
"messages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"errorMessages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"substitutionParameters": [
{
"key": "string",
"label": "string",
"site": "parameterDefinition",
"structure": "single",
"type": "string",
"values": [
"string"
]
}
],
"reportContent": {
"xmlns": "string",
"label": "string",
"modifiedBy": "string",
"dateCreated": "2019-08-24T14:15:22Z",
"dateModified": "2019-08-24T14:15:22Z",
"lastModifiedApplicationName": "string",
"createdBy": "string",
"createdApplicationName": "string",
"createdLocale": "string",
"createdVersion": "string"
},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
<?xml version="1.0" encoding="UTF-8" ?>
<transform>
<id>string</id>
<version>0</version>
<creationTimeStamp>2019-08-24T14:15:22Z</creationTimeStamp>
<createdBy>string</createdBy>
<modifiedTimeStamp>2019-08-24T14:15:22Z</modifiedTimeStamp>
<modifiedBy>string</modifiedBy>
<inputReportUri>https://example.com</inputReportUri>
<resultReportName>https://example.com</resultReportName>
<resultParentFolderUri>https://example.com</resultParentFolderUri>
<resultReport>
<id>f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</id>
<name>Sample Report</name>
<description>Description of a sample report.</description>
<creationTimeStamp>2019-08-24T14:15:22Z</creationTimeStamp>
<createdBy>user1</createdBy>
<modifiedTimeStamp>2019-08-24T14:15:22Z</modifiedTimeStamp>
<modifiedBy>user1</modifiedBy>
<links>
<method>GET</method>
<rel>self</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</uri>
<type>application/vnd.sas.report</type>
</links>
<links>
<method>GET</method>
<rel>alternate</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</uri>
<type>application/vnd.sas.summary</type>
</links>
<links>
<method>PUT</method>
<rel>update</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</uri>
<type>application/vnd.sas.report</type>
<responseType>application/vnd.sas.report</responseType>
</links>
<links>
<method>PUT</method>
<rel>updateContent</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content</uri>
<type>application/vnd.sas.report.content</type>
<responseType>application/vnd.sas.report.content</responseType>
</links>
<imageUris>
<icon>/reports/icons/report.gif</icon>
</imageUris>
<version>1</version>
</resultReport>
<dataSources>
<purpose>original</purpose>
<namePattern>serverLibraryTable</namePattern>
<server>cas1</server>
<library>public</library>
<table>mailorders</table>
<replacementLabel>Mail Orders for Current Year</replacementLabel>
<dataItemReplacements>
<originalName>bi124</originalName>
<replacementColumn>customer</replacementColumn>
</dataItemReplacements>
<dataItemReplacements>
<originalColumn>ADDR</originalColumn>
<replacementColumn>Address</replacementColumn>
</dataItemReplacements>
</dataSources>
<schemaValidationStatus>schemaValid</schemaValidationStatus>
<evaluationStatus>evaluationValid</evaluationStatus>
<evaluation>string</evaluation>
<messages>
<code>27599</code>
<text>There was a problem in transforming this element.</text>
<item>bi1349</item>
</messages>
<errorMessages>
<code>27599</code>
<text>There was a problem in transforming this element.</text>
<item>bi1349</item>
</errorMessages>
<substitutionParameters>
<key>string</key>
<label>string</label>
<site>parameterDefinition</site>
<structure>single</structure>
<type>string</type>
<values>string</values>
</substitutionParameters>
<reportContent>
<xmlns>string</xmlns>
<label>string</label>
<modifiedBy>string</modifiedBy>
<dateCreated>2019-08-24T14:15:22Z</dateCreated>
<dateModified>2019-08-24T14:15:22Z</dateModified>
<lastModifiedApplicationName>string</lastModifiedApplicationName>
<createdBy>string</createdBy>
<createdApplicationName>string</createdApplicationName>
<createdLocale>string</createdLocale>
<createdVersion>string</createdVersion>
</reportContent>
<links>
<method>string</method>
<rel>string</rel>
<uri>string</uri>
<href>string</href>
<title>string</title>
<type>string</type>
<itemType>string</itemType>
<responseType>string</responseType>
<responseItemType>string</responseItemType>
</links>
</transform>
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful translation produced from report and returned. | transform |
| 400 | Bad Request | The request contains invalid content that cannot be processed, or the report does not have the translation for the requested locale (error code 27532). | error2 |
Response Headers
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 200 | Content-Type | string | As specified above for type produced. | |
| 200 | ETag | string | Identifier of the existing report. | |
| 200 | Last-Modified | string | Not always set. Use the Etag. | |
| 400 | Content-Type | string | No description |
Translate a submitted report
Code samples
# You can also use wget
curl -X POST https://example.com/reportTransforms/translatedReports/{translationLocale} \
-H 'Content-Type: application/vnd.sas.report.transform+json' \
-H 'Accept: application/vnd.sas.report.transform+json'
const inputBody = '{
"id": "string",
"version": 0,
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"inputReportUri": "https://example.com",
"resultReportName": "https://example.com",
"resultParentFolderUri": "https://example.com",
"resultReport": {
"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
},
"dataSources": [
{
"purpose": "original",
"namePattern": "serverLibraryTable",
"server": "cas1",
"library": "public",
"table": "mailorders",
"replacementLabel": "Mail Orders for Current Year",
"dataItemReplacements": [
{
"originalName": "bi124",
"replacementColumn": "customer"
},
{
"originalColumn": "ADDR",
"replacementColumn": "Address"
}
]
}
],
"schemaValidationStatus": "schemaValid",
"evaluationStatus": "evaluationValid",
"evaluation": [
"string"
],
"messages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"errorMessages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"substitutionParameters": [
{
"key": "string",
"label": "string",
"site": "parameterDefinition",
"structure": "single",
"type": "string",
"values": [
"string"
]
}
],
"reportContent": {
"xmlns": "string",
"label": "string",
"modifiedBy": "string",
"dateCreated": "2019-08-24T14:15:22Z",
"dateModified": "2019-08-24T14:15:22Z",
"lastModifiedApplicationName": "string",
"createdBy": "string",
"createdApplicationName": "string",
"createdLocale": "string",
"createdVersion": "string"
},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.report.transform+json',
'Accept':'application/vnd.sas.report.transform+json'
};
fetch('https://example.com/reportTransforms/translatedReports/{translationLocale}',
{
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.transform+json',
'Accept': 'application/vnd.sas.report.transform+json'
}
r = requests.post('https://example.com/reportTransforms/translatedReports/{translationLocale}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.transform+json"},
"Accept": []string{"application/vnd.sas.report.transform+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reportTransforms/translatedReports/{translationLocale}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /translatedReports/{translationLocale}
Translate the report in the body of the request using its internal localization for the requested language. Substitute the translated strings from the internal localization for the original strings in the body of the report. Return a transform containing the translated report.
Body parameter
{
"id": "string",
"version": 0,
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"inputReportUri": "https://example.com",
"resultReportName": "https://example.com",
"resultParentFolderUri": "https://example.com",
"resultReport": {
"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
},
"dataSources": [
{
"purpose": "original",
"namePattern": "serverLibraryTable",
"server": "cas1",
"library": "public",
"table": "mailorders",
"replacementLabel": "Mail Orders for Current Year",
"dataItemReplacements": [
{
"originalName": "bi124",
"replacementColumn": "customer"
},
{
"originalColumn": "ADDR",
"replacementColumn": "Address"
}
]
}
],
"schemaValidationStatus": "schemaValid",
"evaluationStatus": "evaluationValid",
"evaluation": [
"string"
],
"messages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"errorMessages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"substitutionParameters": [
{
"key": "string",
"label": "string",
"site": "parameterDefinition",
"structure": "single",
"type": "string",
"values": [
"string"
]
}
],
"reportContent": {
"xmlns": "string",
"label": "string",
"modifiedBy": "string",
"dateCreated": "2019-08-24T14:15:22Z",
"dateModified": "2019-08-24T14:15:22Z",
"lastModifiedApplicationName": "string",
"createdBy": "string",
"createdApplicationName": "string",
"createdLocale": "string",
"createdVersion": "string"
},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
<?xml version="1.0" encoding="UTF-8" ?>
<transform>
<id>string</id>
<version>0</version>
<creationTimeStamp>2019-08-24T14:15:22Z</creationTimeStamp>
<createdBy>string</createdBy>
<modifiedTimeStamp>2019-08-24T14:15:22Z</modifiedTimeStamp>
<modifiedBy>string</modifiedBy>
<inputReportUri>https://example.com</inputReportUri>
<resultReportName>https://example.com</resultReportName>
<resultParentFolderUri>https://example.com</resultParentFolderUri>
<resultReport>
<id>f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</id>
<name>Sample Report</name>
<description>Description of a sample report.</description>
<creationTimeStamp>2019-08-24T14:15:22Z</creationTimeStamp>
<createdBy>user1</createdBy>
<modifiedTimeStamp>2019-08-24T14:15:22Z</modifiedTimeStamp>
<modifiedBy>user1</modifiedBy>
<links>
<method>GET</method>
<rel>self</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</uri>
<type>application/vnd.sas.report</type>
</links>
<links>
<method>GET</method>
<rel>alternate</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</uri>
<type>application/vnd.sas.summary</type>
</links>
<links>
<method>PUT</method>
<rel>update</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</uri>
<type>application/vnd.sas.report</type>
<responseType>application/vnd.sas.report</responseType>
</links>
<links>
<method>PUT</method>
<rel>updateContent</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content</uri>
<type>application/vnd.sas.report.content</type>
<responseType>application/vnd.sas.report.content</responseType>
</links>
<imageUris>
<icon>/reports/icons/report.gif</icon>
</imageUris>
<version>1</version>
</resultReport>
<dataSources>
<purpose>original</purpose>
<namePattern>serverLibraryTable</namePattern>
<server>cas1</server>
<library>public</library>
<table>mailorders</table>
<replacementLabel>Mail Orders for Current Year</replacementLabel>
<dataItemReplacements>
<originalName>bi124</originalName>
<replacementColumn>customer</replacementColumn>
</dataItemReplacements>
<dataItemReplacements>
<originalColumn>ADDR</originalColumn>
<replacementColumn>Address</replacementColumn>
</dataItemReplacements>
</dataSources>
<schemaValidationStatus>schemaValid</schemaValidationStatus>
<evaluationStatus>evaluationValid</evaluationStatus>
<evaluation>string</evaluation>
<messages>
<code>27599</code>
<text>There was a problem in transforming this element.</text>
<item>bi1349</item>
</messages>
<errorMessages>
<code>27599</code>
<text>There was a problem in transforming this element.</text>
<item>bi1349</item>
</errorMessages>
<substitutionParameters>
<key>string</key>
<label>string</label>
<site>parameterDefinition</site>
<structure>single</structure>
<type>string</type>
<values>string</values>
</substitutionParameters>
<reportContent>
<xmlns>string</xmlns>
<label>string</label>
<modifiedBy>string</modifiedBy>
<dateCreated>2019-08-24T14:15:22Z</dateCreated>
<dateModified>2019-08-24T14:15:22Z</dateModified>
<lastModifiedApplicationName>string</lastModifiedApplicationName>
<createdBy>string</createdBy>
<createdApplicationName>string</createdApplicationName>
<createdLocale>string</createdLocale>
<createdVersion>string</createdVersion>
</reportContent>
<links>
<method>string</method>
<rel>string</rel>
<uri>string</uri>
<href>string</href>
<title>string</title>
<type>string</type>
<itemType>string</itemType>
<responseType>string</responseType>
<responseItemType>string</responseItemType>
</links>
</transform>
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| translationLocale | path | string | true | The language of the translation. |
| saveResult | query | boolean | false | Determines whether the transformed report is saved to the repository. If false, the transformed report is returned to the client as part of the body. If true, the BIRD report is saved in the repository and not returned in the body of the response. The vnd.sas.report.transform in the response body contains links to retrieve the resulting resource. |
| validate | query | boolean | false | Determine whether the report content is to be schema validated. Defaults to true. When validation is performed, errors do not necessarily halt processing; the evaluation will still be done. |
| body | body | transform | true | The body of the request contains the input transform and the report on which the translation is done. |
Example responses
201 Response
{
"id": "string",
"version": 0,
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"inputReportUri": "https://example.com",
"resultReportName": "https://example.com",
"resultParentFolderUri": "https://example.com",
"resultReport": {
"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
},
"dataSources": [
{
"purpose": "original",
"namePattern": "serverLibraryTable",
"server": "cas1",
"library": "public",
"table": "mailorders",
"replacementLabel": "Mail Orders for Current Year",
"dataItemReplacements": [
{
"originalName": "bi124",
"replacementColumn": "customer"
},
{
"originalColumn": "ADDR",
"replacementColumn": "Address"
}
]
}
],
"schemaValidationStatus": "schemaValid",
"evaluationStatus": "evaluationValid",
"evaluation": [
"string"
],
"messages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"errorMessages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"substitutionParameters": [
{
"key": "string",
"label": "string",
"site": "parameterDefinition",
"structure": "single",
"type": "string",
"values": [
"string"
]
}
],
"reportContent": {
"xmlns": "string",
"label": "string",
"modifiedBy": "string",
"dateCreated": "2019-08-24T14:15:22Z",
"dateModified": "2019-08-24T14:15:22Z",
"lastModifiedApplicationName": "string",
"createdBy": "string",
"createdApplicationName": "string",
"createdLocale": "string",
"createdVersion": "string"
},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
<?xml version="1.0" encoding="UTF-8" ?>
<transform>
<id>string</id>
<version>0</version>
<creationTimeStamp>2019-08-24T14:15:22Z</creationTimeStamp>
<createdBy>string</createdBy>
<modifiedTimeStamp>2019-08-24T14:15:22Z</modifiedTimeStamp>
<modifiedBy>string</modifiedBy>
<inputReportUri>https://example.com</inputReportUri>
<resultReportName>https://example.com</resultReportName>
<resultParentFolderUri>https://example.com</resultParentFolderUri>
<resultReport>
<id>f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</id>
<name>Sample Report</name>
<description>Description of a sample report.</description>
<creationTimeStamp>2019-08-24T14:15:22Z</creationTimeStamp>
<createdBy>user1</createdBy>
<modifiedTimeStamp>2019-08-24T14:15:22Z</modifiedTimeStamp>
<modifiedBy>user1</modifiedBy>
<links>
<method>GET</method>
<rel>self</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</uri>
<type>application/vnd.sas.report</type>
</links>
<links>
<method>GET</method>
<rel>alternate</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</uri>
<type>application/vnd.sas.summary</type>
</links>
<links>
<method>PUT</method>
<rel>update</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf</uri>
<type>application/vnd.sas.report</type>
<responseType>application/vnd.sas.report</responseType>
</links>
<links>
<method>PUT</method>
<rel>updateContent</rel>
<href>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content</href>
<uri>/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content</uri>
<type>application/vnd.sas.report.content</type>
<responseType>application/vnd.sas.report.content</responseType>
</links>
<imageUris>
<icon>/reports/icons/report.gif</icon>
</imageUris>
<version>1</version>
</resultReport>
<dataSources>
<purpose>original</purpose>
<namePattern>serverLibraryTable</namePattern>
<server>cas1</server>
<library>public</library>
<table>mailorders</table>
<replacementLabel>Mail Orders for Current Year</replacementLabel>
<dataItemReplacements>
<originalName>bi124</originalName>
<replacementColumn>customer</replacementColumn>
</dataItemReplacements>
<dataItemReplacements>
<originalColumn>ADDR</originalColumn>
<replacementColumn>Address</replacementColumn>
</dataItemReplacements>
</dataSources>
<schemaValidationStatus>schemaValid</schemaValidationStatus>
<evaluationStatus>evaluationValid</evaluationStatus>
<evaluation>string</evaluation>
<messages>
<code>27599</code>
<text>There was a problem in transforming this element.</text>
<item>bi1349</item>
</messages>
<errorMessages>
<code>27599</code>
<text>There was a problem in transforming this element.</text>
<item>bi1349</item>
</errorMessages>
<substitutionParameters>
<key>string</key>
<label>string</label>
<site>parameterDefinition</site>
<structure>single</structure>
<type>string</type>
<values>string</values>
</substitutionParameters>
<reportContent>
<xmlns>string</xmlns>
<label>string</label>
<modifiedBy>string</modifiedBy>
<dateCreated>2019-08-24T14:15:22Z</dateCreated>
<dateModified>2019-08-24T14:15:22Z</dateModified>
<lastModifiedApplicationName>string</lastModifiedApplicationName>
<createdBy>string</createdBy>
<createdApplicationName>string</createdApplicationName>
<createdLocale>string</createdLocale>
<createdVersion>string</createdVersion>
</reportContent>
<links>
<method>string</method>
<rel>string</rel>
<uri>string</uri>
<href>string</href>
<title>string</title>
<type>string</type>
<itemType>string</itemType>
<responseType>string</responseType>
<responseItemType>string</responseItemType>
</links>
</transform>
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Successfully translated version of the report generated and returned. | transform |
| 400 | Bad Request | The request was invalid. | error2 |
| 406 | Not Acceptable | The media type, the specified locale, or the strings for translation were incorrect. | error2 |
| 415 | Unsupported Media Type | The media types and formats for the request and response should match (JSON or XML). | error2 |
Response Headers
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 201 | Content-Type | string | As specified above for types produced. | |
| 201 | Location | string | Location of saved report resource. Also contained in the links of the response transform. | |
| 201 | ETag | string | A tag that distinguishes the state of the report. | |
| 400 | Content-Type | string | No description | |
| 400 | Location | string | This header is usually not set on an error response. | |
| 406 | Content-Type | string | No description | |
| 415 | Content-Type | string | No description |
Validate conditional put operations
Code samples
# You can also use wget
curl -X PUT https://example.com/reportTransforms/commons/validations/translationWorksheets/{reportId} \
-H 'Content-Type: text/plain' \
-H 'Accept: application/vnd.sas.validation+json' \
-H 'If-Match: string'
const inputBody = '{
"locale": "string",
"lines": [
"string"
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}';
const headers = {
'Content-Type':'text/plain',
'Accept':'application/vnd.sas.validation+json',
'If-Match':'string'
};
fetch('https://example.com/reportTransforms/commons/validations/translationWorksheets/{reportId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'text/plain',
'Accept': 'application/vnd.sas.validation+json',
'If-Match': 'string'
}
r = requests.put('https://example.com/reportTransforms/commons/validations/translationWorksheets/{reportId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"text/plain"},
"Accept": []string{"application/vnd.sas.validation+json"},
"If-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/reportTransforms/commons/validations/translationWorksheets/{reportId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /commons/validations/translationWorksheets/{reportId}
Pre-flight validation of the PUT operation, which would update the internal localization strings of an existing report. Always returns HTTP response 200 unless a server error prevents the actual validation logic from being executed.
Body parameter
locale: string
lines:
- string
links:
- method: string
rel: string
uri: string
href: string
title: string
type: string
itemType: string
responseType: string
responseItemType: string
version: 0
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| reportId | path | string | true | The id of the report that would have its localization be updated by the PUT operation. |
| If-Match | header | string | true | ETag identifier from last GET of the report. |
| body | body | translationWorksheet | true | The body of the request is a string translation worksheet. |
Example responses
200 Response
{
"version": 0,
"valid": true,
"error": {},
"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 | Except for unusual server problems, this is always returned. However, the validation contains information about errors that would happen if the PUT were actually called, as shown by the additional errors. | validation |
| 400 | Bad Request | The request was invalid. Some error in the request resulted in failure to perform the action. See the error codes table for additional details. | error2 |
| 412 | Precondition Failed | The header If-Match Etag value does not match. | error2 |
| 428 | Precondition Required | The If-Match head ETag did not match current report. | error2 |
Response Headers
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 200 | Content-Type | string | application/vnd.sas.validation+json | |
| 200 | ETag | string | Current content ETag for the report to be modified. Use for subsequent PUT operation. | |
| 400 | Content-Type | string | No description | |
| 412 | Content-Type | string | No description | |
| 428 | Content-Type | string | No description |
Themes
Automating applying a new theme to BIRD reports.
Change theme of existing report
Code samples
# You can also use wget
curl -X GET https://example.com/reportTransforms/rethemedReports/{reportId}/{themeName} \
-H 'Accept: application/vnd.sas.report.transform+json'
const headers = {
'Accept':'application/vnd.sas.report.transform+json'
};
fetch('https://example.com/reportTransforms/rethemedReports/{reportId}/{themeName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.report.transform+json'
}
r = requests.get('https://example.com/reportTransforms/rethemedReports/{reportId}/{themeName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.report.transform+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reportTransforms/rethemedReports/{reportId}/{themeName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /rethemedReports/{reportId}/{themeName}
Returns a rethemed version of a saved report.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| reportId | path | string | true | The report from which the report should be read, rethemed, and returned. |
| themeName | path | string | true | The id of the new theme. |
| validate | query | boolean | false | Determine whether to validate the report content against the XML schema, and whether the themeName is a published report theme. Defaults to true. Schema validation errors do not necessarily halt processing. Errors are reported in the transform's errorMessages list. |
Example responses
200 Response
{
"id": "string",
"version": 0,
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"inputReportUri": "https://example.com",
"resultReportName": "https://example.com",
"resultParentFolderUri": "https://example.com",
"resultReport": {
"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
},
"dataSources": [
{
"purpose": "original",
"namePattern": "serverLibraryTable",
"server": "cas1",
"library": "public",
"table": "mailorders",
"replacementLabel": "Mail Orders for Current Year",
"dataItemReplacements": [
{
"originalName": "bi124",
"replacementColumn": "customer"
},
{
"originalColumn": "ADDR",
"replacementColumn": "Address"
}
]
}
],
"schemaValidationStatus": "schemaValid",
"evaluationStatus": "evaluationValid",
"evaluation": [
"string"
],
"messages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"errorMessages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"substitutionParameters": [
{
"key": "string",
"label": "string",
"site": "parameterDefinition",
"structure": "single",
"type": "string",
"values": [
"string"
]
}
],
"reportContent": {
"xmlns": "string",
"label": "string",
"modifiedBy": "string",
"dateCreated": "2019-08-24T14:15:22Z",
"dateModified": "2019-08-24T14:15:22Z",
"lastModifiedApplicationName": "string",
"createdBy": "string",
"createdApplicationName": "string",
"createdLocale": "string",
"createdVersion": "string"
},
"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 | Successful retheming of the report and returned. | transform |
| 400 | Bad Request | The request was invalid. Some error in the request resulted in failure to perform the action. See the error codes table for additional details. | error2 |
Response Headers
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 200 | Content-Type | string | As specified above for type produced. | |
| 200 | Last-Modified | string | No description | |
| 200 | ETag | string | Identifier of the existing report. | |
| 400 | Content-Type | string | No description |
Change theme of submitted report
Code samples
# You can also use wget
curl -X POST https://example.com/reportTransforms/rethemedReports/{themeName} \
-H 'Content-Type: application/vnd.sas.report.transform+json' \
-H 'Accept: application/vnd.sas.report.transform+json'
const inputBody = '{
"id": "string",
"version": 0,
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"inputReportUri": "https://example.com",
"resultReportName": "https://example.com",
"resultParentFolderUri": "https://example.com",
"resultReport": {
"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
},
"dataSources": [
{
"purpose": "original",
"namePattern": "serverLibraryTable",
"server": "cas1",
"library": "public",
"table": "mailorders",
"replacementLabel": "Mail Orders for Current Year",
"dataItemReplacements": [
{
"originalName": "bi124",
"replacementColumn": "customer"
},
{
"originalColumn": "ADDR",
"replacementColumn": "Address"
}
]
}
],
"schemaValidationStatus": "schemaValid",
"evaluationStatus": "evaluationValid",
"evaluation": [
"string"
],
"messages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"errorMessages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"substitutionParameters": [
{
"key": "string",
"label": "string",
"site": "parameterDefinition",
"structure": "single",
"type": "string",
"values": [
"string"
]
}
],
"reportContent": {
"xmlns": "string",
"label": "string",
"modifiedBy": "string",
"dateCreated": "2019-08-24T14:15:22Z",
"dateModified": "2019-08-24T14:15:22Z",
"lastModifiedApplicationName": "string",
"createdBy": "string",
"createdApplicationName": "string",
"createdLocale": "string",
"createdVersion": "string"
},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.report.transform+json',
'Accept':'application/vnd.sas.report.transform+json'
};
fetch('https://example.com/reportTransforms/rethemedReports/{themeName}',
{
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.transform+json',
'Accept': 'application/vnd.sas.report.transform+json'
}
r = requests.post('https://example.com/reportTransforms/rethemedReports/{themeName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.transform+json"},
"Accept": []string{"application/vnd.sas.report.transform+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reportTransforms/rethemedReports/{themeName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /rethemedReports/{themeName}
Change the theme of the report in the body of the request using the specified themeName. Return a transform containing the rethemed report. You can get the input report from a persistent report resource, specified in the input transform. You can also save the modified report as a persistent resource. If the input report is a persistent report, you can replace it with the modified version. This operation has been enhanced in Version 2 to facilitate a single-step CLI operation to change the themes of existing reports.
Body parameter
{
"id": "string",
"version": 0,
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"inputReportUri": "https://example.com",
"resultReportName": "https://example.com",
"resultParentFolderUri": "https://example.com",
"resultReport": {
"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
},
"dataSources": [
{
"purpose": "original",
"namePattern": "serverLibraryTable",
"server": "cas1",
"library": "public",
"table": "mailorders",
"replacementLabel": "Mail Orders for Current Year",
"dataItemReplacements": [
{
"originalName": "bi124",
"replacementColumn": "customer"
},
{
"originalColumn": "ADDR",
"replacementColumn": "Address"
}
]
}
],
"schemaValidationStatus": "schemaValid",
"evaluationStatus": "evaluationValid",
"evaluation": [
"string"
],
"messages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"errorMessages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"substitutionParameters": [
{
"key": "string",
"label": "string",
"site": "parameterDefinition",
"structure": "single",
"type": "string",
"values": [
"string"
]
}
],
"reportContent": {
"xmlns": "string",
"label": "string",
"modifiedBy": "string",
"dateCreated": "2019-08-24T14:15:22Z",
"dateModified": "2019-08-24T14:15:22Z",
"lastModifiedApplicationName": "string",
"createdBy": "string",
"createdApplicationName": "string",
"createdLocale": "string",
"createdVersion": "string"
},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| themeName | path | string | true | The name of the new theme. |
| saveResult | query | boolean | false | Determines whether the transformed report is saved to the repository. If true, the report is saved. The response transform contains links to retrieve the resulting report. Assumes that resultReportName and resultParentFolderUri in the request transform can be used for the location of the resulting report. |
| useSavedReport | query | boolean | false | Specifies whether to find the input report as a permanent resource. If true, the input transform must provide the reference to the input report. If false, the input report is in the transform in the request body. (Added in Version 2) |
| replaceSavedReport | query | boolean | false | Specifies that the input report resource specified by the inputReportUri property of the request transform should be modified in place with the new theme. (Added in Version 2) |
| returnContent | query | boolean | false | Determines whether the transformed report is embedded in the response transform. If false, the report is not returned. If true, the report is returned. (Added in Version 2) |
| validate | query | boolean | false | Determine whether to validate the report content against the schema. Validation errors do not necessarily halt processing. |
| body | body | transform | true | The input transform and the report to retheme. |
Example responses
201 Response
{
"id": "string",
"version": 0,
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"inputReportUri": "https://example.com",
"resultReportName": "https://example.com",
"resultParentFolderUri": "https://example.com",
"resultReport": {
"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
},
"dataSources": [
{
"purpose": "original",
"namePattern": "serverLibraryTable",
"server": "cas1",
"library": "public",
"table": "mailorders",
"replacementLabel": "Mail Orders for Current Year",
"dataItemReplacements": [
{
"originalName": "bi124",
"replacementColumn": "customer"
},
{
"originalColumn": "ADDR",
"replacementColumn": "Address"
}
]
}
],
"schemaValidationStatus": "schemaValid",
"evaluationStatus": "evaluationValid",
"evaluation": [
"string"
],
"messages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"errorMessages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"substitutionParameters": [
{
"key": "string",
"label": "string",
"site": "parameterDefinition",
"structure": "single",
"type": "string",
"values": [
"string"
]
}
],
"reportContent": {
"xmlns": "string",
"label": "string",
"modifiedBy": "string",
"dateCreated": "2019-08-24T14:15:22Z",
"dateModified": "2019-08-24T14:15:22Z",
"lastModifiedApplicationName": "string",
"createdBy": "string",
"createdApplicationName": "string",
"createdLocale": "string",
"createdVersion": "string"
},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Rethemed version of the report generated and returned. | transform |
| 400 | Bad Request | The request was invalid. Some error in the request resulted in failure to perform the action. See the error codes table for additional details. | error2 |
| 406 | Not Acceptable | The media type is incorrect. | error2 |
Response Headers
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 201 | Content-Type | string | As specified above for types produced. | |
| 201 | Location | string | Location of created report resource, if saved. Also contained in the links of the response transform. | |
| 400 | Content-Type | string | No description | |
| 406 | Content-Type | string | No description |
Schemas
transform
{
"id": "string",
"version": 0,
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"inputReportUri": "https://example.com",
"resultReportName": "https://example.com",
"resultParentFolderUri": "https://example.com",
"resultReport": {
"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
},
"dataSources": [
{
"purpose": "original",
"namePattern": "serverLibraryTable",
"server": "cas1",
"library": "public",
"table": "mailorders",
"replacementLabel": "Mail Orders for Current Year",
"dataItemReplacements": [
{
"originalName": "bi124",
"replacementColumn": "customer"
},
{
"originalColumn": "ADDR",
"replacementColumn": "Address"
}
]
}
],
"schemaValidationStatus": "schemaValid",
"evaluationStatus": "evaluationValid",
"evaluation": [
"string"
],
"messages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"errorMessages": [
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
],
"substitutionParameters": [
{
"key": "string",
"label": "string",
"site": "parameterDefinition",
"structure": "single",
"type": "string",
"values": [
"string"
]
}
],
"reportContent": {
"xmlns": "string",
"label": "string",
"modifiedBy": "string",
"dateCreated": "2019-08-24T14:15:22Z",
"dateModified": "2019-08-24T14:15:22Z",
"lastModifiedApplicationName": "string",
"createdBy": "string",
"createdApplicationName": "string",
"createdLocale": "string",
"createdVersion": "string"
},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
The transform is the primary payload in this service, for both requests and responses. Depending on the operation, some fields are required. For example, if the report to transform is a saved report, the inputReportUri field is required. Otherwise, the input report is in the body of request (in the transform) and reportContent is required.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | string(identifier) | false | none | Identifier for this instance. Usually a GUID, but does not need to be globally unique. |
| version | number | false | none | The schema version number of this media type. This representation is version 1. |
| creationTimeStamp | string(date-time) | false | none | The date and time the transform was generated. |
| createdBy | string | false | none | User name or identity of service that created the transform object. |
| modifiedTimeStamp | string(date-time) | false | none | The date and time the transform was modified. |
| modifiedBy | string | false | none | User name or identity of service that modified the transform object last. Optional. |
| inputReportUri | string(uri) | false | none | The persisted report from which the transform should create the result. |
| resultReportName | string(uri) | false | none | On input, this specifies the human-readable name for the resulting report when the result is saved. It is not used on a response transform. |
| resultParentFolderUri | string(uri) | false | none | An identifier (URI) for the parent folder in which to save the result report. If omitted, the default is the user's personal folder. |
| resultReport | report | false | none | The representation of a report. This representation is version 1. |
| dataSources | [dataSource] | false | none | An array of data source objects, some of which are matched to CAS tables, some to the data sources in the report. |
| schemaValidationStatus | string | false | none | A value indicating the status returned by schema validation. |
| evaluationStatus | string | false | none | Success or failure designation. |
| evaluation | [string] | false | none | Text generated during semantic evaluation of the source. |
| messages | [codedMessage] | false | none | Localized messages generated in the process of creating the transformed report. |
| errorMessages | [codedMessage] | false | none | Error messages generated in the process of creating the transformed report with associated codes. |
| substitutionParameters | [object] | false | none | none |
| » key | string | false | none | The identifier of the element for which the value should be changed. |
| » label | string | false | none | Optional visual label for prompting user for the value. |
| » site | string | false | none | The type of location in the report where the parameter value would be defined. |
| » structure | string | false | none | Whether values are expected to be single, list or a range. |
| » type | string | false | none | Data type of the expected values. |
| » values | [string] | false | none | none |
| reportContent | sasReport | false | none | A report content that is the equivalent of the application/vnd.sas.report.content media type. The report content is defined by a non-public XML Schema. The structure shown here is an abbreviation showing only a few of the descriptive attributes of the object. |
| links | [link] | false | none | Link objects, as described in SAS standards documentation. |
Enumerated Values
| Property | Value |
|---|---|
| schemaValidationStatus | schemaValid |
| schemaValidationStatus | schemaInvalid |
| evaluationStatus | evaluationValid |
| evaluationStatus | evaluationInvalid |
| site | parameterDefinition |
| site | parameterState |
| site | urlParameter |
| structure | single |
| structure | multiple |
| structure | range |
| type | string |
| type | number |
| type | date |
| type | datetime |
| type | time |
| type | missing |
sasReport
{
"xmlns": "string",
"label": "string",
"modifiedBy": "string",
"dateCreated": "2019-08-24T14:15:22Z",
"dateModified": "2019-08-24T14:15:22Z",
"lastModifiedApplicationName": "string",
"createdBy": "string",
"createdApplicationName": "string",
"createdLocale": "string",
"createdVersion": "string"
}
A report content that is the equivalent of the application/vnd.sas.report.content media type. The report content is defined by a non-public XML Schema. The structure shown here is an abbreviation showing only a few of the descriptive attributes of the object.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| xmlns | string | true | none | The XML Schema to which the object conforms. |
| label | string | false | none | User's name for the report. |
| modifiedBy | string | false | none | Last modifying user-ID. |
| dateCreated | string(date-time) | false | none | Date of report creation. |
| dateModified | string(date-time) | false | none | Date of last modification. |
| lastModifiedApplicationName | string | false | none | User-readable name of application name that last modified. |
| createdBy | string | false | none | Creating user ID. |
| createdApplicationName | string | false | none | User-readable name of application, if any. |
| createdLocale | string | false | none | Locale of the report when first created and serialized. |
| createdVersion | string | false | none | Schema version of report when created. |
dataSource
{
"purpose": "original",
"namePattern": "serverLibraryTable",
"server": "cas1",
"library": "public",
"table": "mailorders",
"replacementLabel": "Mail Orders for Current Year",
"dataItemReplacements": [
{
"originalName": "bi124",
"replacementColumn": "customer"
},
{
"originalColumn": "ADDR",
"replacementColumn": "Address"
}
]
}
A data source that is used in a data mapping operation in a report.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| purpose | string | true | none | When the data source is part of a data mapping operation, specifies whether it is the "original" or "replacement". When the data source is being created as part of an automatic report operation, the value is "creation". When the data is changed by a filter, ranking, or similar operation, the value is "modification". |
| namePattern | string | false | none | Enumeration of the way the data source is identified. Using "uniqueName" is valid only when the data source is an original within the report that is being changed during a data mapping operation. If no value is specified, most operations assume it is "serverLibraryTable" and can fail if the corresponding server, library, and table values are not set. (There are some special cases where other assumptions could be made, depending on the operation. For example, an operation could select the first BIRD DataSource it finds in an input report, and not rely on this attribute.) |
| server | string | false | none | CAS server name. |
| library | string | false | none | CAS library name. |
| table | string | false | none | CAS table name. |
| uniqueName | string | false | none | Reference to a data source in the report using its internal name. |
| replacementLabel | string | false | none | New label for the data source, or an override to what is in the CAS table. |
| dataItemReplacements | [object] | false | none | Replacement names for individual data items when doing a data mapping operation. In order for a data item to be replaced, exactly one of the originalName or originalColumn is required. If both originalName or originalColumn are specified, it is not an error, but the behavior is at the discretion of the operation. |
| » originalName | string | false | none | The previous (or current) data item unique name in the report. |
| » originalColumn | string | false | none | The previous (or current) data item xref or column name in the CAS table. |
| » replacementColumn | string | true | none | The column name of the replacement column on the CAS table. This property is required. |
Enumerated Values
| Property | Value |
|---|---|
| purpose | original |
| purpose | replacement |
| namePattern | uniqueName |
| namePattern | serverLibraryTable |
codedMessage
{
"code": 27599,
"text": "There was a problem in transforming this element.",
"item": "bi1349"
}
A message for the user with an associated error or warning code.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| code | integer | false | none | A specific code that is documented externally. |
| text | string | false | none | The text of the message. |
| item | string | false | none | The name of a uniquely named element in the report that is the object of the message. It is usually a data item. |
translationWorksheet
{
"locale": "string",
"lines": [
"string"
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Prior to version 2, this was not an object. Instead, it was serialized as lines of user-editable plain text. When serialized as text, the first line is the locale indicator, and the subsequent lines have the form proprietary path identifiers = translatable text.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| locale | string | false | none | A valid IETF language tag. |
| lines | [string] | false | none | Individual lines with translatable strings. Each line has a substructure of identifier=value, where the value part is what should be translated. |
| links | [link] | false | none | Link objects, as described in SAS standards documentation. |
| version | integer | false | none | Standard field. The schema version number of this media type. This representation is version 1. |
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. |
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
}
The representation of a report. This representation is version 1.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | string | 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 at which the report was created. |
| createdBy | string | false | none | The user who created the report. |
| modifiedTimeStamp | string(date-time) | false | none | Date and time at which 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 | The schema version number of this media type. |
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. |
validation
{
"version": 0,
"valid": true,
"error": {},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
Validation Response
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| version | integer | true | none | This media type's schema version number. This representation is version 1. |
| valid | boolean | true | none | true if and only if the validation was successful. |
| error | object | false | none | An error object that describes how the validation failed. This member is omitted if the value for the valid property is true. |
| links | [link] | false | none | An array of links to related resources and actions. |
Examples
Github Examples
Detailed examples on how to use this API can be found on Github.
Media Type Samples
Shared Media Types
The reportTransforms API uses the following shared media types:
text/plain
text/plain is used as the media type for localization worksheets.
application/vnd.sas.api
Contains top-level links for an API. See
application/vnd.sas.api
application/vnd.sas.error
Used for reporting HTTP client and service-specific error information about responses.
See application/vnd.sas.error for the common documentation.
application/vnd.sas.validation
Used for preflight verification of updates to localization worksheets. See application/vnd.sas.validation.
application/vnd.sas.report
Provided on some links for getting reports that have been modified or saved by a transform creation.
application/vnd.sas.report.content
Used in the API to get and send BIRD report content that is not wrapped in a transform object.
Report Transform Service-specific Media Types
Following types are specific to this service.
application/vnd.sas.report.transform
The transform object type.
Link Relations for the Transform
| rel | Method | Property | Description |
|---|---|---|---|
| createDataMappedReport | POST | Swap data source(s) on the report specified by the transform. | |
| uri | /reportTransforms/dataMappedReports |
||
| type | application/vnd.sas.report.transform |
||
| extractTranslationWorksheet | POST | Create a translation worksheet for the given language from the posted report. | |
| uri | /reportTransforms/translationWorksheets/{translationLocale} |
||
| type | application/vnd.sas.report.transform |
||
| updateTranslationWorksheet | POST | Update the translation worksheet for the given language in the specified report using the input worksheet. | |
| uri | /reportTransforms/translationWorksheets/{reportId}/{translationLocale} |
||
| type | application/vnd.sas.report.transform |
||
| createTranslatedReport | POST | Create a translated report from the report specified by the transform. Change the inline strings of the report to those of the requested language, which are found in the report's internal Localization element. | |
| uri | /reportTransforms/translatedReports/{translationLocale} |
||
| type | application/vnd.sas.report.transform |
||
| createConvertedReport | POST | Convert the transform and the report that it contains from current format to the alternate format: XML to JSON, or JSON to XML. | |
| uri | /reportTransforms/convertedReports |
||
| type | application/vnd.sas.report.transform |
||
| createEvaluatedReport | POST | Evaluate the semantic correctness of the BIRD report and generate informational text to point out any semantic issues. Semantic evaluation is distinct from and goes beyond syntactic "validation," which is done using an XML Schema. | |
| uri | /reportTransforms/evaluatedReports |
||
| type | application/vnd.sas.report.transform |
||
| createParameterizedReport | POST | Change the values in the report parameters to the new values provided. (new in version 2) | |
| uri | /reportTransforms/parameterizedReports |
||
| type | application/vnd.sas.report.transform |
||
| content | GET | (OPTIONAL) Retrieve the report content from the repository for the report that was just saved | |
| Used only on response transforms following a successful operation when the request asked that the result report be saved. | |||
| uri | /reports/reports/{reportId}/content |
||
| type | application/vnd.sas.report.content |
||
| getReport | GET | (OPTIONAL) Retrieve the report metadata object from the repository for the report that was just saved | |
| Used only on response transforms following a successful operation when the request asked that the result report be saved. | |||
| uri | /reports/reports/{reportId} |
||
| type | application/vnd.sas.report |
Report Translation Worksheet Type
This media type is new in Version 2. Previously, the translation worksheet was treated as text/plain media type. It is exposed in version 2 as an object for the convenience of applications that manipulate it.
application/vnd.sas.report.translation.worksheet
Link Relations for the Translation Worksheet
When a translation worksheet is retrieved, it might contain these links.
| rel | Method | Property | Description |
|---|---|---|---|
| updateTranslationWorksheet | use this worksheet to update a report localizations | ||
| uri | /reportTransforms/translationWorksheets/{reportId}/{translationLocale} |
||
| type | application/vnd.sas.report.translation.worksheet |
Base URL
http://www.example.com/reportTransforms/
Resource Relationships
Root Resource
Path: /
The root of the API. This resource contains links to the top-level resources in the API.
The response uses the application/vnd.sas.api media type.
Links
The GET / response include the following links.
| rel | Method | Property | Description |
|---|---|---|---|
| createDataMappedReport | POST | Create a transformed report from an input report with the original data source(s) and columns replaced by different data sources and columns. | |
| uri | /reportTransforms/dataMappedReports |
||
| type | application/vnd.sas.report.transform |
||
| getTranslationWorksheet | GET | Retrieve a translation worksheet from the saved report. | |
| uri | /reportTransforms/translationWorksheets/{reportId}/{translationLocale} |
||
| type | text/plain |
||
| extractTranslationWorksheet | POST | Create a translation worksheet for the given language from the posted report. | |
| uri | /reportTransforms/translationWorksheets/{translationLocale} |
||
| type | application/vnd.sas.report.content |
||
| responseType | text/plain |
||
| updateTranslationWorksheet | PUT | Update the translation worksheet for the given language in the specified report using the input worksheet. | |
| uri | /reportTransforms/commons/validations/translationWorksheets/{reportId}/{translationLocale} |
||
| type | application/vnd.sas.report.content |
||
| responseType | text/plain |
||
| validateUpdateTranslationWorksheet | PUT | Update the translation worksheet for the given language in the specified report using the input worksheet. | |
| uri | /reportTransforms/translationWorksheets/{reportId}/{translationLocale} |
||
| type | text/plain |
||
| getTranslatedReport | GET | Get the BIRD report with all the translatable strings in the report being from the given language, according to the previously submitted translation worksheet for that language. | |
| uri | /reportTransforms/translatedReports/{reportId}/{translationLocale} |
||
| type | application/vnd.sas.report.transform |
||
| createTranslatedReport | POST | Create a report with all the translatable strings in it being from the given language, using the BIRD report in the body of the request and the translation worksheets for that language that are in the posted report. | |
| uri | /reportTransforms/translatedReports/{reportId}/{translationLocale} |
||
| type | application/vnd.sas.report.transform |
||
| createEvaluatedReport | POST | Evaluate the semantic correctness of the BIRD report and generate informational text to point out any semantic issues. Semantic evaluation is distinct from and goes beyond syntactic "validation", which is done using an XML Schema. | |
| uri | /reportTransforms/evaluatedReports |
||
| type | application/vnd.sas.report.transform |
||
| createConvertedReport | POST | Convert the BIRD report from current format to the alternate format, XML to JSON, or JSON to XML. | |
| uri | /reportTransforms/evaluatedReports |
||
| type | application/vnd.sas.report.transform |
||
| getParameters | GET | Get all the sites in the report that can have values subsituted for the current or default values. (new in version 2) | |
| uri | /reportTransforms/parameterizedReports/{reportId}/parameters |
||
| type | application/vnd.sas.report.transform |
||
| Only used on response transforms following a successful operation when the request asked that the result report be saved. | |||
| createAutomaticReport | POST | Create a report with an automatically-selected chart for the specified data source and columns (new in version 2) | |
| uri | /reportTransforms/automaticReports |
||
| type | application/vnd.sas.report.transform |
Visual Analytics
Base URLs:
- https://example.com/visualAnalytics
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.
The Visual Analytics API provides simplified ways to perform basic tasks with reports. Tasks include exporting a report as a PDF file, or as a package file, or exporting an image of a part of the report.
Usage Notes
Overview
The Visual Analytics API enables you to perform basic tasks with reports, such as the following:
- Export all or part of a report as PDF with options to customize the appearance of the printed document.
- Export all or part of a report as an image or images.
- Export a report package that can be used by a client application to display a report when the client is offline.
- Export the data for an object in a report in a format such as comma-separated values.
Definitions, Resources, and Media Types
Shared Media Types
The visualAnalytics API uses several media types that are shared by most SAS APIs.
application/vnd.sas.report
Documents in the format used by SAS Visual Analytics are called reports. This media type contains information about a saved report. It does not directly contain the content of the report.
application/vnd.sas.api
Contains top-level links for an API. See
application/vnd.sas.api
The GET / response API object includes basic actions that are identified by their relation properties. See the example response of the Root API for a list of links and their relation names.
application/vnd.sas.error (v2)
The standard SAS error format. This is returned for most 400 and 500-level responses, and it is an optional member of the "job" media types.
application/vnd.sas.error
External Media Types
The visualAnalytics API uses the following external media types:
application/pdf
The PDF file structure is an industry-standard format for printing documents. Modern browsers and PDF viewing applications are able to render them.
application/zip
The media type of compressed "SAS package" files.
Internal Media Types
Type: application/vnd.sas.visual.analytics.report.export.pdf.request
This object is used to make a PDF export request that runs as a background process. It is the request body of POST that starts the task and returns immediately. The response body is a
application/vnd.sas.visual.analytics.report.export.pdf.job that contains a link used to poll the progress of the job.
The print options for rendering the PDF are not exactly the same as the options for the Report Renderer API. The options are named to match what is used in the VA SDK.
Type: application/vnd.sas.visual.analytics.report.export.pdf.job
The response from starting a job to export a PDF of a report, or from requerying the status of a PDF export job.
Error Codes
Some errors returned by the framework are not documented below
For example: 406 - Not Acceptable when unsupported Accept header is specified
| HTTP Status Code | Error Code | Description |
|---|---|---|
| 400,500 | 23000 | An error occurred with an unknown cause. |
| 400 | 23001 | An invalid ID was used in the request. |
| 400 | 23002 | An invalid URI was used. |
| 400 | 23003 | No report was specified. |
| 404 | 23004 | A report was specified in the URL but could not be found. |
| 400 | 23005 | A report object was specified but could not be found by its label. |
| 404 | 23010 | A job was specified in the URL but could not be found. |
| 400 | 23012 | A job request failed validation. |
| 500 | 23099 | A database error occurred. The cause might display in the error details. |
| 500 | 23100 | A dependent service was not available. The service name appears in the message. |
Operations
Root
The operations for the root resource.
Get a list of top-level links
Code samples
# You can also use wget
curl -X GET https://example.com/visualAnalytics/ \
-H 'Accept: application/vnd.sas.api+json'
const headers = {
'Accept':'application/vnd.sas.api+json'
};
fetch('https://example.com/visualAnalytics/',
{
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/visualAnalytics/', 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/visualAnalytics/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /
Returns a list of link objects for some of the primary resources surfaced by this API. The list includes basic actions that are identified by their relation properties, such as printing a report, exporting a report package, exporting the data in a report, etc. See the example response for the list of expected links with their relation names, types and URIs.
Example responses
200 Response
{
"version": 1,
"links": [
{
"ref": "self",
"method": "GET",
"type": "application/vnd.sas.api",
"uri": "/visualAnalytics",
"href": "/visualAnalytics"
},
{
"ref": "printReport",
"method": "GET",
"type": "application/zip",
"uri": "/visualAnalytics/reports/{reportId}/pdf",
"href": "/visualAnalytics/reports/{reportId}/pdf"
},
{
"ref": "reportPackage",
"method": "GET",
"type": "application/zip",
"uri": "/visualAnalytics/reports/{reportId}/package",
"href": "/visualAnalytics/reports/{reportId}/package"
},
{
"ref": "reportImageSvg",
"method": "GET",
"type": "image/svg+xml",
"uri": "/visualAnalytics/reports/{reportId}/svg",
"href": "/visualAnalytics/reports/{reportId}/svg"
},
{
"ref": "reportImagePng",
"method": "GET",
"type": "image/png",
"uri": "/visualAnalytics/reports/{reportId}/png",
"href": "/visualAnalytics/reports/{reportId}/png"
},
{
"ref": "reportDataCsv",
"method": "GET",
"type": "text/csv",
"uri": "/visualAnalytics/reports/{reportId}/csv",
"href": "/visualAnalytics/reports/{reportId}/csv"
},
{
"ref": "exportPdf",
"method": "POST",
"type": "application/vnd.sas.visual.analytics.report.export.pdf.request",
"responseType": "application/vnd.sas.visual.analytics.report.export.pdf.job",
"uri": "/visualAnalytics/reports/{reportId}/exportPdf",
"href": "/visualAnalytics/reports/{reportId}/exportPdf"
}
]
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | apiList |
| 404 | Not Found | There was an error in the request. | error2 |
Response Headers
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 200 | Content-Type | string | Always returns "application/vnd.sas.api+json". | |
| 404 | Content-Type | string | Usually application/vnd.sas.error+json | |
| 404 | Location | string | Provided if a location would be meaningful in the error context. | |
| 404 | Last-Modified | string | Provided only if meaningful in the error context. |
Export
The operations for immediate export of content.
Export a report as PDF
Code samples
# You can also use wget
curl -X GET https://example.com/visualAnalytics/reports/{reportId}/pdf \
-H 'Accept: application/pdf' \
-H 'Accept-Language: string' \
-H 'Accept-Locale: string'
const headers = {
'Accept':'application/pdf',
'Accept-Language':'string',
'Accept-Locale':'string'
};
fetch('https://example.com/visualAnalytics/reports/{reportId}/pdf',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/pdf',
'Accept-Language': 'string',
'Accept-Locale': 'string'
}
r = requests.get('https://example.com/visualAnalytics/reports/{reportId}/pdf', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/pdf"},
"Accept-Language": []string{"string"},
"Accept-Locale": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/visualAnalytics/reports/{reportId}/pdf", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reports/{reportId}/pdf
Export a report as PDF. Maintain the client connection to download the report even if it takes some time to generate the PDF. Apply the query parameter values to the creation of the PDF output, overriding (1) defaults of the underlying rendering services, and also overriding (2) any defaults that were saved with the report by the SAS Visual Analytics application.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| reportId | path | string | true | Identifier of an existing report resource. Report identifiers are generated by the Reports API when reports are created. |
| reportObjects | query | string | false | This parameter lists the labels of the report objects to include in the request. Multiple object labels are separated by commas. The labels can be quoted to avoid problems with spaces and special characters. If this is left empty, the result varies depending on the type of output. Report objects include visual elements like graphs, tables, and visual containers that the author has created in the layout, as well as complete pages. Specifying the object by its label makes it more convenient for the report author or viewer and does not to expose the internal names of objects in the model. However, if the client knows the internal identifier of a report object, it can be used instead of the label. |
| orientation | query | string | false | The page orientation. If this query parameter is set, it overrides any orientation that is saved in the report by the Visual Analytics UI and the default value defined by other supporting services. |
| paperSize | query | string | false | The paper size designation from the enumerated list. Custom sizes are not provided in version 1. If this query parameter is set, it overrides any paperSize that is saved in the report by the Visual Analytics UI and the default value defined by other supporting services. |
| margin | query | margin | false | A margin value that is applied to all four margins of the page. It is nonnegative number, integer, or floating point, which is followed by the unit. The unit can be one of the following two-letter abbreviations: in, cm, mm, pt , px , em, or ex. |
| showPageNumbers | query | boolean | false | Indicates whether page numbers should be displayed. |
| showEmptyRowsAndColumns | query | boolean | false | Indicates whether empty rows and columns should be included to fill the allocated layout space for list tables and crosstabs. |
| includeTableOfContents | query | boolean | false | Indicates whether to add a table of contents. |
| includeAppendix | query | boolean | false | Indicates whether the appendix should be included. The appendix can contain comments, detail tables, and parts that were clipped in the main body of the report. |
| includeComments | query | boolean | false | Indicates whether the comments should be included in the appendix. |
| includeDetailsTables | query | boolean | false | Indicates whether the detail tables should be included in the appendix. |
| expandClippedContent | query | boolean | false | Enables you to see all of the content for tables, crosstabs, gauges, and containers. This includes content that is only partially available in the layout of the page. Each object is displayed on a separate page at the end of the report. |
| includeCoverPage | query | boolean | false | Indicates whether a cover page should be included. The cover page can include the name of the report, the date, the user name, and the number of pages. |
| coverPageText | query | string | false | Optional text to be included on the cover page. This setting is ignored if includeCoverPage is false. |
| Accept-Language | header | string | false | The user's language, which is used in both rendering and caching. For technical details, see "/tools.ietf.org/html/rfc7231#section-5.3.5" It affects the language of reports if they have been translated. This setting overrides any other user preference that has been set, such as the "offline process locale" preference in Visual Analytics. If this header is not set and there is no user preference, the language is the default language of the service. |
| Accept-Locale | header | string | false | A "format locale" that is distinct from the user's language (Accept-Language). Its syntax is similar to Accept-Language. It is honored in running of queries and formatting of values. This setting overrides any other user preference that has been set, such as the "regional locale for formats" preference in Visual Analytics. If this header is not set and there is no user preference, the format locale is the default locale of the service. |
Enumerated Values
| Parameter | Value |
|---|---|
| orientation | landscape |
| orientation | portrait |
| paperSize | letter |
| paperSize | legal |
| paperSize | A3 |
| paperSize | A4 |
| paperSize | A5 |
| paperSize | B4 |
| paperSize | B5 |
| paperSize | ledger |
Example responses
200 Response
303 Response
"string"
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful execution. Response is the report in the requested PDF format. | string |
| 303 | See Other | The operation could not be completed before the wait period expired. This redirect (See Other) continues the process of waiting for the result. It is used to provide liveness to the browser transmit queue. Note that although this practice of redirecting is common, clients that cannot follow a redirect must either not use this method or specify a longer wait period. |
string |
| 400 | Bad Request | There was an error in the request. | error2 |
| 404 | Not Found | There was an error in the request. | error2 |
Response Headers
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 200 | Last-Modified | string | When response was created. | |
| 200 | Content-Type | string | No description | |
| 200 | Location | string | On success this header containers the URI of the generated PDF file | |
| 303 | Location | string | A URI back to this service to wait for a pending result. | |
| 303 | Last-Modified | string | Provided only if meaningful in the context. | |
| 400 | Content-Type | string | Usually application/vnd.sas.error+json | |
| 400 | Location | string | Provided if a location would be meaningful in the error context. | |
| 400 | Last-Modified | string | Provided only if meaningful in the error context. | |
| 404 | Content-Type | string | Usually application/vnd.sas.error+json | |
| 404 | Location | string | Provided if a location would be meaningful in the error context. | |
| 404 | Last-Modified | string | Provided only if meaningful in the error context. |
Export a report package
Code samples
# You can also use wget
curl -X GET https://example.com/visualAnalytics/reports/{reportId}/package \
-H 'Accept: application/zip' \
-H 'Accept-Language: string' \
-H 'Accept-Locale: string'
const headers = {
'Accept':'application/zip',
'Accept-Language':'string',
'Accept-Locale':'string'
};
fetch('https://example.com/visualAnalytics/reports/{reportId}/package',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/zip',
'Accept-Language': 'string',
'Accept-Locale': 'string'
}
r = requests.get('https://example.com/visualAnalytics/reports/{reportId}/package', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/zip"},
"Accept-Language": []string{"string"},
"Accept-Locale": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/visualAnalytics/reports/{reportId}/package", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reports/{reportId}/package
Export a package for the report or report objects in compressed (zip) format. The returned content contains the report source files, plus the results of data queries and image rendering, constituting all that is needed for remote viewing of the report.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| reportId | path | string | true | Identifier of an existing report resource. Report identifiers are generated by the Reports API when reports are created. |
| reportObjects | query | string | false | This parameter lists the labels of the report objects to include in the request. Multiple object labels are separated by commas. The labels can be quoted to avoid problems with spaces and special characters. If this is left empty, the result varies depending on the type of output. Report objects include visual elements like graphs, tables, and visual containers that the author has created in the layout, as well as complete pages. Specifying the object by its label makes it more convenient for the report author or viewer and does not to expose the internal names of objects in the model. However, if the client knows the internal identifier of a report object, it can be used instead of the label. |
| Accept-Language | header | string | false | The user's language, which is used in both rendering and caching. For technical details, see "/tools.ietf.org/html/rfc7231#section-5.3.5" It affects the language of reports if they have been translated. This setting overrides any other user preference that has been set, such as the "offline process locale" preference in Visual Analytics. If this header is not set and there is no user preference, the language is the default language of the service. |
| Accept-Locale | header | string | false | A "format locale" that is distinct from the user's language (Accept-Language). Its syntax is similar to Accept-Language. It is honored in running of queries and formatting of values. This setting overrides any other user preference that has been set, such as the "regional locale for formats" preference in Visual Analytics. If this header is not set and there is no user preference, the format locale is the default locale of the service. |
Example responses
200 Response
303 Response
"string"
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful execution. Response is the package in a compressed format. | string |
| 303 | See Other | The operation could not be completed before the wait period expired. This redirect (See Other) continues the process of waiting for the result. It is used to provide liveness to the browser transmit queue. Note that although this practice of redirecting is common, clients that cannot follow a redirect must either not use this method or specify a longer wait period. |
string |
| 400 | Bad Request | There was an error in the request. | error2 |
| 404 | Not Found | There was an error in the request. | error2 |
Response Headers
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 200 | Last-Modified | string | date-time | When response was created. Provided for completeness, though not of great use. Last modification date of response can be found in the returned zip archive. |
| 303 | Location | string | A URI back to this service to wait for a pending result. | |
| 303 | Last-Modified | string | Provided only if meaningful in the context. | |
| 400 | Content-Type | string | Usually application/vnd.sas.error+json | |
| 400 | Location | string | Provided if a location would be meaningful in the error context. | |
| 400 | Last-Modified | string | Provided only if meaningful in the error context. | |
| 404 | Content-Type | string | Usually application/vnd.sas.error+json | |
| 404 | Location | string | Provided if a location would be meaningful in the error context. | |
| 404 | Last-Modified | string | Provided only if meaningful in the error context. |
Jobs
The operations used by clients for asynchronous execution.
Create and run an action to export a report as a package file
Code samples
# You can also use wget
curl -X POST https://example.com/visualAnalytics/reports/{reportId}/exportPackage \
-H 'Content-Type: application/vnd.sas.visual.analytics.report.export.package.request+json' \
-H 'Accept: application/vnd.sas.visual.analytics.report.export.package.job+json' \
-H 'Accept-Language: string' \
-H 'Accept-Locale: string'
const inputBody = '{
"resultFolder": "/folders/folders/01234567-0123-0123-0123-0123456789ab",
"resultFileName": "Status Report Package",
"nameConflict": "replace",
"wait": 10,
"timeout": 300,
"reportObjects": [
"Bar Graph 1",
"Table of Frequencies"
],
"version": 1
}';
const headers = {
'Content-Type':'application/vnd.sas.visual.analytics.report.export.package.request+json',
'Accept':'application/vnd.sas.visual.analytics.report.export.package.job+json',
'Accept-Language':'string',
'Accept-Locale':'string'
};
fetch('https://example.com/visualAnalytics/reports/{reportId}/exportPackage',
{
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.visual.analytics.report.export.package.request+json',
'Accept': 'application/vnd.sas.visual.analytics.report.export.package.job+json',
'Accept-Language': 'string',
'Accept-Locale': 'string'
}
r = requests.post('https://example.com/visualAnalytics/reports/{reportId}/exportPackage', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.visual.analytics.report.export.package.request+json"},
"Accept": []string{"application/vnd.sas.visual.analytics.report.export.package.job+json"},
"Accept-Language": []string{"string"},
"Accept-Locale": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/visualAnalytics/reports/{reportId}/exportPackage", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /reports/{reportId}/exportPackage
Start a job from the request information that creates and exports the report as a package file. This starts the process of creating a package, but returns quickly. If the result is not ready by the time of the response, the client must poll until completion and then download the ZIP file. By default, only the user who created the package is authorized to retrieve it. For packages saved to a folder, the authorizations are controlled by the folder. Note that the /SASVisualAnalyticsCommon_capabilities/exportPackage capability is enforced on this operation. There is no support for creating a package with a back-level version; that is, the created package will have the service's current version of package file.
Body parameter
{
"resultFolder": "/folders/folders/01234567-0123-0123-0123-0123456789ab",
"resultFileName": "Status Report Package",
"nameConflict": "replace",
"wait": 10,
"timeout": 300,
"reportObjects": [
"Bar Graph 1",
"Table of Frequencies"
],
"version": 1
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| reportId | path | string | true | Identifier of an existing report resource. Report identifiers are generated by the Reports API when reports are created. |
| Accept-Language | header | string | false | The user's language, which is used in both rendering and caching. For technical details, see "/tools.ietf.org/html/rfc7231#section-5.3.5" It affects the language of reports if they have been translated. This setting overrides any other user preference that has been set, such as the "offline process locale" preference in Visual Analytics. If this header is not set and there is no user preference, the language is the default language of the service. |
| Accept-Locale | header | string | false | A "format locale" that is distinct from the user's language (Accept-Language). Its syntax is similar to Accept-Language. It is honored in running of queries and formatting of values. This setting overrides any other user preference that has been set, such as the "regional locale for formats" preference in Visual Analytics. If this header is not set and there is no user preference, the format locale is the default locale of the service. |
| body | body | exportPackageRequest | false | none |
Example responses
201 Response
{
"id": "12345678-1234-1234-1234-123456789abc",
"state": "running",
"inputReport": "/reports/reports/12345678-abcd-ef12-3456-12345678abcd",
"reportObjects": [
"Bar Graph 1",
"Table of Frequencies"
],
"resultFolder": "/folders/folders/01234567-0123-0123-0123-0123456789ab",
"resultFileName": "Status Report Package",
"nameConflict": "replace",
"resultMediaType": "application/zip",
"creationTimeStamp": "2021-06-21T21:10:31.123Z",
"endTimeStamp": "2021-06-21T21:10:41.123Z",
"links": [
{
"ref": "self",
"method": "GET",
"type": "application/vnd.sas.visual.analytics.report.export.package.job",
"uri": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc",
"href": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc"
},
{
"ref": "result",
"method": "GET",
"type": "application/*",
"uri": "/files/files/12345678-1234-1234-1234-123456789abc/content",
"href": "/files/files/12345678-1234-1234-1234-123456789abc/content"
},
{
"ref": "delete",
"method": "DELETE",
"uri": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc",
"href": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc"
},
{
"ref": "deleteContent",
"method": "DELETE",
"uri": "/files/files/12345678-1234-1234-1234-123456789abc",
"href": "/files/files/12345678-1234-1234-1234-123456789abc"
}
],
"version": 1
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | The job ran and completed within the wait time allotted. The response body contains links to the job object, which contains information about result output. | exportPackageJob |
| 202 | Accepted | The job has been created. The response body contains links to requery for results and status of the job. This is expected to be the most usual case. | exportPackageJob |
| 400 | Bad Request | There was an error in the request. | error2 |
Response Headers
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 201 | Content-Type | string | No description | |
| 201 | Location | string | No description | |
| 202 | Content-Type | string | No description | |
| 202 | Location | string | The same value as the self link URI. | |
| 400 | Content-Type | string | Usually application/vnd.sas.error+json | |
| 400 | Location | string | Provided if a location would be meaningful in the error context. | |
| 400 | Last-Modified | string | Provided only if meaningful in the error context. |
Create and run an action to export a report as a PDF file
Code samples
# You can also use wget
curl -X POST https://example.com/visualAnalytics/reports/{reportId}/exportPdf \
-H 'Content-Type: application/vnd.sas.visual.analytics.report.export.pdf.request+json' \
-H 'Accept: application/vnd.sas.visual.analytics.report.export.pdf.job+json' \
-H 'Accept-Language: string' \
-H 'Accept-Locale: string'
const inputBody = '{
"reportObjects": [
"string"
],
"wait": 0,
"timeout": 0,
"options": {
"orientation": "landscape",
"paperSize": "letter",
"margin": ".25in",
"includeTableOfContents": false,
"showPageNumbers": true,
"showEmptyRowsAndColumns": false,
"includeAppendix": true,
"includeComments": false,
"includeDetailsTables": false,
"expandClippedContent": false,
"includeCoverPage": true,
"coverPageText": ""
},
"version": 0
}';
const headers = {
'Content-Type':'application/vnd.sas.visual.analytics.report.export.pdf.request+json',
'Accept':'application/vnd.sas.visual.analytics.report.export.pdf.job+json',
'Accept-Language':'string',
'Accept-Locale':'string'
};
fetch('https://example.com/visualAnalytics/reports/{reportId}/exportPdf',
{
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.visual.analytics.report.export.pdf.request+json',
'Accept': 'application/vnd.sas.visual.analytics.report.export.pdf.job+json',
'Accept-Language': 'string',
'Accept-Locale': 'string'
}
r = requests.post('https://example.com/visualAnalytics/reports/{reportId}/exportPdf', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.visual.analytics.report.export.pdf.request+json"},
"Accept": []string{"application/vnd.sas.visual.analytics.report.export.pdf.job+json"},
"Accept-Language": []string{"string"},
"Accept-Locale": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/visualAnalytics/reports/{reportId}/exportPdf", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /reports/{reportId}/exportPdf
Start a job from the request information that creates and exports the report as a PDF file. Apply the rendering option values in the request object to the creation of the PDF output. The request's options override (1) any defaults of the underlying rendering services, and (2) any defaults that were saved with the report by the SAS Visual Analytics application.
Body parameter
{
"reportObjects": [
"string"
],
"wait": 0,
"timeout": 0,
"options": {
"orientation": "landscape",
"paperSize": "letter",
"margin": ".25in",
"includeTableOfContents": false,
"showPageNumbers": true,
"showEmptyRowsAndColumns": false,
"includeAppendix": true,
"includeComments": false,
"includeDetailsTables": false,
"expandClippedContent": false,
"includeCoverPage": true,
"coverPageText": ""
},
"version": 0
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| reportId | path | string | true | Identifier of an existing report resource. Report identifiers are generated by the Reports API when reports are created. |
| Accept-Language | header | string | false | The user's language, which is used in both rendering and caching. For technical details, see "/tools.ietf.org/html/rfc7231#section-5.3.5" It affects the language of reports if they have been translated. This setting overrides any other user preference that has been set, such as the "offline process locale" preference in Visual Analytics. If this header is not set and there is no user preference, the language is the default language of the service. |
| Accept-Locale | header | string | false | A "format locale" that is distinct from the user's language (Accept-Language). Its syntax is similar to Accept-Language. It is honored in running of queries and formatting of values. This setting overrides any other user preference that has been set, such as the "regional locale for formats" preference in Visual Analytics. If this header is not set and there is no user preference, the format locale is the default locale of the service. |
| body | body | exportPdfRequest | false | none |
Example responses
201 Response
{
"id": "12345678-abcd-ef12-3456-12345678abab",
"state": "running",
"inputReport": "/reports/reports/12345678-abcd-ef12-3456-12345678abcd",
"reportObjects": [
"Bar Graph 1",
"Table of Frequencies"
],
"resultFolder": "/folders/folders/01234567-0123-0123-0123-0123456789ab",
"resultFileName": "Status Report Final",
"nameConflict": "replace",
"resultMediaType": "application/pdf",
"creationTimeStamp": "2021-06-21T21:10:31.123Z",
"endTimeStamp": "2021-06-21T21:10:41.123Z",
"links": [
{
"ref": "self",
"method": "GET",
"type": "application/vnd.sas.visual.analytics.report.export.pdf.job",
"uri": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc",
"href": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc"
},
{
"ref": "result",
"method": "GET",
"type": "application/*",
"uri": "/files/files/12345678-1234-1234-1234-123456789abc/content",
"href": "/files/files/12345678-1234-1234-1234-123456789abc/content"
},
{
"ref": "delete",
"method": "DELETE",
"uri": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc",
"href": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc"
},
{
"ref": "deleteContent",
"method": "DELETE",
"uri": "/files/files/12345678-1234-1234-1234-123456789abc",
"href": "/files/files/12345678-1234-1234-1234-123456789abc"
}
],
"version": 1
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | The job ran and completed within the wait time allotted. The response body contains links to the job object, which contains information about result output. | exportPdfJob |
| 202 | Accepted | The job has been created. The response body contains links to requery for results and status of the job. This is expected to be the most usual case. | exportPdfJob |
| 400 | Bad Request | There was an error in the request. | error2 |
Response Headers
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 201 | Content-Type | string | No description | |
| 201 | Location | string | If the job completed with the wait time, the Location header contains the actual result file's URI. | |
| 202 | Content-Type | string | No description | |
| 202 | Location | string | The same as the self link URI. | |
| 400 | Content-Type | string | Usually application/vnd.sas.error+json | |
| 400 | Location | string | Provided if a location would be meaningful in the error context. | |
| 400 | Last-Modified | string | Provided only if meaningful in the error context. |
Get the job with its status and links to results
Code samples
# You can also use wget
curl -X GET https://example.com/visualAnalytics/jobs/{jobId} \
-H 'Accept: application/vnd.sas.visual.analytics.report.export.pdf.job+json'
const headers = {
'Accept':'application/vnd.sas.visual.analytics.report.export.pdf.job+json'
};
fetch('https://example.com/visualAnalytics/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.visual.analytics.report.export.pdf.job+json'
}
r = requests.get('https://example.com/visualAnalytics/jobs/{jobId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.visual.analytics.report.export.pdf.job+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/visualAnalytics/jobs/{jobId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /jobs/{jobId}
Get the job with its status and links to results. This operation is specific to the case of asynchronous execution of a report action job. If the job has completed and is successful, the response object will have links to individual results.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| jobId | path | string | true | The identifier of an existing job that might not be running. |
Example responses
200 Response
{
"id": "12345678-abcd-ef12-3456-12345678abab",
"state": "running",
"inputReport": "/reports/reports/12345678-abcd-ef12-3456-12345678abcd",
"reportObjects": [
"Bar Graph 1",
"Table of Frequencies"
],
"resultFolder": "/folders/folders/01234567-0123-0123-0123-0123456789ab",
"resultFileName": "Status Report Final",
"nameConflict": "replace",
"resultMediaType": "application/pdf",
"creationTimeStamp": "2021-06-21T21:10:31.123Z",
"endTimeStamp": "2021-06-21T21:10:41.123Z",
"links": [
{
"ref": "self",
"method": "GET",
"type": "application/vnd.sas.visual.analytics.report.export.pdf.job",
"uri": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc",
"href": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc"
},
{
"ref": "result",
"method": "GET",
"type": "application/*",
"uri": "/files/files/12345678-1234-1234-1234-123456789abc/content",
"href": "/files/files/12345678-1234-1234-1234-123456789abc/content"
},
{
"ref": "delete",
"method": "DELETE",
"uri": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc",
"href": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc"
},
{
"ref": "deleteContent",
"method": "DELETE",
"uri": "/files/files/12345678-1234-1234-1234-123456789abc",
"href": "/files/files/12345678-1234-1234-1234-123456789abc"
}
],
"version": 1
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Success. | Inline |
| 400 | Bad Request | There was an error in the request. | error2 |
Response Headers
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 200 | Content-Type | string | No description | |
| 200 | Location | string | Provided if meaningful, such as when the job is complete and results are available. | |
| 200 | Last-Modified | string | No description | |
| 400 | Content-Type | string | Usually application/vnd.sas.error+json | |
| 400 | Location | string | Provided if a location would be meaningful in the error context. | |
| 400 | Last-Modified | string | Provided only if meaningful in the error context. |
Delete the job with its status and links to results
Code samples
# You can also use wget
curl -X DELETE https://example.com/visualAnalytics/jobs/{jobId} \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/visualAnalytics/jobs/{jobId}',
{
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/visualAnalytics/jobs/{jobId}', 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/visualAnalytics/jobs/{jobId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /jobs/{jobId}
Delete the job information. This operation is specific to the case of asynchronous execution of a report action job. If the job is still running, attempt to cancel it. This does not attempt to delete result files that reside under control of other services.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| jobId | path | string | true | The identifier of an existing job. |
Example responses
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "GET",
"rel": "self",
"uri": "https://example.com/visualAnalytics/reports",
"href": "https://example.com/visualAnalytics/reports",
"type": "application/vnd.sas.collection",
"responseItemType": "application/vnd.sas.report"
}
],
"version": 0
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | Successfully deleted. Nothing to be returned. | None |
| 400 | Bad Request | There was an error in the request. | error2 |
Response Headers
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 204 | Location | string | Provided if meaningful. | |
| 400 | Content-Type | string | Usually application/vnd.sas.error+json | |
| 400 | Location | string | Provided if a location would be meaningful in the error context. | |
| 400 | Last-Modified | string | Provided only if meaningful in the error context. |
Schemas
margin
".25in"
A margin value that is applied to all four margins of the page. It is nonnegative number, integer, or floating point, which is followed by the unit. The unit can be one of several two-letter abbreviations, such as "in", "cm", "mm", "pt", "px", "em", and "ex".
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | A margin value that is applied to all four margins of the page. It is nonnegative number, integer, or floating point, which is followed by the unit. The unit can be one of several two-letter abbreviations, such as "in", "cm", "mm", "pt", "px", "em", and "ex". |
paperSize
"letter"
The paper size designation for print format rendering of reports.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | The paper size designation for print format rendering of reports. |
Enumerated Values
| Property | Value |
|---|---|
| anonymous | letter |
| anonymous | legal |
| anonymous | A3 |
| anonymous | A4 |
| anonymous | A5 |
| anonymous | B4 |
| anonymous | B5 |
| anonymous | ledger |
replacementStrategy
"replace"
The strategy for handling name collision when saving the result file. The value replace means overwrite any pre-existing file. The value rename specifies that the service should modify the requested name to be unique, such as by appending a number to the name. The default value is rename.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | The strategy for handling name collision when saving the result file. The value replace means overwrite any pre-existing file. The value rename specifies that the service should modify the requested name to be unique, such as by appending a number to the name. The default value is rename. |
Enumerated Values
| Property | Value |
|---|---|
| anonymous | replace |
| anonymous | rename |
reportObjectLabelForImage
"string"
The name of the report object to render in the exported file. If this is left empty, the image will be a rendering of the first page of the report. Report objects include visual elements like graphs, tables, visual containers that the author has created in the layout, and complete pages. Specifying the object by its label makes it more convenient for the report author or viewer and does not to expose the internal names of objects in the model. However, if the client knows the internal identifier of a report object, it can be used instead of the label.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | The name of the report object to render in the exported file. If this is left empty, the image will be a rendering of the first page of the report. Report objects include visual elements like graphs, tables, visual containers that the author has created in the layout, and complete pages. Specifying the object by its label makes it more convenient for the report author or viewer and does not to expose the internal names of objects in the model. However, if the client knows the internal identifier of a report object, it can be used instead of the label. |
reportObjectLabels
[
"string"
]
A list of report object names for the objects to include in the exported file. If left empty, the result is dependent on the type of the export. For some types of export, omitting report objects means that the entire report will be processed. Report objects include visual elements like graphs and tables, visual containers that the author has created in the layout, and complete pages. Labels are not forced to be unique because they can be edited by the user. The design makes it more convenient for the report author or viewer and does not to expose the internal names of objects in the model. However, if the client knows the internal identifier of a report object, it can be used instead of the label.
Properties
None
exportPdfRequest
{
"reportObjects": [
"string"
],
"wait": 0,
"timeout": 0,
"options": {
"orientation": "landscape",
"paperSize": "letter",
"margin": ".25in",
"includeTableOfContents": false,
"showPageNumbers": true,
"showEmptyRowsAndColumns": false,
"includeAppendix": true,
"includeComments": false,
"includeDetailsTables": false,
"expandClippedContent": false,
"includeCoverPage": true,
"coverPageText": ""
},
"version": 0
}
Information about the PDF that is requested.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| reportObjects | reportObjectLabels | false | none | A list of report object names for the objects to include in the exported file. If left empty, the result is dependent on the type of the export. For some types of export, omitting report objects means that the entire report will be processed. Report objects include visual elements like graphs and tables, visual containers that the author has created in the layout, and complete pages. Labels are not forced to be unique because they can be edited by the user. The design makes it more convenient for the report author or viewer and does not to expose the internal names of objects in the model. However, if the client knows the internal identifier of a report object, it can be used instead of the label. |
| wait | waitSeconds | false | none | Number of seconds to wait before returning from the initial POST to start the job. The default value is effectively zero, meaning to return the running job to the client as soon as it is created. Specifying a positive value instructs the server to wait on the running job for the specified number of seconds because the client expects the job to finish quickly. This allows the client to avoid having to poll for completion. It should be used cautiously because job durations are unpredictable. |
| timeout | jobTimeout | false | none | After creation of the job, the maximum number of seconds it will be allowed to run before timing out. The default maximum is a system configuration value. This option allows the maximum to be modified for this request, but its value cannot exceed a system-configured maximum limit. There is no guarantee that all background processes can be terminated when time-out is exceeded, but an attempt will be made where it is possible. |
| options | exportPdfOptions | true | none | Options for executing the action. May describe output characteristics or control parameters. Not all properties are applicable to every action. |
| version | integer | true | none | Version of this request object, which is currently version 1. |
exportPackageRequest
{
"resultFolder": "/folders/folders/01234567-0123-0123-0123-0123456789ab",
"resultFileName": "Status Report Package",
"nameConflict": "replace",
"wait": 10,
"timeout": 300,
"reportObjects": [
"Bar Graph 1",
"Table of Frequencies"
],
"version": 1
}
Information about package that is to be exported. The reportObjects property can be used to reduce the size of the resulting package. The default is to include all visual elements and pages in the report.
If the folder is not specified, the package is retained for a time, but will not be visible in file selection windows, such as in SAS Drive. It is cached temporarily by the Report Packages service for a period of time sufficient for clients to check the status of the package job and download it.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| reportObjects | reportObjectLabels | false | none | A list of report object names for the objects to include in the exported file. If left empty, the result is dependent on the type of the export. For some types of export, omitting report objects means that the entire report will be processed. Report objects include visual elements like graphs and tables, visual containers that the author has created in the layout, and complete pages. Labels are not forced to be unique because they can be edited by the user. The design makes it more convenient for the report author or viewer and does not to expose the internal names of objects in the model. However, if the client knows the internal identifier of a report object, it can be used instead of the label. |
| timeout | jobTimeout | false | none | After creation of the job, the maximum number of seconds it will be allowed to run before timing out. The default maximum is a system configuration value. This option allows the maximum to be modified for this request, but its value cannot exceed a system-configured maximum limit. There is no guarantee that all background processes can be terminated when time-out is exceeded, but an attempt will be made where it is possible. |
| wait | waitSeconds | false | none | Number of seconds to wait before returning from the initial POST to start the job. The default value is effectively zero, meaning to return the running job to the client as soon as it is created. Specifying a positive value instructs the server to wait on the running job for the specified number of seconds because the client expects the job to finish quickly. This allows the client to avoid having to poll for completion. It should be used cautiously because job durations are unpredictable. |
| version | integer | true | none | Version of this request object, which is currently version 1. |
exportImageRequest
{
"reportObject": "string",
"image": {
"format": "svg",
"size": "string"
},
"timeout": 0,
"wait": 0,
"version": 0
}
Information about the image that is to be exported. It is to be determined whether the entire body is optional, since in the first iteration of this operation, defaults can be supplied by the system for all of the fields. If an empty body is supplied in the request, a representative normal layout image of the default size is rendered of the first page of the report. The report is saved with a generated name in the personal folder of the caller's identity.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| reportObject | reportObjectLabelForImage | false | none | The name of the report object to render in the exported file. If this is left empty, the image will be a rendering of the first page of the report. Report objects include visual elements like graphs, tables, visual containers that the author has created in the layout, and complete pages. Specifying the object by its label makes it more convenient for the report author or viewer and does not to expose the internal names of objects in the model. However, if the client knows the internal identifier of a report object, it can be used instead of the label. |
| image | exportImageOptions | true | none | Values needed for rendering the image. |
| timeout | jobTimeout | false | none | After creation of the job, the maximum number of seconds it will be allowed to run before timing out. The default maximum is a system configuration value. This option allows the maximum to be modified for this request, but its value cannot exceed a system-configured maximum limit. There is no guarantee that all background processes can be terminated when time-out is exceeded, but an attempt will be made where it is possible. |
| wait | waitSeconds | false | none | Number of seconds to wait before returning from the initial POST to start the job. The default value is effectively zero, meaning to return the running job to the client as soon as it is created. Specifying a positive value instructs the server to wait on the running job for the specified number of seconds because the client expects the job to finish quickly. This allows the client to avoid having to poll for completion. It should be used cautiously because job durations are unpredictable. |
| version | integer | true | none | Version of this request object, which is currently version 1. |
jobTimeout
0
After creation of the job, the maximum number of seconds it will be allowed to run before timing out. The default maximum is a system configuration value. This option allows the maximum to be modified for this request, but its value cannot exceed a system-configured maximum limit. There is no guarantee that all background processes can be terminated when time-out is exceeded, but an attempt will be made where it is possible.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | integer | false | none | After creation of the job, the maximum number of seconds it will be allowed to run before timing out. The default maximum is a system configuration value. This option allows the maximum to be modified for this request, but its value cannot exceed a system-configured maximum limit. There is no guarantee that all background processes can be terminated when time-out is exceeded, but an attempt will be made where it is possible. |
waitSeconds
0
Number of seconds to wait before returning from the initial POST to start the job. The default value is effectively zero, meaning to return the running job to the client as soon as it is created. Specifying a positive value instructs the server to wait on the running job for the specified number of seconds because the client expects the job to finish quickly. This allows the client to avoid having to poll for completion. It should be used cautiously because job durations are unpredictable.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | integer | false | none | Number of seconds to wait before returning from the initial POST to start the job. The default value is effectively zero, meaning to return the running job to the client as soon as it is created. Specifying a positive value instructs the server to wait on the running job for the specified number of seconds because the client expects the job to finish quickly. This allows the client to avoid having to poll for completion. It should be used cautiously because job durations are unpredictable. |
resultFilename
"Sample Output File Name"
The user-visible file name of the output when it is saved in a folder on the server. If the resultFolder is provided and no resultFilename is specified on the request, the service gives the file a default name. On a running or completed job, the file name is either the requested name, optionally modified by the system to avoid name conflicts, or if the request specified no file name, it is the name generated by the system.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | The user-visible file name of the output when it is saved in a folder on the server. If the resultFolder is provided and no resultFilename is specified on the request, the service gives the file a default name. On a running or completed job, the file name is either the requested name, optionally modified by the system to avoid name conflicts, or if the request specified no file name, it is the name generated by the system. |
resultFolder
"/folders/folders/12345678-abcd-abcd-abcd-123456789abc"
The URI of the folder in which the output file should be created. Specifying a folder URI allows the result to be visible in user interfaces that show files, and it puts the lifetime of the result file in the control of the client. If the result folder is not specified, the result file is transient; the system can clean up results on its own schedule, and it retains control of the lifetime of the file. The client can specify placeholder "/folders/folders/@myFolder" to save it in the user's personal folder. If the folder is specified and does not exist, it is an error.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | The URI of the folder in which the output file should be created. Specifying a folder URI allows the result to be visible in user interfaces that show files, and it puts the lifetime of the result file in the control of the client. If the result folder is not specified, the result file is transient; the system can clean up results on its own schedule, and it retains control of the lifetime of the file. The client can specify placeholder "/folders/folders/@myFolder" to save it in the user's personal folder. If the folder is specified and does not exist, it is an error. |
exportImageOptions
{
"format": "svg",
"size": "string"
}
Values needed for rendering the image.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| format | string | true | none | The type of image that is output, which initially can only be scalable vector graphic format. This property must be provided. Initially accepts only "svg" as the allowed value. |
| size | string | true | none | Size of the resulting image in the form "9999px,9999px", where the horizontal dimension is before the comma and the vertical dimension is afterward. The size must be specified. The two characters after the digits are reserved for unit specifiers; for example, "1024px,768px". The only units currently supported are pixels ("px") but the unit must be specified. |
Enumerated Values
| Property | Value |
|---|---|
| format | svg |
exportPdfOptions
{
"orientation": "landscape",
"paperSize": "letter",
"margin": ".25in",
"includeTableOfContents": false,
"showPageNumbers": true,
"showEmptyRowsAndColumns": false,
"includeAppendix": true,
"includeComments": false,
"includeDetailsTables": false,
"expandClippedContent": false,
"includeCoverPage": true,
"coverPageText": ""
}
Options for executing the action. May describe output characteristics or control parameters. Not all properties are applicable to every action.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| orientation | string | false | none | The page orientation. Applicable to PDF rendering. |
| paperSize | paperSize | false | none | The paper size designation for print format rendering of reports. |
| margin | margin | false | none | A margin value that is applied to all four margins of the page. It is nonnegative number, integer, or floating point, which is followed by the unit. The unit can be one of several two-letter abbreviations, such as "in", "cm", "mm", "pt", "px", "em", and "ex". |
| includeTableOfContents | boolean | false | none | Indicates whether to generate a printed table of contents. |
| showPageNumbers | boolean | false | none | Indicates whether page numbers should be displayed. |
| showEmptyRowsAndColumns | boolean | false | none | Indicates whether empty rows and columns should be included to fill the allocated layout space for tables and crosstabs. |
| includeAppendix | boolean | false | none | Indicates whether the appendix should be included. |
| includeComments | boolean | false | none | Indicates whether the comments should be included in the appendix. |
| includeDetailsTables | boolean | false | none | Indicates whether the comments should be included in the appendix. |
| expandClippedContent | boolean | false | none | Enables you to see all of the content for tables, crosstabs, gauges, and containers. This includes content that is only partially available in the layout of the page. Each object is displayed on a separate page at the end of the report. |
| includeCoverPage | boolean | false | none | Indicates whether a cover page should be included. |
| coverPageText | string | false | none | Optional text to be included on the cover page. This setting is ignored if includeCoverPage is false. |
Enumerated Values
| Property | Value |
|---|---|
| orientation | landscape |
| orientation | portrait |
exportPdfJob
{
"id": "12345678-abcd-ef12-3456-12345678abab",
"state": "running",
"inputReport": "/reports/reports/12345678-abcd-ef12-3456-12345678abcd",
"reportObjects": [
"Bar Graph 1",
"Table of Frequencies"
],
"resultFolder": "/folders/folders/01234567-0123-0123-0123-0123456789ab",
"resultFileName": "Status Report Final",
"nameConflict": "replace",
"resultMediaType": "application/pdf",
"creationTimeStamp": "2021-06-21T21:10:31.123Z",
"endTimeStamp": "2021-06-21T21:10:41.123Z",
"links": [
{
"ref": "self",
"method": "GET",
"type": "application/vnd.sas.visual.analytics.report.export.pdf.job",
"uri": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc",
"href": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc"
},
{
"ref": "result",
"method": "GET",
"type": "application/*",
"uri": "/files/files/12345678-1234-1234-1234-123456789abc/content",
"href": "/files/files/12345678-1234-1234-1234-123456789abc/content"
},
{
"ref": "delete",
"method": "DELETE",
"uri": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc",
"href": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc"
},
{
"ref": "deleteContent",
"method": "DELETE",
"uri": "/files/files/12345678-1234-1234-1234-123456789abc",
"href": "/files/files/12345678-1234-1234-1234-123456789abc"
}
],
"version": 1
}
An object representing a job that is run asynchronously for this service.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | string | true | none | The identifier of the action job, usually a UUID, generated by the service. |
| state | jobState | true | none | Status of the overall job. If multiple results were requested, each individual result contains a separate status set. |
| inputReport | jobInputReport | false | none | The input resource URI report for the action job. This is copied from the export request's report information, specifically the report id in the request path. |
| reportObjects | reportObjectLabels | false | none | A list of report object names for the objects to include in the exported file. If left empty, the result is dependent on the type of the export. For some types of export, omitting report objects means that the entire report will be processed. Report objects include visual elements like graphs and tables, visual containers that the author has created in the layout, and complete pages. Labels are not forced to be unique because they can be edited by the user. The design makes it more convenient for the report author or viewer and does not to expose the internal names of objects in the model. However, if the client knows the internal identifier of a report object, it can be used instead of the label. |
| resultMediaType | resultMediaType | false | none | The expected media type for the final output of the job. This is not the media type of the initial response object from starting an asynchronous job; rather, the final output has a media type like image/svg+xml, text/csv or application/pdf. |
| creationTimestamp | creationTimestamp | false | none | Timestamp when job began processing. It is in the standard internet format. |
| endTimestamp | endTimestamp | false | none | Depending on whether the job stopped or is still running, the meaning varies. If the job completed, it is the time at which the job stopped. If the job is still running, it is the time at which the job is stopped, calculated from the time of the original export request and the value of the "timeout" duration. It is in the standard internet format. |
| links | exportJobLinks | false | none | The links to get further status or results of the export job. The expected link relations are "self", "delete", "result", and "deleteContent". The self link is used to requery the state of the running job. The result link is present only if the job completed and produced a result file that can be downloaded. The "deleteContent" is present only if result content is deletable by the client. |
| version | integer | false | none | Version of this export job, which is currently version 1. |
exportPackageJob
{
"id": "12345678-1234-1234-1234-123456789abc",
"state": "running",
"inputReport": "/reports/reports/12345678-abcd-ef12-3456-12345678abcd",
"reportObjects": [
"Bar Graph 1",
"Table of Frequencies"
],
"resultFolder": "/folders/folders/01234567-0123-0123-0123-0123456789ab",
"resultFileName": "Status Report Package",
"nameConflict": "replace",
"resultMediaType": "application/zip",
"creationTimeStamp": "2021-06-21T21:10:31.123Z",
"endTimeStamp": "2021-06-21T21:10:41.123Z",
"links": [
{
"ref": "self",
"method": "GET",
"type": "application/vnd.sas.visual.analytics.report.export.package.job",
"uri": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc",
"href": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc"
},
{
"ref": "result",
"method": "GET",
"type": "application/*",
"uri": "/files/files/12345678-1234-1234-1234-123456789abc/content",
"href": "/files/files/12345678-1234-1234-1234-123456789abc/content"
},
{
"ref": "delete",
"method": "DELETE",
"uri": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc",
"href": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc"
},
{
"ref": "deleteContent",
"method": "DELETE",
"uri": "/files/files/12345678-1234-1234-1234-123456789abc",
"href": "/files/files/12345678-1234-1234-1234-123456789abc"
}
],
"version": 1
}
An object representing a job that is run asynchronously for this service.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | string | false | none | The identifier of the action job, usually a UUID, generated by the service. |
| state | jobState | false | none | Status of the overall job. If multiple results were requested, each individual result contains a separate status set. |
| inputReport | jobInputReport | false | none | The input resource URI report for the action job. This is copied from the export request's report information, specifically the report id in the request path. |
| reportObjects | reportObjectLabels | false | none | A list of report object names for the objects to include in the exported file. If left empty, the result is dependent on the type of the export. For some types of export, omitting report objects means that the entire report will be processed. Report objects include visual elements like graphs and tables, visual containers that the author has created in the layout, and complete pages. Labels are not forced to be unique because they can be edited by the user. The design makes it more convenient for the report author or viewer and does not to expose the internal names of objects in the model. However, if the client knows the internal identifier of a report object, it can be used instead of the label. |
| resultMediaType | resultMediaType | false | none | The expected media type for the final output of the job. This is not the media type of the initial response object from starting an asynchronous job; rather, the final output has a media type like image/svg+xml, text/csv or application/pdf. |
| creationTimestamp | creationTimestamp | false | none | Timestamp when job began processing. It is in the standard internet format. |
| endTimestamp | endTimestamp | false | none | Depending on whether the job stopped or is still running, the meaning varies. If the job completed, it is the time at which the job stopped. If the job is still running, it is the time at which the job is stopped, calculated from the time of the original export request and the value of the "timeout" duration. It is in the standard internet format. |
| links | exportJobLinks | false | none | The links to get further status or results of the export job. The expected link relations are "self", "delete", "result", and "deleteContent". The self link is used to requery the state of the running job. The result link is present only if the job completed and produced a result file that can be downloaded. The "deleteContent" is present only if result content is deletable by the client. |
| version | integer | false | none | Version of this export job, which is currently version 1. |
exportImageJob
{
"id": "string",
"state": "running",
"inputReport": "string",
"reportObject": "string",
"resultMediaType": "string",
"creationTimestamp": "2019-08-24T14:15:22Z",
"endTimestamp": "2019-08-24T14:15:22Z",
"links": [
{
"ref": "self",
"method": "GET",
"type": "application/vnd.sas.visual.analytics.report.export.image.job",
"uri": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc",
"href": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc"
},
{
"ref": "result",
"method": "GET",
"type": "image/svg+xml",
"uri": "/serviceName/collectionName/12345678-1234-1234-1234-123456789abc",
"href": "/serviceName/collectionName/12345678-1234-1234-1234-123456789abc"
},
{
"ref": "delete",
"method": "DELETE",
"uri": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc",
"href": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc"
}
],
"version": 0
}
An object representing a job that is run asynchronously for this service.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | string | true | none | The identifier of the action job, usually a UUID, generated by the service. |
| state | jobState | true | none | Status of the overall job. If multiple results were requested, each individual result contains a separate status set. |
| inputReport | jobInputReport | false | none | The input resource URI report for the action job. This is copied from the export request's report information, specifically the report id in the request path. |
| reportObject | string | false | none | Visual element name or label |
| resultMediaType | resultMediaType | false | none | The expected media type for the final output of the job. This is not the media type of the initial response object from starting an asynchronous job; rather, the final output has a media type like image/svg+xml, text/csv or application/pdf. |
| creationTimestamp | creationTimestamp | false | none | Timestamp when job began processing. It is in the standard internet format. |
| endTimestamp | endTimestamp | false | none | Depending on whether the job stopped or is still running, the meaning varies. If the job completed, it is the time at which the job stopped. If the job is still running, it is the time at which the job is stopped, calculated from the time of the original export request and the value of the "timeout" duration. It is in the standard internet format. |
| links | exportImageJobLinks | false | none | The links to get further status or results of the image export job. The expected link relations are "self", "delete", "result". The self link is used to requery the state of the running job. The result link is present only if the job completed and produced a result file that can be downloaded. |
| version | integer | false | none | Version of this export job, which is currently version 1. |
resultMediaType
"string"
The expected media type for the final output of the job. This is not the media type of the initial response object from starting an asynchronous job; rather, the final output has a media type like image/svg+xml, text/csv or application/pdf.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | The expected media type for the final output of the job. This is not the media type of the initial response object from starting an asynchronous job; rather, the final output has a media type like image/svg+xml, text/csv or application/pdf. |
jobInputReport
"string"
The input resource URI report for the action job. This is copied from the export request's report information, specifically the report id in the request path.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | The input resource URI report for the action job. This is copied from the export request's report information, specifically the report id in the request path. |
exportJobLinks
[
{
"links": [
{
"ref": "self",
"method": "GET",
"type": "application/vnd.sas.visual.analytics.report.export.*.job",
"uri": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc",
"href": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc"
},
{
"ref": "result",
"method": "GET",
"type": "application/*",
"uri": "/files/files/12345678-1234-1234-1234-123456789abc/content",
"href": "/files/files/12345678-1234-1234-1234-123456789abc/content"
},
{
"ref": "delete",
"method": "DELETE",
"uri": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc",
"href": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc"
},
{
"ref": "deleteContent",
"method": "DELETE",
"uri": "/files/files/12345678-1234-1234-1234-123456789abc",
"href": "/files/files/12345678-1234-1234-1234-123456789abc"
}
]
}
]
The links to get further status or results of the export job. The expected link relations are "self", "delete", "result", and "deleteContent". The self link is used to requery the state of the running job. The result link is present only if the job completed and produced a result file that can be downloaded. The "deleteContent" is present only if result content is deletable by the client.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | [link] | false | none | The links to get further status or results of the export job. The expected link relations are "self", "delete", "result", and "deleteContent". The self link is used to requery the state of the running job. The result link is present only if the job completed and produced a result file that can be downloaded. The "deleteContent" is present only if result content is deletable by the client. |
exportImageJobLinks
[
{
"ref": "self",
"method": "GET",
"type": "application/vnd.sas.visual.analytics.report.export.image.job",
"uri": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc",
"href": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc"
},
{
"ref": "result",
"method": "GET",
"type": "image/svg+xml",
"uri": "/serviceName/collectionName/12345678-1234-1234-1234-123456789abc",
"href": "/serviceName/collectionName/12345678-1234-1234-1234-123456789abc"
},
{
"ref": "delete",
"method": "DELETE",
"uri": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc",
"href": "/visualAnalytics/jobs/12345678-1234-1234-1234-123456789abc"
}
]
The links to get further status or results of the image export job. The expected link relations are "self", "delete", "result". The self link is used to requery the state of the running job. The result link is present only if the job completed and produced a result file that can be downloaded.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | [link] | false | none | The links to get further status or results of the image export job. The expected link relations are "self", "delete", "result". The self link is used to requery the state of the running job. The result link is present only if the job completed and produced a result file that can be downloaded. |
creationTimestamp
"2019-08-24T14:15:22Z"
Timestamp when job began processing. It is in the standard internet format.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string(date-time) | false | none | Timestamp when job began processing. It is in the standard internet format. |
endTimestamp
"2019-08-24T14:15:22Z"
Depending on whether the job stopped or is still running, the meaning varies. If the job completed, it is the time at which the job stopped. If the job is still running, it is the time at which the job is stopped, calculated from the time of the original export request and the value of the "timeout" duration. It is in the standard internet format.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string(date-time) | false | none | Depending on whether the job stopped or is still running, the meaning varies. If the job completed, it is the time at which the job stopped. If the job is still running, it is the time at which the job is stopped, calculated from the time of the original export request and the value of the "timeout" duration. It is in the standard internet format. |
jobState
"running"
Status of the overall job. If multiple results were requested, each individual result contains a separate status set.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | Status of the overall job. If multiple results were requested, each individual result contains a separate status set. |
Enumerated Values
| Property | Value |
|---|---|
| anonymous | running |
| anonymous | completed |
| anonymous | failed |
reportObjectDescriptor
{
"objectType": "graph",
"label": "Bar Graph of Revenue - 1",
"name": "ve233",
"index": 0,
"version": 1
}
A minimal set of properties describing a report object. Useful for obtaining the correct information needed to refer to the objects in API parameters.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| version | integer | false | none | Version 1. |
| objectType | string | false | none | One of several types of report object that are useful to the user. |
| label | string | false | none | The user-visible name of the object. |
| name | string | false | none | The internal name of the object, which can be useful in some contexts. Has a more constrained format than the label, and is unique within the scope of the report. |
| index | integer | false | none | Useful only for page objects. Indicates the position of a page in the visible sequence of pages when the report is viewed. The index is zero-based. |
Enumerated Values
| Property | Value |
|---|---|
| objectType | graph |
| objectType | table |
| objectType | crosstab |
| objectType | image |
| objectType | text |
| objectType | container |
| objectType | page |
reportObjectCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "application/json",
"links": [
{
"method": "GET",
"rel": "self",
"uri": "https://example.com/visualAnalytics/reports",
"href": "https://example.com/visualAnalytics/reports",
"type": "application/vnd.sas.collection",
"responseItemType": "application/vnd.sas.report"
}
],
"items": [
{
"objectType": "graph",
"label": "Bar Graph of Revenue - 1",
"name": "ve233",
"index": 0,
"version": 1
}
],
"version": 0
}
A standard collection or list of descriptor objects that contain key information about the visible objects in a report, such as tables, crosstabs, graphs, etc.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| name | string | false | none | The name of the collection in the context of the request. This property is of minimal use to the client. |
| start | integer | false | none | The 0-based index of the result candidates to start returning. |
| limit | integer | false | none | The maximum number of results requested. |
| count | integer | false | none | The total number of unpaged results available. |
| accept | string | false | none | The accept-item header value that was used in the initial request. |
| links | [link] | false | none | Paging links that apply to this object |
| items | [reportObjectDescriptor] | false | none | The actual results of a query |
| version | integer | false | none | collection schema version |
Enumerated Values
| Property | Value |
|---|---|
| accept | application/json |
| accept | application/vnd.sas.visual.analytics.report.object.descriptor+json |
link
{
"method": "GET",
"rel": "self",
"uri": "https://example.com/visualAnalytics/reports",
"href": "https://example.com/visualAnalytics/reports",
"type": "application/vnd.sas.collection",
"responseItemType": "application/vnd.sas.report"
}
A standard link relationship present on most responses in JSON or XML format.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| method | string | false | none | The HTTP method to invoke this endpoint. |
| rel | string | false | none | The relationship of this URL to the object. |
| uri | string | false | none | The relative URI of the REST endpoint. |
| href | string | false | none | The full URL of the REST endpoint. |
| type | string | false | none | The media type to specify in the accept/content-type header for this request. |
| 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. |
apiList
{
"version": 1,
"links": [
{
"ref": "self",
"method": "GET",
"type": "application/vnd.sas.api",
"uri": "/visualAnalytics",
"href": "/visualAnalytics"
},
{
"ref": "printReport",
"method": "GET",
"type": "application/zip",
"uri": "/visualAnalytics/reports/{reportId}/pdf",
"href": "/visualAnalytics/reports/{reportId}/pdf"
},
{
"ref": "reportPackage",
"method": "GET",
"type": "application/zip",
"uri": "/visualAnalytics/reports/{reportId}/package",
"href": "/visualAnalytics/reports/{reportId}/package"
},
{
"ref": "reportImageSvg",
"method": "GET",
"type": "image/svg+xml",
"uri": "/visualAnalytics/reports/{reportId}/svg",
"href": "/visualAnalytics/reports/{reportId}/svg"
},
{
"ref": "reportImagePng",
"method": "GET",
"type": "image/png",
"uri": "/visualAnalytics/reports/{reportId}/png",
"href": "/visualAnalytics/reports/{reportId}/png"
},
{
"ref": "reportDataCsv",
"method": "GET",
"type": "text/csv",
"uri": "/visualAnalytics/reports/{reportId}/csv",
"href": "/visualAnalytics/reports/{reportId}/csv"
},
{
"ref": "exportPdf",
"method": "POST",
"type": "application/vnd.sas.visual.analytics.report.export.pdf.request",
"responseType": "application/vnd.sas.visual.analytics.report.export.pdf.job",
"uri": "/visualAnalytics/reports/{reportId}/exportPdf",
"href": "/visualAnalytics/reports/{reportId}/exportPdf"
}
]
}
The standard object for the top level resource of the service. Contains a list of link objects.
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| version | integer | false | none | The version number of the API representation. This is version 1. |
| links | [link] | false | none | The API's top-level links. |
error2
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "GET",
"rel": "self",
"uri": "https://example.com/visualAnalytics/reports",
"href": "https://example.com/visualAnalytics/reports",
"type": "application/vnd.sas.collection",
"responseItemType": "application/vnd.sas.report"
}
],
"version": 0
}
Standard media type for error response.
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 | false | 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 | false | none | The version number of the error representation. This representation is version 2. |