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.
Report content is stored separately from the report. A new report has no content. Storing report content overwrites the previously stored content.
Terminology
report
An object that has as its content a definition for a report. The report object has metadata that enables access to name, description, creator, and modified date without having to handle the content of the report.
content
Instructions for how a report instance is created. The content enumerates the data and image resources to allow generation of visual elements such as graphs, tables, and images, and it describes how those visual elements are arranged.
report content element
A single part or entity which as a collection make up the report content; identified by its name and attributes.
report state
An object whose content is the state of a report. Among other information, the state captures: - Currently selected page - Selections of visual elements - Zoom/Pan value - Sort customizations - Current drill/expand state for hierarchical data
report state content
Instructions for how to display a report state instance for a particular user. Report state content has the same schema and media type as report content.
validation
The process of ensuring report content conforms to a specified schema and semantics.
Error Codes
HTTP status code | errorCode | Description |
---|---|---|
400 | 10701 | Error occurred during deserialization of the input report. |
400 | 10702 | Error occurred during serialization of the response report. |
400, 409 | 10708 | Unable to add the report to the specified folder. |
400 | 10709 | Missing parentFolderUri parameter. |
400 | 10713 | Unacceptable media type version. |
400 | 10714 | Report name is too long. |
400 | 10716 | Report name is empty. |
400 | 10746 | Media type mismatch between request and report content. |
400 | 10755 | Data mismatch between request and report content. |
400 | 10757 | Report content format conversion error. |
400 | 10759 | Report content save error. |
400 | 10761 | Reading report content error. |
403 | 10738 | Adding a report as a member of a folder is not allowed. |
404 | 10715 | Invalid URI provided during validation. |
404 | 10728 | Report is not found. |
404 | 10730 | Report content is not found. |
404 | 10736 | Folder is not found. |
406 | 10712 | Unacceptable media type and/or media type version. |
406 | 10743 | Downgrade media type version is not allowed. |
406 | 10748 | Missing media type in request. |
412 | 10722 | Mistmatched request ETag header. |
428 | 10720 | Missing request ETag header. |
500 | 10703 | Error occurred while reading from the report repository. |
500 | 10733 | Report content is not found system error. |
500 | 10740 | System error occurred while adding a report as a member of a folder. |
Operations
Root
The list of Reports service links.
Get header information for the service
Code samples
# You can also use wget
curl -X HEAD https://example.com/reports/
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/reports/',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/reports/')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/reports/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /
Retrieves header information for the service. It can also be used to verify that the service is available.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Service is running. | None |
404 | Not Found | Service is not available. | None |
Get a collection of top-level links
Code samples
# You can also use wget
curl -X GET https://example.com/reports/ \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.api+json'
const headers = {
'Accept':'application/vnd.sas.api+json'
};
fetch('https://example.com/reports/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.api+json'
}
r = requests.get('https://example.com/reports/', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.api+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /
Returns a collection of links to the top-level collections surfaced through this API.
Example responses
200 Response
{
"version": "1",
"links": [
{
"method": "GET",
"rel": "reports",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.summary+json"
},
{
"method": "POST",
"rel": "createReport",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "POST",
"rel": "validateName",
"href": "/reports/validations/name",
"uri": "/reports/validations/name"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/content/validation",
"uri": "/reports/content/validation",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content.validation"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Top-level links. | reportApi |
404 | Not Found | Service is not available. | None |
Report
The operations for the report resource.
Get a collection of reports
Code samples
# You can also use wget
curl -X GET https://example.com/reports/reports#reports \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Accept-Item: application/vnd.sas.summary+json' \
-H 'Accept-Language: string'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Item':'application/vnd.sas.summary+json',
'Accept-Language':'string'
};
fetch('https://example.com/reports/reports#reports',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json',
'Accept-Item': 'application/vnd.sas.summary+json',
'Accept-Language': 'string'
}
r = requests.get('https://example.com/reports/reports#reports', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
"Accept-Item": []string{"application/vnd.sas.summary+json"},
"Accept-Language": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/reports#reports", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reports
Returns a collection of reports with standard paging, filtering, and sorting options.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Item | header | string | false | Optional, media type of collection item. |
Accept-Language | header | string | false | Optional header. If present, the locale it represents is used in processing, sorting, and filtering. |
start | query | integer | false | 0-based offset of the first item to return. |
limit | query | integer | false | Maximum number of items to return. |
filter | query | string(filter-criteria) | false | The criteria for filtering. Report attributes that can be used are id , name , description , createdBy , creationTimeStamp , modifiedBy , and modifiedTimeStamp . See Filtering in REST APIs . |
sortBy | query | string(sort-criteria) | false | The criteria for sorting. Report attributes that can be used are id , name , description , createdBy , creationTimeStamp , modifiedBy , and modifiedTimeStamp . See Sorting in REST APIs . |
Enumerated Values
Parameter | Value |
---|---|
Accept-Item | application/vnd.sas.summary+json |
Accept-Item | application/vnd.sas.report+json |
Example responses
A collection of reports in standard report format.
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/reports/reports?sortBy=name&start=0&limit=20",
"uri": "/reports/reports?sortBy=name&start=0&limit=20",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "createReport",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
}
],
"name": "reports",
"accept": "application/vnd.sas.report",
"start": 0,
"count": 2,
"items": [
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"createdBy": "user1",
"creationTimeStamp": "2020-12-09T13:22:11.394Z",
"modifiedBy": "user1",
"modifiedTimeStamp": "2020-12-09T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
]
},
{
"id": "6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"name": "Sample Report 2",
"createdBy": "user2",
"creationTimeStamp": "2020-12-10T13:22:11.394Z",
"modifiedBy": "user2",
"modifiedTimeStamp": "2020-12-10T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"uri": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"type": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565/content",
"uri": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
]
}
],
"limit": 20,
"version": 2
}
A collection of reports in standard resource summary format.
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/reports/reports?sortBy=name&start=0&limit=20",
"uri": "/reports/reports?sortBy=name&start=0&limit=20",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "createReport",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
}
],
"name": "reports",
"accept": "application/vnd.sas.summary",
"start": 0,
"count": 2,
"items": [
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"createdBy": "user1",
"creationTimeStamp": "2020-12-09T13:22:11.394Z",
"modifiedBy": "user1",
"modifiedTimeStamp": "2020-12-09T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"type": "report",
"version": 1,
"iconUri": "/reports/icons/report.gif"
},
{
"id": "6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"name": "Sample Report 2",
"createdBy": "user2",
"creationTimeStamp": "2020-12-10T13:22:11.394Z",
"modifiedBy": "user2",
"modifiedTimeStamp": "2020-12-10T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"uri": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"type": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565/content",
"uri": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"type": "report",
"version": 1,
"iconUri": "/reports/icons/report.gif"
}
],
"limit": 20,
"version": 2
}
A collection of reports in standard report format.
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/reports/reports?sortBy=name&start=0&limit=20",
"uri": "/reports/reports?sortBy=name&start=0&limit=20",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "createReport",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
}
],
"name": "reports",
"accept": "application/vnd.sas.report",
"start": 0,
"count": 2,
"items": [
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"createdBy": "user1",
"creationTimeStamp": "2020-12-09T13:22:11.394Z",
"modifiedBy": "user1",
"modifiedTimeStamp": "2020-12-09T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
]
},
{
"id": "6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"name": "Sample Report 2",
"createdBy": "user2",
"creationTimeStamp": "2020-12-10T13:22:11.394Z",
"modifiedBy": "user2",
"modifiedTimeStamp": "2020-12-10T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"uri": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"type": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565/content",
"uri": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
]
}
],
"limit": 20,
"version": 2
}
A collection of reports in standard resource summary format.
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/reports/reports?sortBy=name&start=0&limit=20",
"uri": "/reports/reports?sortBy=name&start=0&limit=20",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "createReport",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
}
],
"name": "reports",
"accept": "application/vnd.sas.summary",
"start": 0,
"count": 2,
"items": [
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"createdBy": "user1",
"creationTimeStamp": "2020-12-09T13:22:11.394Z",
"modifiedBy": "user1",
"modifiedTimeStamp": "2020-12-09T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"type": "report",
"version": 1,
"iconUri": "/reports/icons/report.gif"
},
{
"id": "6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"name": "Sample Report 2",
"createdBy": "user2",
"creationTimeStamp": "2020-12-10T13:22:11.394Z",
"modifiedBy": "user2",
"modifiedTimeStamp": "2020-12-10T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"uri": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565",
"type": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565/content",
"uri": "/reports/reports/6b0fdf5c-c091-455c-8ee7-6c9ff60b3565/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"type": "report",
"version": 1,
"iconUri": "/reports/icons/report.gif"
}
],
"limit": 20,
"version": 2
}
Reports collection not found, possibly due to incorrect URI or media type.
{
"errorCode": 404,
"message": "Not Found",
"details": [
"traceId: 85b7763697b4ba63",
"path: /reports/reports"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The reports in resource summary format. | reportCollection |
404 | Not Found | Reports collection not found, possibly due to incorrect URI or media type. | error2 |
Create report
Code samples
# You can also use wget
curl -X POST https://example.com/reports/reports?parentFolderUri=http%3A%2F%2Fexample.com \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report+json' \
-H 'Accept: application/vnd.sas.report+json'
const inputBody = '{
"name": "TEST New Report",
"description": "TEST New Description"
}';
const headers = {
'Content-Type':'application/vnd.sas.report+json',
'Accept':'application/vnd.sas.report+json'
};
fetch('https://example.com/reports/reports?parentFolderUri=http%3A%2F%2Fexample.com',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report+json',
'Accept': 'application/vnd.sas.report+json'
}
r = requests.post('https://example.com/reports/reports', params={
'parentFolderUri': 'https://example.com'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report+json"},
"Accept": []string{"application/vnd.sas.report+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reports/reports", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /reports
Creates a new report and adds it to a folder as a child.
Body parameter
{
"name": "TEST New Report",
"description": "TEST New Description"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
parentFolderUri | query | string(uri) | true | The URI of the parent folder of the report. |
body | body | newReport | true | The report to create. A full report can be included, but only the name and description are used to create the new report. |
Example responses
201 Response
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"description": "Description of a sample report.",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "user1",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "user1",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"imageUris": {
"icon": "/reports/icons/report.gif"
},
"version": 1
}
The input report is invalid, or the
parentFolderUri
is not a valid folder URI or is not found.
{
"errorCode\"": 10736,
"message": "An error occurred. The resource could not be added as a folder member because the specified folder URI cannot be found.",
"details": [
"traceId: 03b5f0c710eca2d6",
"path: /reports/reports"
],
"version": 2,
"httpStatusCode": 400
}
A report with the same name is already a member of the folder.
{
"errorCode": 10708,
"message": "An error occurred. A conflict occurred when adding the resource as a member to the folder.",
"details": [
"traceId: 23307dd5dead24fc",
"path: /reports/reports"
],
"version": 2,
"httpStatusCode": 409
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | New report created. Use the updateContent link in the new report to store the report content. ETag header is returned. See Conditional operations . |
report |
400 | Bad Request | The input report is invalid, or the parentFolderUri is not a valid folder URI or is not found. |
error2 |
409 | Conflict | A report with the same name is already a member of the folder. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | The URI of the newly created resource. | |
201 | ETag | string | A tag that identifies this revision of the resource. | |
201 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Check report status
Code samples
# You can also use wget
curl -X HEAD https://example.com/reports/reports/{reportId}#standard
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/reports/reports/{reportId}#standard',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/reports/reports/{reportId}#standard')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/reports/reports/{reportId}#standard", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /reports/{reportId}
Returns the headers for a report, including ETag
. See Conditional operations
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Check status operation is successful. | None |
404 | Not Found | Report does not exist. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Get a report
Code samples
# You can also use wget
curl -X GET https://example.com/reports/reports/{reportId}#standard \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.report+json'
const headers = {
'Accept':'application/vnd.sas.report+json'
};
fetch('https://example.com/reports/reports/{reportId}#standard',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.report+json'
}
r = requests.get('https://example.com/reports/reports/{reportId}#standard', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.report+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/reports/{reportId}#standard", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reports/{reportId}
Returns the specified report, including ETag
header. See Conditional operations
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
Example responses
200 Response
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"description": "Description of a sample report.",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "user1",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "user1",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"imageUris": {
"icon": "/reports/icons/report.gif"
},
"version": 1
}
An error for report not found.
{
"errorCode": 10728,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returned the report and ETag header. |
report |
404 | Not Found | Report does not exist. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Get resource summary report
Code samples
# You can also use wget
curl -X GET https://example.com/reports/reports/{reportId}#resourceSummary \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.summary+json'
const headers = {
'Accept':'application/vnd.sas.summary+json'
};
fetch('https://example.com/reports/reports/{reportId}#resourceSummary',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.summary+json'
}
r = requests.get('https://example.com/reports/reports/{reportId}#resourceSummary', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.summary+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/reports/{reportId}#resourceSummary", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reports/{reportId}
Returns the specified report in resource summary format.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
Example responses
200 Response
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"createdBy": "user1",
"creationTimeStamp": "2020-12-09T13:22:11.394Z",
"modifiedBy": "user1",
"modifiedTimeStamp": "2020-12-09T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf"
}
],
"type": "report",
"iconUri": "/reports/icons/report.gif",
"version": "1"
}
An error for report not found.
{
"errorCode": 10728,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns the report in resource summary format. | reportSummary |
404 | Not Found | Report does not exist. | error2 |
Delete a report
Code samples
# You can also use wget
curl -X DELETE https://example.com/reports/reports/{reportId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/reports/reports/{reportId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('https://example.com/reports/reports/{reportId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/reports/reports/{reportId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /reports/{reportId}
Deletes the specified report and its content. Remove the report from the parent folder.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
Example responses
An error for report not found.
{
"errorCode": 10728,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Report is deleted. | None |
404 | Not Found | Report does not exist. | error2 |
Update a report
Code samples
# You can also use wget
curl -X PUT https://example.com/reports/reports/{reportId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report+json' \
-H 'Accept: application/vnd.sas.report+json' \
-H 'If-Match: string' \
-H 'If-Unmodified-Since: string'
const inputBody = '{
"id": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Update Report",
"description": "TEST New Description"
}';
const headers = {
'Content-Type':'application/vnd.sas.report+json',
'Accept':'application/vnd.sas.report+json',
'If-Match':'string',
'If-Unmodified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report+json',
'Accept': 'application/vnd.sas.report+json',
'If-Match': 'string',
'If-Unmodified-Since': 'string'
}
r = requests.put('https://example.com/reports/reports/{reportId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report+json"},
"Accept": []string{"application/vnd.sas.report+json"},
"If-Match": []string{"string"},
"If-Unmodified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/reports/reports/{reportId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /reports/{reportId}
Updates the specified report. Requires an If-Match
or If-Unmodified-Since
request header. See Conditional operations
.
Body parameter
{
"id": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Update Report",
"description": "TEST New Description"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
If-Match | header | string | false | The ETag that was returned from a GET , POST , PUT , or HEAD of this resource. If the ETag does not match, the update will fail. |
If-Unmodified-Since | header | string | false | The value of the modifiedTimeStamp of the resource. If the resource has been updated since this time, the update will fail. |
body | body | updateReport | true | Report to update. A full report can be included, but only id , name , and description are used to update the report. |
Example responses
200 Response
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"description": "Description of a sample report.",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "user1",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "user1",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"imageUris": {
"icon": "/reports/icons/report.gif"
},
"version": 1
}
The input report was not valid.
{
"errorCode\"": 400,
"message": "An error occurred. The report could not be updated due to bad content.",
"details": [
"traceId: 47a466b8c6c9e386",
"path: /reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7"
],
"version": 2,
"httpStatusCode": 400
}
An error for report not found.
{
"errorCode": 10728,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5"
],
"version": 2,
"httpStatusCode": 404
}
An error for report is found but with mismatched ETag.
{
"errorCode": 10722,
"message": "An error occurred. The action could not be performed. The provided resource is not the most current.",
"details": [
"traceId: ded22333af820cae",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5"
],
"version": 2,
"httpStatusCode": 412
}
The request is missing the required ETag ('If-Match' or 'If-Unmodified-Since') header.
{
"errorCode": 10720,
"message": "An error occurred. The action could not be performed: at least one header of the type 'If-Match' or 'If-Unmodified-Since' is required.",
"details": [
"traceId: fbcfd5f6cb5b4dc6",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5"
],
"version": 2,
"httpStatusCode": 428
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Report was updated. | report |
400 | Bad Request | The input report was not valid. | error2 |
404 | Not Found | Report does not exist. | error2 |
412 | Precondition Failed | The If-Match or If-Unmodified-Since header did not match the current version of the resource. |
error2 |
428 | Precondition Required | The If-Match or If-Unmodified-Since was not provided when updating the report. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Validate report name
Code samples
# You can also use wget
curl -X POST https://example.com/reports/validations/name#validateName?value=string&parentFolderUri=http%3A%2F%2Fexample.com \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/reports/validations/name#validateName?value=string&parentFolderUri=http%3A%2F%2Fexample.com',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.post('https://example.com/reports/validations/name#validateName', params={
'value': 'string', 'parentFolderUri': 'https://example.com'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reports/validations/name#validateName", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /validations/name#validateName
Ensures that the name does not exceed the maximum length and, if parentFolderUri
is provided, that a report with the name can be added as a member without conflict. The validation does not check whether or not the user can actually add a report with the given name to the folder.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
value | query | string | true | The report name in url-encoded format. |
parentFolderUri | query | string(uri) | true | The URI of the parent folder of the report. |
Example responses
The report name exceeds the maximum allowed length.
{
"errorCode": 10714,
"message": "The given report name exceeds the maximum 100 characters: abc.......................",
"details": [
"traceId: 211434df45ab0dfd",
"path: /reports/validations/name"
],
"version": 2,
"httpStatusCode": 400
}
The folder does not exist.
{
"errorCode": 10715,
"message": "The folder with 'validateNewMemberName' link as specified by the URI cannot be found.",
"details": [
"traceId: b155b43f6db843ed",
"path: /reports/validations/name"
],
"version": 2,
"httpStatusCode": 404
}
A report with the same name is already a member of the folder.
{
"errorCode": 1177,
"message": "An error occurred. The report 'ABC' could not be added to the folder.",
"details": [
"traceId: 584b0d18b140b777",
"path: /reports/validations/name"
],
"version": 2,
"httpStatusCode": 409
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The report name is valid. | None |
400 | Bad Request | The report name exceeds the maximum allowed length. | error2 |
404 | Not Found | The folder does not exist. | error2 |
409 | Conflict | A report with the same name is already a member of the folder. | error2 |
ReportContent
The operations for the report content resource.
Check status of report content
Code samples
# You can also use wget
curl -X HEAD https://example.com/reports/reports/{reportId}/content \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept-Language: string' \
-H 'If-None-Match: string' \
-H 'If-Modified-Since: string'
const headers = {
'Accept-Language':'string',
'If-None-Match':'string',
'If-Modified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}/content',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept-Language': 'string',
'If-None-Match': 'string',
'If-Modified-Since': 'string'
}
r = requests.head('https://example.com/reports/reports/{reportId}/content', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept-Language": []string{"string"},
"If-None-Match": []string{"string"},
"If-Modified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/reports/reports/{reportId}/content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /reports/{reportId}/content
Returns the headers for report content, including the ETag
. See Conditional operations
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
Accept-Language | header | string | false | Optional header. If present, the locale it represents is used in processing, sorting, and filtering. |
If-None-Match | header | string | false | The ETag that was returned from a GET , POST , PUT , or HEAD of this resource. If the ETag matches, the operation will not proceed. |
If-Modified-Since | header | string | false | The value of the modifiedTimeStamp the resource. If the resource has not been updated since this time, the operation will not proceed. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Check status operation was successful. | None |
304 | Not Modified | The caller has the most current resource. | None |
404 | Not Found | Report or report content does not exist. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
|
200 | Content-Language | string | This header represents the locale of the result. It may not be present if there is issue during localization, in which case the result is what is persisted. |
Get report content
Code samples
# You can also use wget
curl -X GET https://example.com/reports/reports/{reportId}/content \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.report.content+json' \
-H 'Accept-Language: string' \
-H 'If-None-Match: string' \
-H 'If-Modified-Since: string'
const headers = {
'Accept':'application/vnd.sas.report.content+json',
'Accept-Language':'string',
'If-None-Match':'string',
'If-Modified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}/content',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.report.content+json',
'Accept-Language': 'string',
'If-None-Match': 'string',
'If-Modified-Since': 'string'
}
r = requests.get('https://example.com/reports/reports/{reportId}/content', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.report.content+json"},
"Accept-Language": []string{"string"},
"If-None-Match": []string{"string"},
"If-Modified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/reports/{reportId}/content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reports/{reportId}/content
Returns the report content, including ETag
. See Conditional operations
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
Accept-Language | header | string | false | Optional header. If present, the locale it represents is used in processing, sorting, and filtering. |
If-None-Match | header | string | false | The ETag that was returned from a GET , POST , PUT , or HEAD of this resource. If the ETag matches, the operation will not proceed. |
If-Modified-Since | header | string | false | The value of the modifiedTimeStamp the resource. If the resource has not been updated since this time, the operation will not proceed. |
Example responses
200 Response
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<SASReport>
<label>Small Report</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<Results/>
<DataDefinitions/>
<VisualElements/>
<PromptDefinitions/>
<View>
<Sections>
<Section>
<name>vi1</name>
<label>Section1</label>
<Body>
<MediaContainer>
<target>mt111</target>
<RelativeLayout/>
</MediaContainer>
</Body>
</Section>
</Sections>
</View>
<Interactions/>
<MediaDefinitionResource>
<file>/files/files/0499563b-9425-42ab-b6e2-d99804e54299</file>
</MediaDefinitionResource>
<MediaSchemes>
<MediaScheme>
<name>ms201</name>
</MediaScheme>
</MediaSchemes>
<MediaTargets>
<MediaTarget>
<name>mt111</name>
<scheme>ms201</scheme>
<definition>table-1280x768</definition>
</MediaTarget>
</MediaTargets>
</SASReport>
An error for report content not found.
{
"errorCode": 10728,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Report content. | reportContentXml |
304 | Not Modified | The caller has the most current resource. | None |
404 | Not Found | Report or report content does not exist. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
|
200 | Content-Language | string | This header represents the locale of the result. It may not be present if there is issue during localization, in which case the result is what is persisted. |
Save report content
Code samples
# You can also use wget
curl -X PUT https://example.com/reports/reports/{reportId}/content \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.content+json' \
-H 'Accept: application/vnd.sas.error+json' \
-H 'If-Match: string' \
-H 'If-Unmodified-Since: string'
const inputBody = '{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}';
const headers = {
'Content-Type':'application/vnd.sas.report.content+json',
'Accept':'application/vnd.sas.error+json',
'If-Match':'string',
'If-Unmodified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}/content',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.content+json',
'Accept': 'application/vnd.sas.error+json',
'If-Match': 'string',
'If-Unmodified-Since': 'string'
}
r = requests.put('https://example.com/reports/reports/{reportId}/content', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.content+json"},
"Accept": []string{"application/vnd.sas.error+json"},
"If-Match": []string{"string"},
"If-Unmodified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/reports/reports/{reportId}/content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /reports/{reportId}/content
Saves the report content. Does not return the stored content. An ETag
is not required for the initial save, but is required for all subsequent saves. In some situations, where an Accept type header is automatically generated, setting it to '*/*' will achieve the same effect as omitting it. See Conditional operations
.
Body parameter
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<reportContentJson element="SASReport">
<xmlns>http://www.sas.com/sasreportmodel/bird-4.3.0</xmlns>
<label>Small Report</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<view element="View">
<sections element="Section">
<name>vi1</name>
<label>Section1</label>
<body element="Body">
<mediaContainerList element="MediaContainer">
<target>mt111</target>
<layout element="ResponsiveLayout"/>
</mediaContainerList>
</body>
<mediaSchemes element="MediaScheme">
<name>ms201</name>
</mediaSchemes>
<mediaTargets element="MediaTarget">
<name>mt111</name>
<scheme">ms201</scheme">
</mediaTargets>
</sections>
</view>
</reportContentJson>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
If-Match | header | string | false | The ETag that was returned from a GET , POST , PUT , or HEAD of this resource. If the ETag does not match, the update will fail. |
If-Unmodified-Since | header | string | false | The value of the modifiedTimeStamp of the resource. If the resource has been updated since this time, the update will fail. |
copyDependentFiles | query | boolean | false | The flag to create copy of all dependent file resources. |
body | body | reportContentJson | true | The report content to be saved. |
Example responses
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
An error for report content not found.
{
"errorCode": 10728,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content"
],
"version": 2,
"httpStatusCode": 404
}
An error for report content is found but with mismatched ETag.
{
"errorCode": 10722,
"message": "An error occurred. The action could not be performed. The provided resource is not the most current.",
"details": [
"traceId: ded22333af820cae",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content"
],
"version": 2,
"httpStatusCode": 412
}
The request is missing the required ETag ('If-Match' or 'If-Unmodified-Since') header.
{
"errorCode": 10720,
"message": "An error occurred. The action could not be performed: at least one header of the type 'If-Match' or 'If-Unmodified-Since' is required.",
"details": [
"traceId: fbcfd5f6cb5b4dc6",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content"
],
"version": 2,
"httpStatusCode": 428
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The report content was stored. | None |
400 | Bad Request | The input report content was not valid. | error2 |
404 | Not Found | The report or report content does not exist. | error2 |
412 | Precondition Failed | The If-Match or If-Unmodified-Since header did not match the current version of the resource. |
error2 |
428 | Precondition Required | The If-Match or If-Unmodified-Since was not provided when updating the report content. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
204 | ETag | string | A tag that identifies this revision of the resource. | |
204 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Save and return report content
Code samples
# You can also use wget
curl -X PUT https://example.com/reports/reports/{reportId}/content#updateContentWithReturn \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.content+json' \
-H 'Accept: application/vnd.sas.report.content+json' \
-H 'If-Match: string' \
-H 'If-Unmodified-Since: string'
const inputBody = '{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}';
const headers = {
'Content-Type':'application/vnd.sas.report.content+json',
'Accept':'application/vnd.sas.report.content+json',
'If-Match':'string',
'If-Unmodified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}/content#updateContentWithReturn',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.content+json',
'Accept': 'application/vnd.sas.report.content+json',
'If-Match': 'string',
'If-Unmodified-Since': 'string'
}
r = requests.put('https://example.com/reports/reports/{reportId}/content#updateContentWithReturn', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.content+json"},
"Accept": []string{"application/vnd.sas.report.content+json"},
"If-Match": []string{"string"},
"If-Unmodified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/reports/reports/{reportId}/content#updateContentWithReturn", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /reports/{reportId}/content
An ETag
is not required for the initial save, but is required for all subsequent saves. See Conditional operations
. A different response code is returned depending on whether the request is for the initial save or a subsequent save.
Body parameter
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<reportContentJson element="SASReport">
<xmlns>http://www.sas.com/sasreportmodel/bird-4.3.0</xmlns>
<label>Small Report</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<view element="View">
<sections element="Section">
<name>vi1</name>
<label>Section1</label>
<body element="Body">
<mediaContainerList element="MediaContainer">
<target>mt111</target>
<layout element="ResponsiveLayout"/>
</mediaContainerList>
</body>
<mediaSchemes element="MediaScheme">
<name>ms201</name>
</mediaSchemes>
<mediaTargets element="MediaTarget">
<name>mt111</name>
<scheme">ms201</scheme">
</mediaTargets>
</sections>
</view>
</reportContentJson>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
If-Match | header | string | false | The ETag that was returned from a GET , POST , PUT , or HEAD of this resource. If the ETag does not match, the update will fail. |
If-Unmodified-Since | header | string | false | The value of the modifiedTimeStamp of the resource. If the resource has been updated since this time, the update will fail. |
copyDependentFiles | query | boolean | false | The flag to create copy of all dependent file resources. |
body | body | reportContentJson | true | The report content to be saved. |
Example responses
200 Response
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<SASReport>
<label>Small Report</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<Results/>
<DataDefinitions/>
<VisualElements/>
<PromptDefinitions/>
<View>
<Sections>
<Section>
<name>vi1</name>
<label>Section1</label>
<Body>
<MediaContainer>
<target>mt111</target>
<RelativeLayout/>
</MediaContainer>
</Body>
</Section>
</Sections>
</View>
<Interactions/>
<MediaDefinitionResource>
<file>/files/files/0499563b-9425-42ab-b6e2-d99804e54299</file>
</MediaDefinitionResource>
<MediaSchemes>
<MediaScheme>
<name>ms201</name>
</MediaScheme>
</MediaSchemes>
<MediaTargets>
<MediaTarget>
<name>mt111</name>
<scheme>ms201</scheme>
<definition>table-1280x768</definition>
</MediaTarget>
</MediaTargets>
</SASReport>
An error for report content is not valid.
{
"errorCode\"": 10759,
"message": "An error occurred. The report content could not be saved.",
"details": [
"traceId: 87b3021faef6ac38",
"path: /reports/reports/c1e6b57b-bafc-4200-b900-7d8828b7845f/content"
],
"version": 2,
"httpStatusCode": 400
}
An error for report content not found.
{
"errorCode": 10728,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content"
],
"version": 2,
"httpStatusCode": 404
}
An error for report content is found but with mismatched ETag.
{
"errorCode": 10722,
"message": "An error occurred. The action could not be performed. The provided resource is not the most current.",
"details": [
"traceId: ded22333af820cae",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content"
],
"version": 2,
"httpStatusCode": 412
}
The request is missing the required ETag ('If-Match' or 'If-Unmodified-Since') header.
{
"errorCode": 10720,
"message": "An error occurred. The action could not be performed: at least one header of the type 'If-Match' or 'If-Unmodified-Since' is required.",
"details": [
"traceId: fbcfd5f6cb5b4dc6",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content"
],
"version": 2,
"httpStatusCode": 428
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The report content was updated. | reportContentXml |
201 | Created | The report content was created. | reportContentXml |
400 | Bad Request | Report does not exist. | error2 |
404 | Not Found | Report or report content does not exist. | error2 |
412 | Precondition Failed | The If-Match or If-Unmodified-Since header did not match the current version of the object. |
error2 |
428 | Precondition Required | The If-Match or If-Unmodified-Since was not provided when updating the report. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
|
201 | ETag | string | A tag that identifies this revision of the resource. | |
201 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Validate the persisted report content schema
Code samples
# You can also use wget
curl -X POST https://example.com/reports/reports/{reportId}/content/validation#validatePersistedContent \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.report.content.validation+json'
const headers = {
'Accept':'application/vnd.sas.report.content.validation+json'
};
fetch('https://example.com/reports/reports/{reportId}/content/validation#validatePersistedContent',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.report.content.validation+json'
}
r = requests.post('https://example.com/reports/reports/{reportId}/content/validation#validatePersistedContent', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.report.content.validation+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reports/reports/{reportId}/content/validation#validatePersistedContent", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /reports/{reportId}/content/validation
Validates the report content against a schema. The schema specified in the report content is used for validation.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
Example responses
200 Response
{
"level": "schemaInvalid",
"schema": "bird-4.1.2.xsd",
"messages": [
{
"type": "schemaError",
"message": "Line 89: Value 'binder' is not facet-valid with respect to enumeration '[column, page]'. It must be a value from the enumeration."
},
{
"type": "schemaError",
"message": "Line 89: The value 'binder' of attribute 'type' on element 'Axis' is not valid with respect to its type, 'relationalAxisTypeEnum'."
}
],
"version": 1
}
Report or report content does not exist.
{
"errorCode": 0,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content/validation"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Report content is valid. | reportContentValidation |
404 | Not Found | Report or report content does not exist. | error2 |
Check report content elements status
Code samples
# You can also use wget
curl -X HEAD https://example.com/reports/reports/{reportId}/content/elements \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept-Language: string' \
-H 'Accept-Item: application/vnd.sas.report.content.element+json;version=1'
const headers = {
'Accept-Language':'string',
'Accept-Item':'application/vnd.sas.report.content.element+json;version=1'
};
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=1'
}
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=1"},
}
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 |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Check status operation was successful. | None |
404 | Not Found | The report or report content does not exist. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Content-Language | string | This header represents the locale of the result. It may not be present if there is issue during localization, in which case the result is what is persisted. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Get report content elements
Code samples
# You can also use wget
curl -X GET https://example.com/reports/reports/{reportId}/content/elements \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Accept-Language: string' \
-H 'Accept-Item: application/vnd.sas.report.content.element+json;version=1'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Language':'string',
'Accept-Item':'application/vnd.sas.report.content.element+json;version=1'
};
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=1'
}
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=1"},
}
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 |
Example responses
200 Response
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/content/elements",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/content/elements",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "GET",
"rel": "up",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5",
"type": "application/vnd.sas.report"
}
],
"name": "reportContentElements",
"accept": "application/vnd.sas.report.content.element",
"count": "3",
"items": [
{
"name": "vi6",
"label": "Migration Timeline",
"type": "Section",
"version": 1
},
{
"name": "vi357",
"label": "EG Project Status",
"type": "HiddenSection",
"version": 1
},
{
"name": "ve27",
"label": "Import details for EG projects",
"type": "Table",
"version": 1
}
],
"version": 2
}
The report or report content does not exist.
{
"errorCode": 0,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/5559a118-139b-46e4-adea-97198d9068f5/content/elements"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A collection of report content elements. Paging and sorting are not supported. | reportContentElementsCollection |
404 | Not Found | The report or report content does not exist. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Content-Language | string | This header represents the locale of the result. It may not be present if there is issue during localization, in which case the result is what is persisted. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Convert content from XML to JSON
Code samples
# You can also use wget
curl -X POST https://example.com/reports/content#toJSON \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.content+xml' \
-H 'Accept: application/vnd.sas.report.content+json'
const inputBody = '{
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"Results": {},
"DataDefinitions": {},
"VisualElements": {},
"PromptDefinitions": {},
"View": {
"Sections": {
"Section": {
"name": "vi1",
"label": "Section1",
"Body": {
"MediaContainer": {
"target": "mt111",
"RelativeLayout": {}
}
}
}
}
},
"Interactions": {},
"MediaDefinitionResource": {
"file": "/files/files/0499563b-9425-42ab-b6e2-d99804e54299"
},
"MediaSchemes": {
"MediaScheme": {
"name": "ms201"
}
},
"MediaTargets": {
"MediaTarget": {
"name": "mt111",
"scheme": "ms201",
"definition": "table-1280x768"
}
}
}';
const headers = {
'Content-Type':'application/vnd.sas.report.content+xml',
'Accept':'application/vnd.sas.report.content+json'
};
fetch('https://example.com/reports/content#toJSON',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.content+xml',
'Accept': 'application/vnd.sas.report.content+json'
}
r = requests.post('https://example.com/reports/content#toJSON', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.content+xml"},
"Accept": []string{"application/vnd.sas.report.content+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reports/content#toJSON", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /content
Returns the converted report content.
Body parameter
<?xml version="1.0" encoding="UTF-8" ?>
<SASReport>
<label>Small Report</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<Results/>
<DataDefinitions/>
<VisualElements/>
<PromptDefinitions/>
<View>
<Sections>
<Section>
<name>vi1</name>
<label>Section1</label>
<Body>
<MediaContainer>
<target>mt111</target>
<RelativeLayout/>
</MediaContainer>
</Body>
</Section>
</Sections>
</View>
<Interactions/>
<MediaDefinitionResource>
<file>/files/files/0499563b-9425-42ab-b6e2-d99804e54299</file>
</MediaDefinitionResource>
<MediaSchemes>
<MediaScheme>
<name>ms201</name>
</MediaScheme>
</MediaSchemes>
<MediaTargets>
<MediaTarget>
<name>mt111</name>
<scheme>ms201</scheme>
<definition>table-1280x768</definition>
</MediaTarget>
</MediaTargets>
</SASReport>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | reportContentXml | true | The report content to be converted. |
Example responses
200 Response
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
Bad Request. The input report content was not valid.
{
"errorCode\"": 0,
"message": "An error occurred.",
"details": [
"traceId: 03b5f0c710eca2d6",
"path: /reports/content"
],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Report content. | reportContentJson |
400 | Bad Request | Bad Request. The input report content was not valid. | error2 |
Convert content from JSON to XML
Code samples
# You can also use wget
curl -X POST https://example.com/reports/content#toXML \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.content+json' \
-H 'Accept: application/vnd.sas.report.content+xml'
const inputBody = '{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}';
const headers = {
'Content-Type':'application/vnd.sas.report.content+json',
'Accept':'application/vnd.sas.report.content+xml'
};
fetch('https://example.com/reports/content#toXML',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.content+json',
'Accept': 'application/vnd.sas.report.content+xml'
}
r = requests.post('https://example.com/reports/content#toXML', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.content+json"},
"Accept": []string{"application/vnd.sas.report.content+xml"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reports/content#toXML", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /content
Returns the converted report content.
Body parameter
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | reportContentJson | true | The report content to be converted. |
Example responses
200 Response
<?xml version="1.0" encoding="UTF-8" ?>
<SASReport>
<label>Small Report</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<Results/>
<DataDefinitions/>
<VisualElements/>
<PromptDefinitions/>
<View>
<Sections>
<Section>
<name>vi1</name>
<label>Section1</label>
<Body>
<MediaContainer>
<target>mt111</target>
<RelativeLayout/>
</MediaContainer>
</Body>
</Section>
</Sections>
</View>
<Interactions/>
<MediaDefinitionResource>
<file>/files/files/0499563b-9425-42ab-b6e2-d99804e54299</file>
</MediaDefinitionResource>
<MediaSchemes>
<MediaScheme>
<name>ms201</name>
</MediaScheme>
</MediaSchemes>
<MediaTargets>
<MediaTarget>
<name>mt111</name>
<scheme>ms201</scheme>
<definition>table-1280x768</definition>
</MediaTarget>
</MediaTargets>
</SASReport>
Bad Request. The input report content was not valid.
{
"errorCode\"": 0,
"message": "An error occurred.",
"details": [
"traceId: 03b5f0c710eca2d6",
"path: /reports/content"
],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Report content. | reportContentXml |
400 | Bad Request | Bad Request. The input report content was not valid. | error2 |
Validate report content schema
Code samples
# You can also use wget
curl -X POST https://example.com/reports/content/validation#validateAnyContent \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.content+json' \
-H 'Accept: application/vnd.sas.report.content.validation+json'
const inputBody = '{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}';
const headers = {
'Content-Type':'application/vnd.sas.report.content+json',
'Accept':'application/vnd.sas.report.content.validation+json'
};
fetch('https://example.com/reports/content/validation#validateAnyContent',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.content+json',
'Accept': 'application/vnd.sas.report.content.validation+json'
}
r = requests.post('https://example.com/reports/content/validation#validateAnyContent', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.content+json"},
"Accept": []string{"application/vnd.sas.report.content.validation+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reports/content/validation#validateAnyContent", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /content/validation
Validates the report content against a schema. The schema specified in the report content is used for validation.
Body parameter
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<reportContentJson element="SASReport">
<xmlns>http://www.sas.com/sasreportmodel/bird-4.3.0</xmlns>
<label>Small Report</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<view element="View">
<sections element="Section">
<name>vi1</name>
<label>Section1</label>
<body element="Body">
<mediaContainerList element="MediaContainer">
<target>mt111</target>
<layout element="ResponsiveLayout"/>
</mediaContainerList>
</body>
<mediaSchemes element="MediaScheme">
<name>ms201</name>
</mediaSchemes>
<mediaTargets element="MediaTarget">
<name>mt111</name>
<scheme">ms201</scheme">
</mediaTargets>
</sections>
</view>
</reportContentJson>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | reportContentJson | true | The report content to be converted. |
Example responses
200 Response
{
"level": "schemaInvalid",
"schema": "bird-4.1.2.xsd",
"messages": [
{
"type": "schemaError",
"message": "Line 89: Value 'binder' is not facet-valid with respect to enumeration '[column, page]'. It must be a value from the enumeration."
},
{
"type": "schemaError",
"message": "Line 89: The value 'binder' of attribute 'type' on element 'Axis' is not valid with respect to its type, 'relationalAxisTypeEnum'."
}
],
"version": 1
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Report content validation result. | reportContentValidation |
ReportState
The operations for the report state resource.
Get a collection of report states
Code samples
# You can also use wget
curl -X GET https://example.com/reports/reports/{reportId}/states \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Accept-Language: string'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Language':'string'
};
fetch('https://example.com/reports/reports/{reportId}/states',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json',
'Accept-Language': 'string'
}
r = requests.get('https://example.com/reports/reports/{reportId}/states', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
"Accept-Language": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/reports/{reportId}/states", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reports/{reportId}/states
Returns a collection of report states of the current user associated with a report with standard paging, filtering, and sorting options.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
Accept-Language | header | string | false | Optional header. If present, the locale it represents is used in processing, sorting, and filtering. |
start | query | integer | false | 0-based offset of the first item to return. |
limit | query | integer | false | Maximum number of items to return. |
filter | query | string(filter-criteria) | false | The criteria for filtering the items. Report state attributes that can be used are id , label , primary , createdBy , creationTimeStamp , modifiedBy , and modifiedTimeStamp . See Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | The criteria for sorting the items. Report attributes that can be used are id , label , primary , createdBy , creationTimeStamp , modifiedBy , and modifiedTimeStamp . See Sorting in REST APIs. |
Example responses
200 Response
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states?filter=and(eq(report.id,'8559a118-139b-46e4-adea-97198d9068f5'),eq(userId,'user1'))&sortBy=label&start=0&limit=20",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states?filter=and(eq(report.id,'8559a118-139b-46e4-adea-97198d9068f5'),eq(userId,'user1'))&sortBy=label&start=0&limit=20",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "createReportState",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states",
"type": "application/vnd.sas.report.state.info",
"responseType": "application/vnd.sas.report.state.info"
}
],
"name": "reportStates",
"accept": "application/vnd.sas.report.state.info",
"count": "1",
"items": [
{
"id": "cb237e1b-b11f-42fb-960c-a48a0c5b1688",
"label": "2020Timeline",
"userId": "user1",
"primary": "true",
"reportModifiedTimeStamp": "2018-03-02T19:33:41.124Z",
"creationTimeStamp": "2018-03-02T19:41:55.314Z",
"createdBy": "user1",
"modifiedTimeStamp": "2018-03-02T19:41:55.314Z",
"modifiedBy": "user5",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"uri": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"uri": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"type": "application/vnd.sas.report.state.info",
"responseType": "application/vnd.sas.report.state.info"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"uri": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content",
"uri": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content",
"type": "application/vnd.sas.report.state"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content",
"uri": "/reports/reports/cb237e1b-b11f-42fb-960c-a48a0c5b1688/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content",
"type": "application/vnd.sas.report.state",
"responseType": "application/vnd.sas.report.stat"
}
]
}
],
"version": "2"
}
Bad Request.
{
"errorCode\"": 0,
"message": "An error occurred.",
"details": [
"traceId: 03b5f0c710eca2d6",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states"
],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The report states in standard report state format. | reportStateCollection |
400 | Bad Request | Bad Request. | error2 |
Create report state
Code samples
# You can also use wget
curl -X POST https://example.com/reports/reports/{reportId}/states \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.state.info+json' \
-H 'Accept: application/vnd.sas.report.state.info+json'
const inputBody = '{
"label": "Test New Report State",
"primary": true,
"reportModifiedTimeStamp": "2018-03-02T19:33:41.124Z"
}';
const headers = {
'Content-Type':'application/vnd.sas.report.state.info+json',
'Accept':'application/vnd.sas.report.state.info+json'
};
fetch('https://example.com/reports/reports/{reportId}/states',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.state.info+json',
'Accept': 'application/vnd.sas.report.state.info+json'
}
r = requests.post('https://example.com/reports/reports/{reportId}/states', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.state.info+json"},
"Accept": []string{"application/vnd.sas.report.state.info+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reports/reports/{reportId}/states", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /reports/{reportId}/states
Creates a new report state.
Body parameter
{
"label": "Test New Report State",
"primary": true,
"reportModifiedTimeStamp": "2018-03-02T19:33:41.124Z"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
body | body | newReportState | true | Report state to create. A full report state can be included, but only the label and primary attributes are used to create the new report state. |
Example responses
201 Response
{
"id": "126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"userId": "user1",
"label": "Primary",
"primary": true,
"reportModifiedTimeStamp": "2021-05-10T22:31:33.400Z",
"createdBy": "user1",
"creationTimeStamp": "2021-05-13T15:01:28.708Z",
"modifiedBy": "user5",
"modifiedTimeStamp": "2021-05-13T15:01:29.055Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"type": "application/vnd.sas.report.state.info",
"responseType": "application/vnd.sas.report.state.info"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"version": 1
}
Bad Request. The input report state was not valid.
{
"errorCode\"": 0,
"message": "An error occurred.",
"details": [
"traceId: 03b5f0c710eca2d6",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states"
],
"version": 2,
"httpStatusCode": 400
}
Report does not exist.
{
"errorCode": 0,
"message": "An error occurred. The resource could not be found. Identifier: 5559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | New report state created. ETag header is returned. See Conditional operations . |
reportState |
400 | Bad Request | Bad Request. The input report state was not valid. | error2 |
404 | Not Found | Report does not exist. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | The URI of the newly created resource. | |
201 | ETag | string | A tag that identifies this revision of the resource. | |
201 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Check report state status
Code samples
# You can also use wget
curl -X HEAD https://example.com/reports/reports/{reportId}/states/{stateId}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/reports/reports/{reportId}/states/{stateId}',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/reports/reports/{reportId}/states/{stateId}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/reports/reports/{reportId}/states/{stateId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /reports/{reportId}/states/{stateId}
Returns the headers for a report state, including ETag
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
stateId | path | string(object-id) | true | Report state id to check. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Check status was successful. | None |
404 | Not Found | Report or report state does not exist. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Get report state
Code samples
# You can also use wget
curl -X GET https://example.com/reports/reports/{reportId}/states/{stateId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.report.state.info+json'
const headers = {
'Accept':'application/vnd.sas.report.state.info+json'
};
fetch('https://example.com/reports/reports/{reportId}/states/{stateId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.report.state.info+json'
}
r = requests.get('https://example.com/reports/reports/{reportId}/states/{stateId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.report.state.info+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/reports/{reportId}/states/{stateId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reports/{reportId}/states/{stateId}
Returns the specified report state, including ETag header. See Conditional operations
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Identifier of the report. |
stateId | path | string(object-id) | true | Report state id to get. |
Example responses
200 Response
{
"id": "126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"userId": "user1",
"label": "Primary",
"primary": true,
"reportModifiedTimeStamp": "2021-05-10T22:31:33.400Z",
"createdBy": "user1",
"creationTimeStamp": "2021-05-13T15:01:28.708Z",
"modifiedBy": "user5",
"modifiedTimeStamp": "2021-05-13T15:01:29.055Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"type": "application/vnd.sas.report.state.info",
"responseType": "application/vnd.sas.report.state.info"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"version": 1
}
Report or report state does not exist.
{
"errorCode": 0,
"message": "An error occurred. The resource could not be found. Identifier: 412f6f71-64eb-4840-a6a5-9a8e18fcad74.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns the report state. ETag header is included. | reportState |
404 | Not Found | Report or report state does not exist. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the object. | |
200 | Last-Modified | string | The last modified timestamp of the object. |
Delete report state
Code samples
# You can also use wget
curl -X DELETE https://example.com/reports/reports/{reportId}/states/{stateId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/reports/reports/{reportId}/states/{stateId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('https://example.com/reports/reports/{reportId}/states/{stateId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/reports/reports/{reportId}/states/{stateId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /reports/{reportId}/states/{stateId}
Deletes the specified report state.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
stateId | path | string(object-id) | true | Report state id to check. |
Example responses
Report or report state does not exist.
{
"errorCode": 0,
"message": "An error occurred. The resource could not be found. Identifier: 412f6f71-64eb-4840-a6a5-9a8e18fcad74.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Report state was deleted. | None |
404 | Not Found | Report or report state does not exist. | error2 |
Update report state
Code samples
# You can also use wget
curl -X PUT https://example.com/reports/reports/{reportId}/states/{stateId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.state.info+json' \
-H 'Accept: application/vnd.sas.report.state.info+json' \
-H 'If-Match: string' \
-H 'If-Unmodified-Since: string'
const inputBody = '{
"id": "412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"label": "Test Updated Report State",
"primary": true,
"reportModifiedTimeStamp": "2018-03-02T19:33:41.124Z"
}';
const headers = {
'Content-Type':'application/vnd.sas.report.state.info+json',
'Accept':'application/vnd.sas.report.state.info+json',
'If-Match':'string',
'If-Unmodified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}/states/{stateId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.state.info+json',
'Accept': 'application/vnd.sas.report.state.info+json',
'If-Match': 'string',
'If-Unmodified-Since': 'string'
}
r = requests.put('https://example.com/reports/reports/{reportId}/states/{stateId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.state.info+json"},
"Accept": []string{"application/vnd.sas.report.state.info+json"},
"If-Match": []string{"string"},
"If-Unmodified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/reports/reports/{reportId}/states/{stateId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /reports/{reportId}/states/{stateId}
Updates the specified report state. Either an If-Match
or If-Unmodified-Since
request header is required. See Conditional operations
.
Body parameter
{
"id": "412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"label": "Test Updated Report State",
"primary": true,
"reportModifiedTimeStamp": "2018-03-02T19:33:41.124Z"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
stateId | path | string(object-id) | true | Report state id to check. |
If-Match | header | string | false | The ETag that was returned from a GET , POST , PUT , or HEAD of this resource. If the ETag does not match, the update will fail. |
If-Unmodified-Since | header | string | false | The value of the modifiedTimeStamp of the resource. If the resource has been updated since this time, the update will fail. |
body | body | updateReportState | true | Report state to update. A full report state can be included, but only the label and primary are used to update the report state. |
Example responses
200 Response
{
"id": "126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"userId": "user1",
"label": "Primary",
"primary": true,
"reportModifiedTimeStamp": "2021-05-10T22:31:33.400Z",
"createdBy": "user1",
"creationTimeStamp": "2021-05-13T15:01:28.708Z",
"modifiedBy": "user5",
"modifiedTimeStamp": "2021-05-13T15:01:29.055Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"type": "application/vnd.sas.report.state.info",
"responseType": "application/vnd.sas.report.state.info"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"uri": "/reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/126b2b92-cfe1-4b2f-a1ca-dedc13a7a796/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"version": 1
}
Bad Request. The input report state was not valid.
{
"errorCode\"": 0,
"message": "An error occurred.",
"details": [
"traceId: 03b5f0c710eca2d6",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 400
}
Report or report state does not exist or the report state belongs to another user.
{
"errorCode\"": 0,
"message": "An error occurred. The user does not have permission to access the resouirce.",
"details": [
"traceId: 03b5f0c710eca2d6",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 403
}
An error for report state is found but with mismatched ETag.
{
"errorCode": 0,
"message": "An error occurred. The action could not be performed. The provided resource is not the most current.",
"details": [
"traceId: ded22333af820cae",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 412
}
An error for report state content is found but with mismatched ETag.
{
"errorCode": 0,
"message": "An error occurred. The action could not be performed: at least one header of the type 'If-Match' or 'If-Unmodified-Since' is required.",
"details": [
"traceId: fbcfd5f6cb5b4dc6",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 428
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Report state was updated. | reportState |
400 | Bad Request | Bad Request. The input report state was not valid. | error2 |
403 | Forbidden | Report or report state does not exist or the report state belongs to another user. | error2 |
412 | Precondition Failed | The ETag (If-Match) provided did not match the current version of the object, or the last modified date did not match. | error2 |
428 | Precondition Required | The ETag (If-Match), or the last modified date was not provided when updating the report state. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
ReportStateContent
The operations for the report state content resource.
Check report state content status
Code samples
# You can also use wget
curl -X HEAD https://example.com/reports/reports/{reportId}/states/{stateId}/content \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept-Language: string' \
-H 'If-None-Match: string' \
-H 'If-Modified-Since: string'
const headers = {
'Accept-Language':'string',
'If-None-Match':'string',
'If-Modified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}/states/{stateId}/content',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept-Language': 'string',
'If-None-Match': 'string',
'If-Modified-Since': 'string'
}
r = requests.head('https://example.com/reports/reports/{reportId}/states/{stateId}/content', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept-Language": []string{"string"},
"If-None-Match": []string{"string"},
"If-Modified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/reports/reports/{reportId}/states/{stateId}/content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /reports/{reportId}/states/{stateId}/content
Returns the headers for a report state content, including ETag
. See Conditional operations
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
stateId | path | string(object-id) | true | Report state id to check. |
Accept-Language | header | string | false | Optional header. If present, the locale it represents is used in processing, sorting, and filtering. |
If-None-Match | header | string | false | The ETag that was returned from a GET , POST , PUT , or HEAD of this resource. If the ETag matches, the operation will not proceed. |
If-Modified-Since | header | string | false | The value of the modifiedTimeStamp the resource. If the resource has not been updated since this time, the operation will not proceed. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Check status operation was successful. | None |
304 | Not Modified | The caller has the most current object. | None |
404 | Not Found | Report, report state or their content does not exist. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
|
200 | Content-Language | string | This header represents the locale of the result. It may not be present if there is issue during localization, in which case the result is what is persisted. |
Get report state content
Code samples
# You can also use wget
curl -X GET https://example.com/reports/reports/{reportId}/states/{stateId}/content \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.report.content+json' \
-H 'Accept-Language: string' \
-H 'If-None-Match: string' \
-H 'If-Modified-Since: string'
const headers = {
'Accept':'application/vnd.sas.report.content+json',
'Accept-Language':'string',
'If-None-Match':'string',
'If-Modified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}/states/{stateId}/content',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.report.content+json',
'Accept-Language': 'string',
'If-None-Match': 'string',
'If-Modified-Since': 'string'
}
r = requests.get('https://example.com/reports/reports/{reportId}/states/{stateId}/content', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.report.content+json"},
"Accept-Language": []string{"string"},
"If-None-Match": []string{"string"},
"If-Modified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reports/reports/{reportId}/states/{stateId}/content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reports/{reportId}/states/{stateId}/content
Returns the report state content, including ETag
. See Conditional operations
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
stateId | path | string(object-id) | true | Report state id to check. |
Accept-Language | header | string | false | Optional header. If present, the locale it represents is used in processing, sorting, and filtering. |
If-None-Match | header | string | false | The ETag that was returned from a GET , POST , PUT , or HEAD of this resource. If the ETag matches, the operation will not proceed. |
If-Modified-Since | header | string | false | The value of the modifiedTimeStamp the resource. If the resource has not been updated since this time, the operation will not proceed. |
Example responses
200 Response
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report State",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<SASReport>
<label>Small Report State</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<Results/>
<DataDefinitions/>
<VisualElements/>
<PromptDefinitions/>
<View>
<Sections>
<Section>
<name>vi1</name>
<label>Section1</label>
<Body>
<MediaContainer>
<target>mt111</target>
<RelativeLayout/>
</MediaContainer>
</Body>
</Section>
</Sections>
</View>
<Interactions/>
<MediaDefinitionResource>
<file>/files/files/0499563b-9425-42ab-b6e2-d99804e54299</file>
</MediaDefinitionResource>
<MediaSchemes>
<MediaScheme>
<name>ms201</name>
</MediaScheme>
</MediaSchemes>
<MediaTargets>
<MediaTarget>
<name>mt111</name>
<scheme>ms201</scheme>
<definition>table-1280x768</definition>
</MediaTarget>
</MediaTargets>
</SASReport>
Report, report state, or their content does not exist.
{
"errorCode": 0,
"message": "An error occurred. The resource could not be found. Identifier: 8559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content"
],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Report state content. | reportStateContentXml |
304 | Not Modified | The caller has the most current resource. | None |
404 | Not Found | Report, report state, or their content does not exist. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
|
200 | Content-Language | string | This header represents the locale of the result. It may not be present if there is issue during localization, in which case the result is what is persisted. |
Save report state content
Code samples
# You can also use wget
curl -X PUT https://example.com/reports/reports/{reportId}/states/{stateId}/content \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.content+json' \
-H 'Accept: application/vnd.sas.error+json' \
-H 'If-Match: string' \
-H 'If-Unmodified-Since: string'
const inputBody = '{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report State",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}';
const headers = {
'Content-Type':'application/vnd.sas.report.content+json',
'Accept':'application/vnd.sas.error+json',
'If-Match':'string',
'If-Unmodified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}/states/{stateId}/content',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.content+json',
'Accept': 'application/vnd.sas.error+json',
'If-Match': 'string',
'If-Unmodified-Since': 'string'
}
r = requests.put('https://example.com/reports/reports/{reportId}/states/{stateId}/content', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.content+json"},
"Accept": []string{"application/vnd.sas.error+json"},
"If-Match": []string{"string"},
"If-Unmodified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/reports/reports/{reportId}/states/{stateId}/content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /reports/{reportId}/states/{stateId}/content
Saves the report state content. Does not return the stored state content. An ETag
is not required for the initial save, but is required for all subsequent saves. In some situations where Accept
type header is automatically generated, setting it to '*/*' will achieve the same effect as not including it. See Conditional operations
.
Body parameter
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report State",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<reportStateContentJson element="SASReport">
<xmlns>http://www.sas.com/sasreportmodel/bird-4.3.0</xmlns>
<label>Small Report State</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<view element="View">
<sections element="Section">
<name>vi1</name>
<label>Section1</label>
<body element="Body">
<mediaContainerList element="MediaContainer">
<target>mt111</target>
<layout element="ResponsiveLayout"/>
</mediaContainerList>
</body>
<mediaSchemes element="MediaScheme">
<name>ms201</name>
</mediaSchemes>
<mediaTargets element="MediaTarget">
<name>mt111</name>
<scheme">ms201</scheme">
</mediaTargets>
</sections>
</view>
</reportStateContentJson>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
stateId | path | string(object-id) | true | Report state id to check. |
If-Match | header | string | false | The ETag that was returned from a GET , POST , PUT , or HEAD of this resource. If the ETag does not match, the update will fail. |
If-Unmodified-Since | header | string | false | The value of the modifiedTimeStamp of the resource. If the resource has been updated since this time, the update will fail. |
body | body | reportStateContentJson | true | The report state content to be saved. |
Example responses
Bad Request. The input report state content was not valid.
{
"errorCode\"": 0,
"message": "An error occurred.",
"details": [
"traceId: 03b5f0c710eca2d6",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content"
],
"version": 2,
"httpStatusCode": 400
}
Report state or report state content does not exist.
{
"errorCode": 0,
"message": "An error occurred. The resource could not be found. Identifier: 8559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content"
],
"version": 2,
"httpStatusCode": 404
}
An error for report state is found but with mismatched ETag.
{
"errorCode": 0,
"message": "An error occurred. The action could not be performed. The provided resource is not the most current.",
"details": [
"traceId: ded22333af820cae",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 412
}
An error for report state content is found but with mismatched ETag.
{
"errorCode": 0,
"message": "An error occurred. The action could not be performed: at least one header of the type 'If-Match' or 'If-Unmodified-Since' is required.",
"details": [
"traceId: fbcfd5f6cb5b4dc6",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 428
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Report state content was stored. | None |
400 | Bad Request | Bad Request. The input report state content was not valid. | error2 |
404 | Not Found | Report state or report state content does not exist. | error2 |
412 | Precondition Failed | The ETag (If-Match) provided did not match the current version of the object, or the last modified date did not match. | error2 |
428 | Precondition Required | The ETag (If-Match), or the last modified date was not provided when updating the report state content. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
204 | ETag | string | A tag that identifies this revision of the resource. | |
204 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Store and return report state content
Code samples
# You can also use wget
curl -X PUT https://example.com/reports/reports/{reportId}/states/{stateId}/content#updateReportStateContentWithReturn \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.content+json' \
-H 'Accept: application/vnd.sas.report.content+json' \
-H 'If-Match: string' \
-H 'If-Unmodified-Since: string'
const inputBody = '{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report State",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}';
const headers = {
'Content-Type':'application/vnd.sas.report.content+json',
'Accept':'application/vnd.sas.report.content+json',
'If-Match':'string',
'If-Unmodified-Since':'string'
};
fetch('https://example.com/reports/reports/{reportId}/states/{stateId}/content#updateReportStateContentWithReturn',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.content+json',
'Accept': 'application/vnd.sas.report.content+json',
'If-Match': 'string',
'If-Unmodified-Since': 'string'
}
r = requests.put('https://example.com/reports/reports/{reportId}/states/{stateId}/content#updateReportStateContentWithReturn', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.content+json"},
"Accept": []string{"application/vnd.sas.report.content+json"},
"If-Match": []string{"string"},
"If-Unmodified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/reports/reports/{reportId}/states/{stateId}/content#updateReportStateContentWithReturn", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /reports/{reportId}/states/{stateId}/content
Saves and returns the report state content. An ETag
is not required for the initial save, but required for all subsequent saves. See Conditional operations
. A different response code is returned depending on whether the request is for the initial save or a subsequent save.
Body parameter
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report State",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<reportStateContentJson element="SASReport">
<xmlns>http://www.sas.com/sasreportmodel/bird-4.3.0</xmlns>
<label>Small Report State</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<view element="View">
<sections element="Section">
<name>vi1</name>
<label>Section1</label>
<body element="Body">
<mediaContainerList element="MediaContainer">
<target>mt111</target>
<layout element="ResponsiveLayout"/>
</mediaContainerList>
</body>
<mediaSchemes element="MediaScheme">
<name>ms201</name>
</mediaSchemes>
<mediaTargets element="MediaTarget">
<name>mt111</name>
<scheme">ms201</scheme">
</mediaTargets>
</sections>
</view>
</reportStateContentJson>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportId | path | string(object-id) | true | Report id for this operation. |
stateId | path | string(object-id) | true | Report state id to check. |
If-Match | header | string | false | The ETag that was returned from a GET , POST , PUT , or HEAD of this resource. If the ETag does not match, the update will fail. |
If-Unmodified-Since | header | string | false | The value of the modifiedTimeStamp of the resource. If the resource has been updated since this time, the update will fail. |
body | body | reportStateContentJson | true | The report state content to be saved. |
Example responses
200 Response
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report State",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<SASReport>
<label>Small Report State</label>
<dateCreated>2020-10-24T01:33:24.000Z</dateCreated>
<dateModified>2020-11-04T03:20:00.000Z</dateModified>
<Results/>
<DataDefinitions/>
<VisualElements/>
<PromptDefinitions/>
<View>
<Sections>
<Section>
<name>vi1</name>
<label>Section1</label>
<Body>
<MediaContainer>
<target>mt111</target>
<RelativeLayout/>
</MediaContainer>
</Body>
</Section>
</Sections>
</View>
<Interactions/>
<MediaDefinitionResource>
<file>/files/files/0499563b-9425-42ab-b6e2-d99804e54299</file>
</MediaDefinitionResource>
<MediaSchemes>
<MediaScheme>
<name>ms201</name>
</MediaScheme>
</MediaSchemes>
<MediaTargets>
<MediaTarget>
<name>mt111</name>
<scheme>ms201</scheme>
<definition>table-1280x768</definition>
</MediaTarget>
</MediaTargets>
</SASReport>
Bad Request. The input report state content was not valid.
{
"errorCode\"": 0,
"message": "An error occurred.",
"details": [
"traceId: 03b5f0c710eca2d6",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content"
],
"version": 2,
"httpStatusCode": 400
}
Report state or report state content does not exist.
{
"errorCode": 0,
"message": "An error occurred. The resource could not be found. Identifier: 8559a118-139b-46e4-adea-97198d9068f5.",
"details": [
"traceId: 1e2ce9a76a5e0a14",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74/content"
],
"version": 2,
"httpStatusCode": 404
}
An error for report state is found but with mismatched ETag.
{
"errorCode": 0,
"message": "An error occurred. The action could not be performed. The provided resource is not the most current.",
"details": [
"traceId: ded22333af820cae",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 412
}
An error for report state content is found but with mismatched ETag.
{
"errorCode": 0,
"message": "An error occurred. The action could not be performed: at least one header of the type 'If-Match' or 'If-Unmodified-Since' is required.",
"details": [
"traceId: fbcfd5f6cb5b4dc6",
"path: /reports/reports/8559a118-139b-46e4-adea-97198d9068f5/states/412f6f71-64eb-4840-a6a5-9a8e18fcad74"
],
"version": 2,
"httpStatusCode": 428
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The report state content was updated. | reportStateContentXml |
201 | Created | Report state content was created. | reportStateContentXml |
400 | Bad Request | Bad Request. The input report state content was not valid. | error2 |
404 | Not Found | Report state or report state content does not exist. | error2 |
412 | Precondition Failed | The ETag (If-Match) provided did not match the current version of the object, or the last modified date did not match. | error2 |
428 | Precondition Required | The ETag (If-Match), or the last modified date was not provided when updating the report state content. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies this revision of the resource. | |
200 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
|
201 | ETag | string | A tag that identifies this revision of the resource. | |
201 | Last-Modified | string | The last modifiedTimeStamp of the resource. |
Schemas
reportApi
{
"version": "1",
"links": [
{
"method": "GET",
"rel": "reports",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.summary+json"
},
{
"method": "POST",
"rel": "createReport",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "POST",
"rel": "validateName",
"href": "/reports/validations/name",
"uri": "/reports/validations/name"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/content/validation",
"uri": "/reports/content/validation",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content.validation"
}
]
}
API
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
API | api | false | none | The list of links to top-level resources and operations available from the root of the API. |
newReport
{
"name": "TEST New Report",
"description": "TEST New Description"
}
New Report
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The localizable report name. |
description | string | false | none | The localizable report description. |
updateReport
{
"id": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Update Report",
"description": "TEST New Description"
}
Update Report
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(object-id) | false | none | Report id. |
name | string | false | none | The localizable report name. |
description | string | false | none | The localizable report description. |
reportCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"description": "Description of a sample report.",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "user1",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "user1",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"imageUris": {
"icon": "/reports/icons/report.gif"
},
"version": 1
}
]
}
Report Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Report Collection | any | false | none | A collection of reports. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | baseCollection2 | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [report] | false | none | The array of report representations. |
report
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"description": "Description of a sample report.",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "user1",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "user1",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
}
],
"imageUris": {
"icon": "/reports/icons/report.gif"
},
"version": 1
}
Report
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(object-id) | false | none | unique identifier of the report |
name | string | true | none | name of the report |
description | string | false | none | description of the report. |
creationTimeStamp | string(date-time) | false | none | date and time when the report was created |
createdBy | string | false | none | the user who created the report |
modifiedTimeStamp | string(date-time) | false | none | date and time when the report was modified |
modifiedBy | string | false | none | the user who modified the report |
links | [link] | false | none | a set of links to related resources or operations |
imageUris | object | false | none | none |
» additionalProperties | string | false | none | none |
» icon | string | true | none | none |
version | integer | false | none | media type's schema version number |
reportSummary
{
"id": "f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"name": "Sample Report",
"createdBy": "user1",
"creationTimeStamp": "2020-12-09T13:22:11.394Z",
"modifiedBy": "user1",
"modifiedTimeStamp": "2020-12-09T13:27:20.437Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"type": "application/vnd.sas.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf",
"uri": "/reports/reports/f8b66d4b-d67a-4e4e-a66d-b6f06b1820bf"
}
],
"type": "report",
"iconUri": "/reports/icons/report.gif",
"version": "1"
}
Resource Summary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Resource Summary | summary | false | none | The summarized representation of a resource. Often used in collection responses when more specific details aren't needed. |
reportContentJson
{
"@element": "SASReport",
"xmlns": "http://www.sas.com/sasreportmodel/bird-4.3.0",
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"view": {
"@element": "View",
"sections": [
{
"@element": "Section",
"name": "vi1",
"label": "Section1",
"body": {
"@element": "Body",
"mediaContainerList": [
{
"@element": "MediaContainer",
"target": "mt111",
"layout": {
"@element": "ResponsiveLayout"
}
}
]
},
"mediaSchemes": [
{
"@element": "MediaScheme",
"name": "ms201"
}
],
"mediaTargets": [
{
"@element": "MediaTarget",
"name": "mt111",
"scheme\"": "ms201"
}
]
}
]
}
}
Report Content JSON
Properties
None
reportContentXml
{
"label": "Small Report",
"dateCreated": "2020-10-24T01:33:24.000Z",
"dateModified": "2020-11-04T03:20:00.000Z",
"Results": {},
"DataDefinitions": {},
"VisualElements": {},
"PromptDefinitions": {},
"View": {
"Sections": {
"Section": {
"name": "vi1",
"label": "Section1",
"Body": {
"MediaContainer": {
"target": "mt111",
"RelativeLayout": {}
}
}
}
}
},
"Interactions": {},
"MediaDefinitionResource": {
"file": "/files/files/0499563b-9425-42ab-b6e2-d99804e54299"
},
"MediaSchemes": {
"MediaScheme": {
"name": "ms201"
}
},
"MediaTargets": {
"MediaTarget": {
"name": "mt111",
"scheme": "ms201",
"definition": "table-1280x768"
}
}
}
Report Content XML
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
label | string | false | none | none |
dateCreated | string | false | none | none |
dateModified | string | false | none | none |
Results | object | false | none | none |
DataDefinitions | object | false | none | none |
VisualElements | object | false | none | none |
PromptDefinitions | object | false | none | none |
View | object | false | none | none |
» Sections | object | false | none | none |
»» Section | object | false | none | none |
»»» name | any | false | none | none |
»»» label | any | false | none | none |
»»» Body | object | false | none | none |
»»»» MediaContainer | object | false | none | none |
»»»»» target | any | false | none | none |
»»»»» RelativeLayout | object | false | none | none |
Interactions | object | false | none | none |
MediaDefinitionResource | object | false | none | none |
» file | any | false | none | none |
MediaSchemes | object | false | none | none |
» MediaScheme | object | false | none | none |
»» name | any | false | none | none |
MediaTargets | object | false | none | none |
» MediaTarget | object | false | none | none |
»» name | any | false | none | none |
»» scheme | any | false | none | none |
»» definition | any | false | none | none |
reportContentValidation
{
"level": "schemaInvalid",
"schema": "bird-4.1.2.xsd",
"messages": [
{
"type": "schemaError",
"message": "Line 89: Value 'binder' is not facet-valid with respect to enumeration '[column, page]'. It must be a value from the enumeration."
},
{
"type": "schemaError",
"message": "Line 89: The value 'binder' of attribute 'type' on element 'Axis' is not valid with respect to its type, 'relationalAxisTypeEnum'."
}
],
"version": 1
}
Report Content Validation
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
level | string | true | none | The level of the report content validation. Valid values are schemaInvalid and schemaValid . |
schema | string | true | none | The schema used for the report content validation. |
messages | [any] | false | none | The messages generated for the report content validation. |
» type | string | false | none | The type of validation error. Valid values are schemaFatal and schemaError . |
» message | string | false | none | The message of validation error. |
version | integer | false | none | The version number of the report content validation representation. This representation is version 1. |
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. |
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. |
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 |
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. |
indexableData
{
"version": 0,
"properties": [
{
"name": "string",
"value": "string"
}
],
"resourceUri": "string",
"sasType": "string"
}
Indexable representation
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer | false | none | The version number of Search Indexable data representation. This is version 1. |
properties | [nameValuePair] | true | none | Set of attributes which needs to be indexed |
resourceUri | string | true | none | The object id of the content object.This is a mandatory field which typeowner needs to provide as this would be used to populate Primary key while indexing data. |
sasType | string | true | none | The sasType of the representation. |
transferObject
{
"id": "string",
"version": 0,
"summary": {
"id": "string",
"name": "string",
"type": "string",
"description": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"content": {},
"fileServiceContent": "string",
"connectors": [
{
"id": "string",
"name": "string",
"version": 0,
"uri": "string",
"contentType": "string",
"type": "string",
"hints": [
"string"
]
}
],
"substitutions": {},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
Transfer Object
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(object-id) | false | none | unique identifier of the object |
version | integer | false | none | This media type's schema version number. This representation is version 1. |
summary | summary | false | none | The summarized representation of a resource. Often used in collection responses when more specific details aren't needed. |
content | object | false | none | optional. Choose this or fileServiceContent. This is the content object that must be serialized in a format that is valid for internet transmission. This includes valid encoding formats like Base64 or data structures like JSON. This is provided by the content provider and the transfer service expects no visibility into or understanding of this value. |
fileServiceContent | string | false | none | optional. Choose this or content. This holds the URI of a file service object that contains the transferrable object. |
connectors | [transferObjectConnector] | false | none | a list of associations or references to other external objects to be recreated on import |
substitutions | object | false | none | map with keys of parameter and value. Used to replace the value of parameter with the value of value |
links | [link] | false | none | Paging links that apply to this object |
reportContentElement
{
"name": "ve38",
"label": "Bar Chart 1",
"type": "Graph",
"version": 1
}
Report content element
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The name for the report content element. |
label | string | false | none | The label for the report content element. |
type | string | false | none | The type of the report content element. |
version | integer | false | none | The version number of the report content element representation. This representation is version 1. |
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. |
baseCollection2
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Base Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the collection. |
start | integer(int64) | false | none | The zero-based index of the first item in the collection. |
limit | integer | false | none | The number of items that were requested for the collection. |
count | integer(int64) | false | none | If populated indicates the number of items in the collection. |
accept | string | false | none | A space-delimited list of media types from which an Accept header may be constructed. |
links | [link] | false | none | The links that apply to the collection. |
version | integer | false | none | The version number of the collection representation. This representation is version 2. |
relationship
{
"id": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"resourceUri": "https://example.com",
"referenceId": "string",
"type": "string",
"relatedResourceUri": "https://example.com",
"relatedReferenceId": "string",
"source": "https://example.com",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Relationship
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | System-assigned unique ID for this object. |
createdBy | string | false | none | The id of the user who created the relationship. |
creationTimeStamp | string(date-time) | false | none | The date and time that the relationship was created. |
modifiedBy | string | false | none | The id of the last user who modified the relationship. |
modifiedTimeStamp | string(date-time) | false | none | The date and time that the relationship was last modified. |
resourceUri | string(uri) | true | none | The URI of the subject resource of this relationship. |
referenceId | string | false | none | The id of the reference for the subject resource. |
type | string | true | none | The id of this relationship type. |
relatedResourceUri | string(uri) | true | none | The URI of the related resource of this relationship. |
relatedReferenceId | string | false | none | The id of the reference for the related resource. |
source | string(uri) | false | none | The source of this relationship. Typically the URI of the resource that manages this relationship. |
links | [link] | false | none | Zero or more links to related resources or operations. |
version | integer | false | none | This media type's schema version number. This representation is version 1. |
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. |
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. |
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 |
transferObjectConnector
{
"id": "string",
"name": "string",
"version": 0,
"uri": "string",
"contentType": "string",
"type": "string",
"hints": [
"string"
]
}
Transfer Object Connector
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(object-id) | false | none | unique identifier of the object |
name | string | false | none | name of the related object |
version | integer | false | none | transfer object connector version |
uri | string | false | none | the URI of the related object |
contentType | string | false | none | media type of the related object |
type | string | false | none | type of connection. This can be any value the creator of the connection wants but should be used to determine what to do to reconstitute the relationship. |
hints | [string] | false | none | hints that can be used to help find the object to connect to in the target system |
Media Type Samples
application/vnd.sas.report
This media type describes a report. The schema is at report.
application/vnd.sas.report+json
{
"id": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Report",
"description": "TEST Description",
"createdBy": "bob",
"creationTimeStamp": "2016-04-19T14:54:04.705Z",
"modifiedBy": "bob",
"modifiedTimeStamp": "2016-04-19T14:55:11.643Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7"
},
{
"method": "GET",
"rel": "currentUserState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "POST",
"rel": "createState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "GET",
"rel": "states",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
},
{
"method": "GET",
"rel": "contentElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "GET",
"rel": "contentVisualElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"responseType": "application/vnd.sas.report.content.validation"
}
],
"imageUris": {
"icon": "/reports/icons/report.gif"
},
"version": 1
}
application/vnd.sas.report.content
This media type describes a report or a report state content.
This resource is treated like an indeterminate/opaque object and therefore it has no members.
Format
There are two formats supported for application/vnd.sas.report.content
: XML and JSON.
Both formats are treated as indeterminate/opaque objects.
application/vnd.sas.report.content.element
Report content is a collection of elements.
The application/vnd.sas.report.content.element
media type represent an element that has a name attribute.
These elements can be identified or classified based on a set of characteristics.
However, at this time, other than 'visualElement', the set of characteristics have not been defined.
The schema is at report content element.
application/vnd.sas.report.content.element+json
{
"name": "ve38",
"label": "Bar Chart 1",
"type": "Graph",
"version": 1
}
application/vnd.sas.report.state.info
This media type describes a report state. The schema is at report state.
application/vnd.sas.report.state.info+json
{
"id": "412f6f71-64eb-4840-a6a5-9a8e18fcad74",
"user": "bob",
"label": "Test Report State",
"primary": true,
"reportModifiedTimeStamp": "2018-03-02T19:33:41.124Z",
"createdBy": "bob",
"creationTimeStamp": "2018-03-02T19:41:55.314Z",
"modifiedBy": "bob",
"modifiedTimeStamp": "2018-03-02T19:41:55.314Z",
"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.state"
}
],
"version": 1
}
Format
There are two formats supported for application/vnd.sas.report.state
: XML and JSON. Both formats are treated as indeterminate/opaque object.
application/vnd.sas.report.content.validation
This media type represents a validation result on report content. The schema is at report content validation.
application/vnd.sas.report.content.validation
{
"level": "schemaInvalid",
"schema": "bird-4.0.1.20160316_promptDefinition.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
}
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 |
---|---|---|
reports |
GET |
Returns the first page of reports accessible by the user. |
URI: /reports | ||
Response type: application/vnd.sas.collection |
||
Response item type: application/vnd.sas.summary or application/vnd.sas.report |
||
createReport |
POST |
Creates a report. |
URI: /reports | ||
Request type: application/vnd.sas.report |
||
Response type: application/vnd.sas.report |
||
validateName |
POST |
Checks whether a name is valid as a report name and test for collisions with an existing folder. |
URI: /validations/name | ||
convertContentToJSON |
POST |
Converts report content from XML to JSON format. |
URI: /content | ||
Request type: application/vnd.sas.report.content |
||
Response type: application/vnd.sas.report.content |
||
convertContentToXML |
POST |
Converts report content from JSON to XML format. |
URI: /content | ||
Request type: application/vnd.sas.report.content |
||
Response type: application/vnd.sas.report.content |
||
validateContent |
POST |
Checks whether the report content is valid. |
URI: /content/validation | ||
Request type: application/vnd.sas.report.content |
||
Response type: application/vnd.sas.report.content.validation |
Collection Resources
Path: /reports
This API provides collections of reports.
Members of the /reports
collection are reports, /reports/{id}
.
Links
The reports
collection representation is application/vnd.sas.collection
.
The collection items are either application/vnd.sas.report
or application/vnd.sas.summary
resources.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
createReport |
POST |
Creates a new report. |
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
Sorting and Filtering
Collections may be sorted and filtered using the ?sortBy=
and ?filter=
query parameters.
The default sort order for the /reports
collection is by name
.
Filtering and sorting may use the following members of the Report:
name
creationTimeStamp
createdBy
modifiedBy
modifiedTimeStamp
type
description
Report Images
Base URLs:
- https://example.com/reportImages
Terms of service Email: SAS Developers Web: SAS Developers
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
The reportImages API delivers SVG images representing elements of a report. The images are suitable to the current user, taking row-level-permissions and other factors into consideration.
Usage Notes
Overview
The Report Images service delivers SVG images that represent either an entire report or elements of a report. Clients that present a view of the folder structure or thumbnails of a report are candidates for using this service.
For example, you want to produce an image that is representative of an entire report. You create a job that returns 'state==running'. Then you poll (following the "self" link) until the job is completed. When completed, the job returns a URI, which is then passed to the browser for rendering.
By default a single image that represents the report is produced at the
requested size. This is equivalent to the option selectionType=report
.
To create one image per section, specify selectionType=perSection
.
Concepts
Asynchronous operation
This service creates an asynchronous job. The output of the job includes the details of each produced image, including a URI that can be used in an HTML IMG tag.
Because the job is asynchronous, a response is returned in a timely fashion. Although job completion is often sub-second, some queries can take longer than you might want to hold a browser request for. This is why the service supports long polling for both the job creation and the subsequent get. While awaiting completion, the request can wait in the service, returning immediately upon completion or timeout.
Caching and Security
Cached images are shared between users with identical data security
rules for the table(s) supporting an image. However, the URL returned to
the user to get the image (link relation image
) is valid only for the
current user. Users should not share URLs.
Direct image mode
For clients that cannot address the job pattern. For example, a link in an email message, it is possible to specify a URL which "directly" returns an image. However, because each call can hold a "browser thread", consumers are urged to use this feature sparingly.
ETag
An entity tag or ETag is an identifier assigned to a specific version of a resource. This service fully supports entity tags. Caching headers encourage the browser to cache the image. Clients that use modern browsers can depend on the browser to handle local caching and ETag handling.
Failure
A single job can generate several images. Some of those images can fail, while other images in the job are successfully generated. A job is only marked "failed" if every image failed. Check each image's state
.
Image size
Because the rendering process takes the actual size into account when
determining how much detail to include, the caller must supply the size
of the requested image, rather than an aspect ratio. The size parameter
has the format of "width x height" (with no spaces), for example:
268x151. This size represents CSS Style pixels
.
Clients can request a single image to represent the report, or one image per section of the report.
Job Deletion
By default, an hour after job creation, a job is available for automatic deletion.
Layout type
thumbnail
(the default) reduces detail to render more suitably at a smaller size.normal
does not reduce detail.entireSection
renders the entire section.
Long Polling
A technique for polling a service for information without the network overhead of continuous polling. In long polling the client requests new information from the service. The service holds the request open until the data is available or the timeout is reached. If the data becomes available, the service sends the data. This technique essentially emulates a server push.
The default timeout is 500 milliseconds; the maximum timeout is 30 seconds.
Paging through images
For reports with multiple sections, the caller can request images for a
subset of the report. The caller indicates the start
index (0 based)
and a limit
on how many images to generate and return. The result
includes a count
that is the total number of images available.
Partial results
The job will quickly return partial results in the "images" array.
The array includes the state
of each image so that the
client can determine if processing for that image is complete.
When the image is available, the results include a link to the image,
and state
is changed to "completed".
Refresh
Specify refresh=true
to bypass all caches and forcibly generate new
results. Because this service achieves much of its performance by
caching and sharing results from users with identical profiles,
refreshing should be considered an exception (not a default for a
client).
Row-level Permissions
The delivery of images respects row-level permissions, so images are always suitable for the current user. And because users with identical restrictions can see the same query results, this service can cache images for sharing while ensuring that the result is appropriate to each user. Clients should not share images; images generated by this service are intended only for the current user.
State
The state of the job, and each image within the job can be one of the following:
pending
running
completed
failed
Images have one additional state that indicates when an
image was not generated because of renderLimit
:
ignored
In such cases, the image details will include a link render
that can
be used to create a job for the image.
States pending
and running
are the non-terminal states for the job;
completed
and failed
are the terminal states.
Terminology
administrator
A user who is a qualifying application administrator
(member of ApplicationAdministrators
).
report
A SAS Visual Analytics Report.
section
A report is divided into one or more sections. The user facing term for section is page
.
SVG
Scalable Vector Graphics (SVG) is an XML-based vector image format for two-dimensional graphics with support for interactivity and animation (see Wikipedia). This service produces only SVG images. Note that SVG
is always in XML
; there is no JSON
equivalent.
stale image
An image that has not been recently updated, but reflects the security considerations for a user.
Error Codes
HTTP Status Code | Error Code | Description |
---|---|---|
400 | 1017 | The value of a required field is invalid (null or too long). |
400 | 22000 | A required parameter was not specified. |
400 | 22001 | Invalid layout type. (Supported are: thumbnail , normal , entireSection .) |
400 | 22002 | Size must be specified. |
400 | 22003 | Invalid section index. |
400 | 22004 | Report table definition error. |
400 | 22005 | Requested element is not a suitable type to render. |
400 | 22006 | Report has no suitable report elements. |
400 | 22007 | Report conversion failure (JSON to XML). |
400 | 22008 | Invalid selection type. (Supported types: report , perSection , visualElements ) |
400 | 22009 | Invalid input. Possible HTML script attack. |
404 | 22010 | Report not found. |
404 | 22011 | Report element not found. |
404 | 22012 | Job not found. |
404 | 22013 | Image ID not found. |
404 | 22014 | Image not found. |
500 | 22020 | Error with service CAS Management. |
500 | 22021 | Error with service CAS Access Management. |
500 | 22022 | Error with service Report Packages. |
500 | 22023 | Error with service Report Renderer. |
500 | 22024 | Unexpected failure generating the image. |
500 | 22025 | Failure generating the report package. |
500 | 22026 | Failure reading report. |
500 | 22027 | Report parse failure. |
500 | 22028 | Table not readable. |
500 | 22029 | Renderer did not return the image. |
500 | 22030 | Renderer did not return the images. |
500 | 22031 | Renderer reported an error. |
500 | 22032 | Image generation interrupted. |
500 | 22033 | Direct Image generation failed. |
500 | 22034 | External service timeout. |
- The following errors apply if the job is created using the thumbnails provider media type (
application/vnd.sas.thumbnails.job.request
).
HTTP Status Code | Error Code | Description |
---|---|---|
400 | 76701 | Resource specified by objectUri member cannot be opened. |
400 | 76703 | The type of the object referenced by the objectUri member is not supported by this service. |
400 | 76704 | Request validation error. |
76705 | Other error encountered by the thumbnail provider. | |
400 | 76706 | Required parameter is missing. |
406 | 76702 | The thumbnail media type this service supplies is not acceptable according to provided acceptItem member. |
Operations
Jobs
Asynchronous jobs for obtaining images.
Get report images via request parameters
Code samples
# You can also use wget
curl -X POST https://example.com/reportImages/jobs#requestParams?reportUri=string&size=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.report.images.job+json' \
-H 'Accept-Language: string' \
-H 'Accept-Locale: string'
const headers = {
'Accept':'application/vnd.sas.report.images.job+json',
'Accept-Language':'string',
'Accept-Locale':'string'
};
fetch('https://example.com/reportImages/jobs#requestParams?reportUri=string&size=string',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.report.images.job+json',
'Accept-Language': 'string',
'Accept-Locale': 'string'
}
r = requests.post('https://example.com/reportImages/jobs#requestParams', params={
'reportUri': 'string', 'size': 'string'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.report.images.job+json"},
"Accept-Language": []string{"string"},
"Accept-Locale": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reportImages/jobs#requestParams", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /jobs
Creates an asynchronous job for obtaining SVG images for the report. To specify report elements to render, use POST /jobs.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportUri | query | string | true | The report from which to generate images. |
layoutType | query | string | false | The type of image to render.
|
selectionType | query | string | false | The selected operation.
|
size | query | string | true | The size of the rendered image. Format is widthxheight , with no spaces. For example, "268x151". |
wait | query | number(float) | false | The number of seconds to wait for an update before returning from the "long poll". The maximum is 30 seconds. |
refresh | query | boolean | false | If true, bypass caches and generate a new image. |
sectionIndex | query | integer(int32) | false | The section to render. This parameter applies when layoutType==entireSection . |
renderLimit | query | integer(int32) | false | Limit how many images to render. For no limit, set to -1. Clients can specify "1" to quickly get the first image and how many remaining images are available. |
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 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.images.job.request+json' \
-H 'Accept: application/vnd.sas.report.images.job+json' \
-H 'Accept-Language: string' \
-H 'Accept-Locale: string'
const inputBody = '{
"version": 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 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.report.content+json' \
-H 'Accept: application/vnd.sas.report.images.job+json' \
-H 'Accept-Language: string' \
-H 'Accept-Locale: string'
const inputBody = 'string';
const headers = {
'Content-Type':'application/vnd.sas.report.content+json',
'Accept':'application/vnd.sas.report.images.job+json',
'Accept-Language':'string',
'Accept-Locale':'string'
};
fetch('https://example.com/reportImages/jobs#reportInBody?size=string',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.report.content+json',
'Accept': 'application/vnd.sas.report.images.job+json',
'Accept-Language': 'string',
'Accept-Locale': 'string'
}
r = requests.post('https://example.com/reportImages/jobs#reportInBody', params={
'size': 'string'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.report.content+json"},
"Accept": []string{"application/vnd.sas.report.images.job+json"},
"Accept-Language": []string{"string"},
"Accept-Locale": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reportImages/jobs#reportInBody", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /jobs
This operation is identical to POST /jobs (createJobWithParams), except instead of supplying the reportUri parameter, you supply the BIRD report (in JSON or XML) in the request body.
This operation should be used by a client that has edited the BIRD report.
To access this operation, the "Content-Type" must be "application/vnd.sas.report.content+json" or "application/vnd.sas.report.content+xml".
This operation does not benefit from cache-based performance.Body parameter
"string"
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
layoutType | query | string | false | The type of image to render.
|
selectionType | query | string | false | The selected operation.
|
size | query | string | true | The size of the rendered image. Format is widthxheight , with no spaces. For example, "268x151". |
wait | query | number(float) | false | The number of seconds to wait for an update before returning from the "long poll". The maximum is 30 seconds. |
refresh | query | boolean | false | If true, bypass caches and generate a new image. |
sectionIndex | query | integer(int32) | false | The section to render. This parameter applies when layoutType==entireSection . |
renderLimit | query | integer(int32) | false | Limit how many images to render. For no limit, set to -1. Clients can specify "1" to quickly get the first image and how many remaining images are available. |
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 'Authorization: Bearer <access-token-goes-here>' \
-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 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain'
const headers = {
'Accept':'text/plain'
};
fetch('https://example.com/reportImages/jobs/{jobId}/state',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain'
}
r = requests.get('https://example.com/reportImages/jobs/{jobId}/state', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reportImages/jobs/{jobId}/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /jobs/{jobId}/state
Get the state of the specified job.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobId | path | string | true | The jobId. |
Example responses
200 Response
"string"
404 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The job state. | string |
404 | Not Found | The job could not be found. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | The content type of the response, text/plain . |
|
404 | Content-Type | string | No description |
Return the report image
Code samples
# You can also use wget
curl -X GET https://example.com/reportImages/directImage?reportUri=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: image/svg+xml'
const headers = {
'Accept':'image/svg+xml'
};
fetch('https://example.com/reportImages/directImage?reportUri=string',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'image/svg+xml'
}
r = requests.get('https://example.com/reportImages/directImage', params={
'reportUri': 'string'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"image/svg+xml"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reportImages/directImage", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /directImage
This operation hides the job architecture and directly generates and returns the image. It blocks synchronously until the image is ready or timeout occurs (default 10 seconds). If a timeout occurs, a redirect is returned to the browser, redirecting back to this operation for browser liveness purposes.
Use of this operation is discouraged. Using more than one can starve a browser's requests queue, as some browsers are limited to 6 active queries per site. Also, the redirect technique employed can fail in the browser after too many redirects, as some browsers allow only 10 redirects.
Any client capable of following the job pattern should NOT use this direct operation.
ParametersreportUri
and size
are required.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportUri | query | string | true | The report from which to generate images. |
layoutType | query | string | false | The type of image to render.
|
selectionType | query | string | false | The selected operation.
|
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 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.thumbnails.job.request+json' \
-H 'Accept: application/vnd.sas.thumbnails.job+json' \
-H 'Accept-Language: string' \
-H 'Accept-Locale: string'
const inputBody = '{
"acceptItem": "string",
"resourceUri": "string",
"resourceType": "string",
"detailLevel": "low",
"scope": "element",
"returnMultiple": false,
"refresh": false,
"sizingOptions": {
"viewWidth": 0,
"viewHeight": 0,
"devicePixelRatio": 1,
"maxTextCharacters": 0,
"maxTableColumns": 0,
"maxTableRows": 0
},
"accessibilityOptions": {
"highContrast": false
},
"themeId": "string",
"pagingOptions": {
"start": 0,
"limit": 0
},
"version": 0
}';
const headers = {
'Content-Type':'application/vnd.sas.thumbnails.job.request+json',
'Accept':'application/vnd.sas.thumbnails.job+json',
'Accept-Language':'string',
'Accept-Locale':'string'
};
fetch('https://example.com/reportImages/jobs#requestBodyThumbnail',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.thumbnails.job.request+json',
'Accept': 'application/vnd.sas.thumbnails.job+json',
'Accept-Language': 'string',
'Accept-Locale': 'string'
}
r = requests.post('https://example.com/reportImages/jobs#requestBodyThumbnail', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.thumbnails.job.request+json"},
"Accept": []string{"application/vnd.sas.thumbnails.job+json"},
"Accept-Language": []string{"string"},
"Accept-Locale": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/reportImages/jobs#requestBodyThumbnail", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /jobs
Creates an asynchronous job, but honors the media types and contract for a "thumbnail provider".
Body parameter
{
"acceptItem": "string",
"resourceUri": "string",
"resourceType": "string",
"detailLevel": "low",
"scope": "element",
"returnMultiple": false,
"refresh": false,
"sizingOptions": {
"viewWidth": 0,
"viewHeight": 0,
"devicePixelRatio": 1,
"maxTextCharacters": 0,
"maxTableColumns": 0,
"maxTableRows": 0
},
"accessibilityOptions": {
"highContrast": false
},
"themeId": "string",
"pagingOptions": {
"start": 0,
"limit": 0
},
"version": 0
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
wait | query | number(float) | false | The number of seconds to wait for an update before returning from the "long poll". The maximum is 30 seconds. |
Accept-Language | header | string | false | The user's locale. For non-thumbnail operations, this locale is a factor for both rendering and caching. For thumbnail requests, typically only the right-to-left aspect is considered. Thumbnails do not typically include localizable content, and consequently are shareable among users with different locales. For details, see Accept-Language. |
Accept-Locale | header | string | false | A "format locale" distinct from the user's language (Accept-Language). Usage and syntax is similar to Accept-Language. |
body | body | thumbnailRequest | true | The thumbnail job details. |
Example responses
201 Response
{
"id": "string",
"state": "pending",
"thumbnails": [
{
"state": "pending",
"error": {
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
],
"error": {
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"duration": 0,
"defaultThumbnailSasThemesIconKey": "string",
"pagingState": {
"start": 0,
"limit": 0,
"count": 0
},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The job was created and is in the "completed" state. The thumbnails(s) are ready. | thumbnailJob |
202 | Accepted | The requested job was created but has not completed. Some of the images can be in the "completed" state. Some images might have a "staleThumbnail" link. | thumbnailJob |
400 | Bad Request | Bad request. The request body is not well formed. | error2 |
404 | Not Found | The report could not be found. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | Location of the completed thumbnail job. | |
202 | Location | string | Location of the running job. | |
400 | Content-Type | string | No description | |
404 | Content-Type | string | No description |
Get thumbnail provider job
Code samples
# You can also use wget
curl -X GET https://example.com/reportImages/jobs/{jobId}#getThumbnailJob \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.thumbnails.job+json'
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 'Authorization: Bearer <access-token-goes-here>' \
-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 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.api+json'
const headers = {
'Accept':'application/vnd.sas.api+json'
};
fetch('https://example.com/reportImages/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.api+json'
}
r = requests.get('https://example.com/reportImages/', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.api+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/reportImages/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /
The root links for this service.
Users receive:
- "createJob" -- initiates a job using a request body.
- "createJobWithParams" -- initiates a job using request parameters.
Administrators also receive:
- "deleteForReport" and "deleteAll" -- delete cached images.
Example responses
200 Response
{
"version": 1,
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The service's links. | api |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Admin
Operations restricted to an administrative user.
Delete cached images
Code samples
# You can also use wget
curl -X DELETE https://example.com/reportImages/images \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: */*'
const headers = {
'Accept':'*/*'
};
fetch('https://example.com/reportImages/images',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': '*/*'
}
r = requests.delete('https://example.com/reportImages/images', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"*/*"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/reportImages/images", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /images
Enables administrators to remove cached images for a single report or all cached images.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
reportUri | query | string(uri) | false | If supplied, deletes the cached images associated with the report. Otherwise, all cached images are deleted. |
Example responses
403 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The operation was successful, nothing to return. | None |
403 | Forbidden | This operation is restricted to administrators (by default, members of group "ApplicationAdministrators"). | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
403 | Content-Type | string | No description |
Schemas
error2
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Error
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
message | string | false | none | The message for the error. |
id | string | false | none | The string ID for the error. |
errorCode | integer | false | none | The numeric ID for the error. |
httpStatusCode | integer | true | none | The HTTP status code for the error. |
details | [string] | false | none | Messages that provide additional details about the cause of the error. |
remediation | string | false | none | A message that describes how to resolve the error. |
errors | [error2] | false | none | Any additional errors that occurred. |
links | [link] | false | none | The links that apply to the error. |
version | integer | true | none | The version number of the error representation. This representation is version 2. |
link
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
Link
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
method | string | false | none | The HTTP method for the link. |
rel | string | true | none | The relationship of the link to the resource. |
uri | string | false | none | The relative URI for the link. |
href | string | false | none | The URL for the link. |
title | string | false | none | The title for the link. |
type | string | false | none | The media type or link type for the link. |
itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
job
{
"id": "d145d576-78d0-42d4-a5fc-569cd0533903",
"version": 2,
"state": "running",
"durationMSec": 155,
"creationTimeStamp": "2017-11-17T18:46:59.774Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903",
"uri": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903",
"type": "application/vnd.sas.report.images.job+json"
},
{
"method": "GET",
"rel": "state",
"href": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903/state",
"uri": "/reportImages/jobs/d145d576-78d0-42d4-a5fc-569cd0533903/state",
"type": "text/plain"
}
],
"images": [
{
"sectionIndex": 0,
"sectionName": "vi6",
"sectionLabel": "Page 1",
"elementName": "ve41",
"modifiedTimeStamp": "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. Note when included in a request, must be null if "returnMultiple" is false, must not be null if "returnMultiple" is true. |
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. |
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 | The representation of an error. |
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 |
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 | This object describes accessibility requests; providers are not required to honor this |
themeId | string | false | none | The client's current theme. |
pagingOptions | pagingOptions | false | none | Paging details for page-oriented requests. Note when included in a request, 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 |
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 | The representation of an error. |
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 |
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) |
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}/pdf Response 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
Terms of service Email: SAS Developers Web: SAS Developers
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
This API 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
Purpose
The Report Transforms API helps applications create simple Business Intelligence Report Definition (BIRD) reports that can be displayed using Visual Analytics viewers. The API also provides for simple alterations to BIRD reports.
Typical transformations:
- Replace a data source of a report.
- Change the theme of a report.
- Translate user-visible labels and text in a report.
Resources
The application/vnd.sas.report.transform
resource is a description of
how a BIRD report has been transformed or will be 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, a transform response can
contain the modified content of a report, or it can contain a reference to a report
resource that has been saved. The report content is the same format as
the media type application/vnd.sas.report.content
, which is XML or
JSON.
The transform also has attributes to describe what was done, or what will be done, to produce the "transformed report".
Terminology
API version
The API version, from the info
objects in an Open API document.
The latest version can 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 revision can 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 (BIRD). The report format is defined by an XML schema but is not documented here.
Report resource
A resource provided by the Reports API. 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 body. The report service 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 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 started, the transform's attributes specify what to do to the report. After the operation is completed, the transform's attributes specify what was done, including any information about the report that was recorded during the operation.
Localization worksheet
A list 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.
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.
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 to propagate error messages and codes to the client:
application/vnd.sas.error
.
The same response occurs 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 transformation.
This permits a response of type application/vnd.sas.report.transform
and getting information about the problem.
A typical case is when there are mismatches between variables in
original and replacement data sources. Each 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 transformation 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
Errors are grouped by functional area. Some of the errors are shared by endpoints that use common platform services.
HTTP Status Code | Error Code | Resource(s) | Description | Severity |
---|---|---|---|---|
200(+msgs) | 27505 | dataMappedReports | Data: Cannot change the data source as specified. | Severe: Result returned, but left unchanged. |
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. | Severe: Usually means that the replacement table does not exist. |
200(+msgs) | 27510 | dataMappedReports | Data: No replacement data source was specified. | Fatal: No attempt was made to change anything. |
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 |
200(+msgs) | 27515 | dataMappedReports | Data: Transform data change parameters are inconsistent. | Severe |
200(+msgs) | 27532 | dataMappedReports, translationworksheets | Report repository: Invalid folder URI for writing result report. | Severe: Changes to transform may have happened but report content was not saved. |
200(+msgs) | 27533 | dataMappedReports, translationworksheets | Report repository: Invalid report URI | Severe: Changes to transform may have happened, but report content persistence failed |
200(+msgs) | 27540 | ALL | Schema: Report failed schema validation | Severe. Validation completed. See the messages. |
200(+msgs) | 27541 | ALL | Schema: XML Schema processing failed or schema not found | Severe. Validation was skipped, but other processing continued. |
200(+msgs) | 27541 | translatedReports | The requested localization not present in report | Severe |
200(+msgs) | 27560 | translationWorksheets | Worksheet: empty or otherwise invalid worksheet content | Severe |
400 | 27509 | dataMappedReports | Data: Invalid combination of original and replacement data sources. | Fatal |
400 | 27514 | dataMappedReports | Data: The replacement data source specified was not found. | Fatal |
400 | 27534 | convertedReports | Report: converting between XML and JSON formats failed. | Fatal |
400 | 27535 | ALL | Report: Input BIRD report content is invalid. | Fatal |
400 | 27537 | dataMappedReports, translationworksheets, translatedReports | Report content is not present in transform. | Fatal |
400 | 27570 | rethemedReports | The specified report theme does not exist. | Fatal |
409,412,428 | 27561 | translationWorksheets | Worksheet: Update failed because report has changed or precondition omitted or precondition incorrect | Fatal |
500, 403 | 27530 | dataMappedReports, translationworksheets | Report repository: content read failed. | Fatal |
500, 403 | 27531 | dataMappedReports, translationworksheets, translatedReports | Report repository: content write failed. | Fatal |
500 | 27536 | ALL | Report: JSON content serialization or deserialization failed. | Fatal |
500 | 27550 | translatedReports | Translation failure with unknown cause. | Fatal |
Operations
Service
Getting status of the service and a description the API.
Get list of top-level links
Code samples
# You can also use wget
curl -X GET https://example.com/reportTransforms/ \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.api+json'
const headers = {
'Accept':'application/vnd.sas.api+json'
};
fetch('https://example.com/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
The list of links to top-level resources and operations available from the root of the API.
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.collection"
}
],
"version": 1
}
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/reports/reports",
"uri": "/reports/reports",
"type": "application/vnd.sas.collection"
}
],
"version": 1
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Return top-level links in type application/vnd.sas.api. | Inline |
503 | Service Unavailable | The service is unavailable. | None |
Response Schema
Status Code 200
API
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. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | Format will match the request Accept header. |
Headers for list of top-level links
Code samples
# You can also use wget
curl -X HEAD https://example.com/reportTransforms/
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/reportTransforms/',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/reportTransforms/')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/reportTransforms/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /
Returns information about whether the service is running, and about the API.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Service is running and available. | None |
503 | Service Unavailable | The service is unavailable. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | Should match request. |
Data Change
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 'Authorization: Bearer <access-token-goes-here>' \
-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": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Report",
"description": "TEST Description",
"creationTimeStamp": "2016-04-19T14:54:04.705Z",
"createdBy": "bob",
"modifiedTimeStamp": "2016-04-19T14:55:11.643Z",
"modifiedBy": "bob",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7"
},
{
"method": "GET",
"rel": "currentUserState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "POST",
"rel": "createState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "GET",
"rel": "states",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
},
{
"method": "GET",
"rel": "contentElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "GET",
"rel": "contentVisualElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"responseType": "application/vnd.sas.report.content.validation"
}
],
"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"
}
],
"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 if the replacement will be 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": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Report",
"description": "TEST Description",
"creationTimeStamp": "2016-04-19T14:54:04.705Z",
"createdBy": "bob",
"modifiedTimeStamp": "2016-04-19T14:55:11.643Z",
"modifiedBy": "bob",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7"
},
{
"method": "GET",
"rel": "currentUserState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "POST",
"rel": "createState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "GET",
"rel": "states",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
},
{
"method": "GET",
"rel": "contentElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "GET",
"rel": "contentVisualElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"responseType": "application/vnd.sas.report.content.validation"
}
],
"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"
}
],
"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>4eb3b675-e107-4857-a8f4-51aa555ac7e7</id>
<name>TEST Report</name>
<description>TEST Description</description>
<creationTimeStamp>2016-04-19T14:54:04.705Z</creationTimeStamp>
<createdBy>bob</createdBy>
<modifiedTimeStamp>2016-04-19T14:55:11.643Z</modifiedTimeStamp>
<modifiedBy>bob</modifiedBy>
<links>
<method>GET</method>
<rel>self</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
<type>application/vnd.sas.report</type>
</links>
<links>
<method>GET</method>
<rel>alternate</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
<type>application/vnd.sas.summary</type>
</links>
<links>
<method>PUT</method>
<rel>update</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
<type>application/vnd.sas.report</type>
<responseType>application/vnd.sas.report</responseType>
</links>
<links>
<method>DELETE</method>
<rel>delete</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
</links>
<links>
<method>GET</method>
<rel>currentUserState</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState</uri>
<type>application/vnd.sas.report.state.info</type>
</links>
<links>
<method>POST</method>
<rel>createState</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</uri>
<type>application/vnd.sas.report.state.info</type>
</links>
<links>
<method>GET</method>
<rel>states</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</uri>
<type>application/vnd.sas.collection</type>
</links>
<links>
<method>GET</method>
<rel>content</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</uri>
<type>application/vnd.sas.report.content</type>
</links>
<links>
<method>PUT</method>
<rel>updateContent</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</uri>
<type>application/vnd.sas.report.content</type>
<responseType>application/vnd.sas.report.content</responseType>
</links>
<links>
<method>GET</method>
<rel>contentElements</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements</uri>
<type>application/vnd.sas.collection</type>
<itemType>application/vnd.sas.report.content.element</itemType>
</links>
<links>
<method>GET</method>
<rel>contentVisualElements</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement</uri>
<type>application/vnd.sas.collection</type>
<itemType>application/vnd.sas.report.content.element</itemType>
</links>
<links>
<method>POST</method>
<rel>validateContent</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation</uri>
<responseType>application/vnd.sas.report.content.validation</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>
<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": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Report",
"description": "TEST Description",
"creationTimeStamp": "2016-04-19T14:54:04.705Z",
"createdBy": "bob",
"modifiedTimeStamp": "2016-04-19T14:55:11.643Z",
"modifiedBy": "bob",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7"
},
{
"method": "GET",
"rel": "currentUserState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "POST",
"rel": "createState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "GET",
"rel": "states",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
},
{
"method": "GET",
"rel": "contentElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "GET",
"rel": "contentVisualElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"responseType": "application/vnd.sas.report.content.validation"
}
],
"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"
}
],
"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>4eb3b675-e107-4857-a8f4-51aa555ac7e7</id>
<name>TEST Report</name>
<description>TEST Description</description>
<creationTimeStamp>2016-04-19T14:54:04.705Z</creationTimeStamp>
<createdBy>bob</createdBy>
<modifiedTimeStamp>2016-04-19T14:55:11.643Z</modifiedTimeStamp>
<modifiedBy>bob</modifiedBy>
<links>
<method>GET</method>
<rel>self</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
<type>application/vnd.sas.report</type>
</links>
<links>
<method>GET</method>
<rel>alternate</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
<type>application/vnd.sas.summary</type>
</links>
<links>
<method>PUT</method>
<rel>update</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
<type>application/vnd.sas.report</type>
<responseType>application/vnd.sas.report</responseType>
</links>
<links>
<method>DELETE</method>
<rel>delete</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
</links>
<links>
<method>GET</method>
<rel>currentUserState</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState</uri>
<type>application/vnd.sas.report.state.info</type>
</links>
<links>
<method>POST</method>
<rel>createState</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</uri>
<type>application/vnd.sas.report.state.info</type>
</links>
<links>
<method>GET</method>
<rel>states</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</uri>
<type>application/vnd.sas.collection</type>
</links>
<links>
<method>GET</method>
<rel>content</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</uri>
<type>application/vnd.sas.report.content</type>
</links>
<links>
<method>PUT</method>
<rel>updateContent</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</uri>
<type>application/vnd.sas.report.content</type>
<responseType>application/vnd.sas.report.content</responseType>
</links>
<links>
<method>GET</method>
<rel>contentElements</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements</uri>
<type>application/vnd.sas.collection</type>
<itemType>application/vnd.sas.report.content.element</itemType>
</links>
<links>
<method>GET</method>
<rel>contentVisualElements</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement</uri>
<type>application/vnd.sas.collection</type>
<itemType>application/vnd.sas.report.content.element</itemType>
</links>
<links>
<method>POST</method>
<rel>validateContent</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation</uri>
<responseType>application/vnd.sas.report.content.validation</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>
<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. | errorResponse |
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. | Inline |
415 | Unsupported Media Type | The media types and formats for the request and response should match (JSON or XML). | Inline |
Response Schema
Status Code 400
Error
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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 409
Error
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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 415
Error
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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
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 when the resulting report was saved. | |
201 | Location | string | Location of created report resource, if saved. Also contained in the links of the response transform. |
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 'Authorization: Bearer <access-token-goes-here>' \
-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. | errorResponse |
404 | Not Found | The worksheet was not found. | None |
Response Schema
Status Code 400
Error
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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
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. |
Update localization in a report
Code samples
# You can also use wget
curl -X PUT https://example.com/reportTransforms/translationWorksheets/{reportId}/{translationLocale} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: text/plain' \
-H 'Accept: application/vnd.sas.error+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.error+json',
'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': 'application/vnd.sas.error+json',
'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{"application/vnd.sas.error+json"},
"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
}
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. | errorResponse |
412 | Precondition Failed | The header If-Match Etag value did not match. | Inline |
428 | Precondition Required | The precondition header If-Match was not provided. | Inline |
Response Schema
Status Code 400
Error
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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 412
Error
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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 428
Error
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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
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. |
Get localization worksheet
Code samples
# You can also use wget
curl -X POST https://example.com/reportTransforms/translationWorksheets/{translationLocale}#content \
-H 'Authorization: Bearer <access-token-goes-here>' \
-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": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Report",
"description": "TEST Description",
"creationTimeStamp": "2016-04-19T14:54:04.705Z",
"createdBy": "bob",
"modifiedTimeStamp": "2016-04-19T14:55:11.643Z",
"modifiedBy": "bob",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7"
},
{
"method": "GET",
"rel": "currentUserState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "POST",
"rel": "createState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "GET",
"rel": "states",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
},
{
"method": "GET",
"rel": "contentElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "GET",
"rel": "contentVisualElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"responseType": "application/vnd.sas.report.content.validation"
}
],
"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"
}
],
"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": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Report",
"description": "TEST Description",
"creationTimeStamp": "2016-04-19T14:54:04.705Z",
"createdBy": "bob",
"modifiedTimeStamp": "2016-04-19T14:55:11.643Z",
"modifiedBy": "bob",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7"
},
{
"method": "GET",
"rel": "currentUserState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "POST",
"rel": "createState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "GET",
"rel": "states",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
},
{
"method": "GET",
"rel": "contentElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "GET",
"rel": "contentVisualElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"responseType": "application/vnd.sas.report.content.validation"
}
],
"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"
}
],
"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>4eb3b675-e107-4857-a8f4-51aa555ac7e7</id>
<name>TEST Report</name>
<description>TEST Description</description>
<creationTimeStamp>2016-04-19T14:54:04.705Z</creationTimeStamp>
<createdBy>bob</createdBy>
<modifiedTimeStamp>2016-04-19T14:55:11.643Z</modifiedTimeStamp>
<modifiedBy>bob</modifiedBy>
<links>
<method>GET</method>
<rel>self</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
<type>application/vnd.sas.report</type>
</links>
<links>
<method>GET</method>
<rel>alternate</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
<type>application/vnd.sas.summary</type>
</links>
<links>
<method>PUT</method>
<rel>update</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
<type>application/vnd.sas.report</type>
<responseType>application/vnd.sas.report</responseType>
</links>
<links>
<method>DELETE</method>
<rel>delete</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
</links>
<links>
<method>GET</method>
<rel>currentUserState</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState</uri>
<type>application/vnd.sas.report.state.info</type>
</links>
<links>
<method>POST</method>
<rel>createState</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</uri>
<type>application/vnd.sas.report.state.info</type>
</links>
<links>
<method>GET</method>
<rel>states</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</uri>
<type>application/vnd.sas.collection</type>
</links>
<links>
<method>GET</method>
<rel>content</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</uri>
<type>application/vnd.sas.report.content</type>
</links>
<links>
<method>PUT</method>
<rel>updateContent</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</uri>
<type>application/vnd.sas.report.content</type>
<responseType>application/vnd.sas.report.content</responseType>
</links>
<links>
<method>GET</method>
<rel>contentElements</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements</uri>
<type>application/vnd.sas.collection</type>
<itemType>application/vnd.sas.report.content.element</itemType>
</links>
<links>
<method>GET</method>
<rel>contentVisualElements</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement</uri>
<type>application/vnd.sas.collection</type>
<itemType>application/vnd.sas.report.content.element</itemType>
</links>
<links>
<method>POST</method>
<rel>validateContent</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation</uri>
<responseType>application/vnd.sas.report.content.validation</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>
<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. | errorResponse |
Response Schema
Status Code 400
Error
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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
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. |
Translate a saved report
Code samples
# You can also use wget
curl -X GET https://example.com/reportTransforms/translatedReports/{reportId}/{translationLocale} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-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": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Report",
"description": "TEST Description",
"creationTimeStamp": "2016-04-19T14:54:04.705Z",
"createdBy": "bob",
"modifiedTimeStamp": "2016-04-19T14:55:11.643Z",
"modifiedBy": "bob",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7"
},
{
"method": "GET",
"rel": "currentUserState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "POST",
"rel": "createState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "GET",
"rel": "states",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
},
{
"method": "GET",
"rel": "contentElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "GET",
"rel": "contentVisualElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"responseType": "application/vnd.sas.report.content.validation"
}
],
"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"
}
],
"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>4eb3b675-e107-4857-a8f4-51aa555ac7e7</id>
<name>TEST Report</name>
<description>TEST Description</description>
<creationTimeStamp>2016-04-19T14:54:04.705Z</creationTimeStamp>
<createdBy>bob</createdBy>
<modifiedTimeStamp>2016-04-19T14:55:11.643Z</modifiedTimeStamp>
<modifiedBy>bob</modifiedBy>
<links>
<method>GET</method>
<rel>self</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
<type>application/vnd.sas.report</type>
</links>
<links>
<method>GET</method>
<rel>alternate</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
<type>application/vnd.sas.summary</type>
</links>
<links>
<method>PUT</method>
<rel>update</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
<type>application/vnd.sas.report</type>
<responseType>application/vnd.sas.report</responseType>
</links>
<links>
<method>DELETE</method>
<rel>delete</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
</links>
<links>
<method>GET</method>
<rel>currentUserState</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState</uri>
<type>application/vnd.sas.report.state.info</type>
</links>
<links>
<method>POST</method>
<rel>createState</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</uri>
<type>application/vnd.sas.report.state.info</type>
</links>
<links>
<method>GET</method>
<rel>states</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</uri>
<type>application/vnd.sas.collection</type>
</links>
<links>
<method>GET</method>
<rel>content</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</uri>
<type>application/vnd.sas.report.content</type>
</links>
<links>
<method>PUT</method>
<rel>updateContent</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</uri>
<type>application/vnd.sas.report.content</type>
<responseType>application/vnd.sas.report.content</responseType>
</links>
<links>
<method>GET</method>
<rel>contentElements</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements</uri>
<type>application/vnd.sas.collection</type>
<itemType>application/vnd.sas.report.content.element</itemType>
</links>
<links>
<method>GET</method>
<rel>contentVisualElements</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement</uri>
<type>application/vnd.sas.collection</type>
<itemType>application/vnd.sas.report.content.element</itemType>
</links>
<links>
<method>POST</method>
<rel>validateContent</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation</uri>
<responseType>application/vnd.sas.report.content.validation</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>
<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). | Inline |
Response Schema
Status Code 400
Error
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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
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. |
Translate a submitted report
Code samples
# You can also use wget
curl -X POST https://example.com/reportTransforms/translatedReports/{translationLocale} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-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": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Report",
"description": "TEST Description",
"creationTimeStamp": "2016-04-19T14:54:04.705Z",
"createdBy": "bob",
"modifiedTimeStamp": "2016-04-19T14:55:11.643Z",
"modifiedBy": "bob",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7"
},
{
"method": "GET",
"rel": "currentUserState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "POST",
"rel": "createState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "GET",
"rel": "states",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
},
{
"method": "GET",
"rel": "contentElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "GET",
"rel": "contentVisualElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"responseType": "application/vnd.sas.report.content.validation"
}
],
"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"
}
],
"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": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Report",
"description": "TEST Description",
"creationTimeStamp": "2016-04-19T14:54:04.705Z",
"createdBy": "bob",
"modifiedTimeStamp": "2016-04-19T14:55:11.643Z",
"modifiedBy": "bob",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7"
},
{
"method": "GET",
"rel": "currentUserState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "POST",
"rel": "createState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "GET",
"rel": "states",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
},
{
"method": "GET",
"rel": "contentElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "GET",
"rel": "contentVisualElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"responseType": "application/vnd.sas.report.content.validation"
}
],
"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"
}
],
"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>4eb3b675-e107-4857-a8f4-51aa555ac7e7</id>
<name>TEST Report</name>
<description>TEST Description</description>
<creationTimeStamp>2016-04-19T14:54:04.705Z</creationTimeStamp>
<createdBy>bob</createdBy>
<modifiedTimeStamp>2016-04-19T14:55:11.643Z</modifiedTimeStamp>
<modifiedBy>bob</modifiedBy>
<links>
<method>GET</method>
<rel>self</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
<type>application/vnd.sas.report</type>
</links>
<links>
<method>GET</method>
<rel>alternate</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
<type>application/vnd.sas.summary</type>
</links>
<links>
<method>PUT</method>
<rel>update</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
<type>application/vnd.sas.report</type>
<responseType>application/vnd.sas.report</responseType>
</links>
<links>
<method>DELETE</method>
<rel>delete</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
</links>
<links>
<method>GET</method>
<rel>currentUserState</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState</uri>
<type>application/vnd.sas.report.state.info</type>
</links>
<links>
<method>POST</method>
<rel>createState</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</uri>
<type>application/vnd.sas.report.state.info</type>
</links>
<links>
<method>GET</method>
<rel>states</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</uri>
<type>application/vnd.sas.collection</type>
</links>
<links>
<method>GET</method>
<rel>content</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</uri>
<type>application/vnd.sas.report.content</type>
</links>
<links>
<method>PUT</method>
<rel>updateContent</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</uri>
<type>application/vnd.sas.report.content</type>
<responseType>application/vnd.sas.report.content</responseType>
</links>
<links>
<method>GET</method>
<rel>contentElements</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements</uri>
<type>application/vnd.sas.collection</type>
<itemType>application/vnd.sas.report.content.element</itemType>
</links>
<links>
<method>GET</method>
<rel>contentVisualElements</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement</uri>
<type>application/vnd.sas.collection</type>
<itemType>application/vnd.sas.report.content.element</itemType>
</links>
<links>
<method>POST</method>
<rel>validateContent</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation</uri>
<responseType>application/vnd.sas.report.content.validation</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>
<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": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Report",
"description": "TEST Description",
"creationTimeStamp": "2016-04-19T14:54:04.705Z",
"createdBy": "bob",
"modifiedTimeStamp": "2016-04-19T14:55:11.643Z",
"modifiedBy": "bob",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7"
},
{
"method": "GET",
"rel": "currentUserState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "POST",
"rel": "createState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "GET",
"rel": "states",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
},
{
"method": "GET",
"rel": "contentElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "GET",
"rel": "contentVisualElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"responseType": "application/vnd.sas.report.content.validation"
}
],
"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"
}
],
"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>4eb3b675-e107-4857-a8f4-51aa555ac7e7</id>
<name>TEST Report</name>
<description>TEST Description</description>
<creationTimeStamp>2016-04-19T14:54:04.705Z</creationTimeStamp>
<createdBy>bob</createdBy>
<modifiedTimeStamp>2016-04-19T14:55:11.643Z</modifiedTimeStamp>
<modifiedBy>bob</modifiedBy>
<links>
<method>GET</method>
<rel>self</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
<type>application/vnd.sas.report</type>
</links>
<links>
<method>GET</method>
<rel>alternate</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
<type>application/vnd.sas.summary</type>
</links>
<links>
<method>PUT</method>
<rel>update</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
<type>application/vnd.sas.report</type>
<responseType>application/vnd.sas.report</responseType>
</links>
<links>
<method>DELETE</method>
<rel>delete</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7</uri>
</links>
<links>
<method>GET</method>
<rel>currentUserState</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState</uri>
<type>application/vnd.sas.report.state.info</type>
</links>
<links>
<method>POST</method>
<rel>createState</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</uri>
<type>application/vnd.sas.report.state.info</type>
</links>
<links>
<method>GET</method>
<rel>states</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states</uri>
<type>application/vnd.sas.collection</type>
</links>
<links>
<method>GET</method>
<rel>content</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</uri>
<type>application/vnd.sas.report.content</type>
</links>
<links>
<method>PUT</method>
<rel>updateContent</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content</uri>
<type>application/vnd.sas.report.content</type>
<responseType>application/vnd.sas.report.content</responseType>
</links>
<links>
<method>GET</method>
<rel>contentElements</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements</uri>
<type>application/vnd.sas.collection</type>
<itemType>application/vnd.sas.report.content.element</itemType>
</links>
<links>
<method>GET</method>
<rel>contentVisualElements</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement</uri>
<type>application/vnd.sas.collection</type>
<itemType>application/vnd.sas.report.content.element</itemType>
</links>
<links>
<method>POST</method>
<rel>validateContent</rel>
<href>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation</href>
<uri>/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation</uri>
<responseType>application/vnd.sas.report.content.validation</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>
<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. | errorResponse |
406 | Not Acceptable | The media type, the specified locale, or the strings for translation were incorrect. | Inline |
415 | Unsupported Media Type | The media types and formats for the request and response should match (JSON or XML). | Inline |
Response Schema
Status Code 400
Error
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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 406
Error
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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 415
Error
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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
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. |
Validate conditional put operations
Code samples
# You can also use wget
curl -X PUT https://example.com/reportTransforms/commons/validations/translationWorksheets/{reportId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-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": {
"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
},
"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 will always be returned. However, the validation will contain information about errors that would happen if the PUT were actually called, as shown by the additional errors. | Inline |
400 | Bad Request | The request was invalid. | errorResponse |
412 | Precondition Failed | The header If-Match Etag value does not match. | Inline |
428 | Precondition Required | The If-Match head ETag did not match current report. | Inline |
Response Schema
Status Code 200
Validation Response
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 | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
»» 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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
»» links | [link] | false | none | The links that apply to the error. |
»»» Link | link | false | none | A link to a related operation or resource. |
»»»» 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. |
»» version | integer | true | none | The version number of the error representation. This representation is version 2. |
» links | [link] | false | none | An array of links to related resources and actions. |
»» Link | link | false | none | A link to a related operation or resource. |
Status Code 400
Error
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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 412
Error
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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 428
Error
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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
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. |
Theme Change
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 'Authorization: Bearer <access-token-goes-here>' \
-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": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Report",
"description": "TEST Description",
"creationTimeStamp": "2016-04-19T14:54:04.705Z",
"createdBy": "bob",
"modifiedTimeStamp": "2016-04-19T14:55:11.643Z",
"modifiedBy": "bob",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7"
},
{
"method": "GET",
"rel": "currentUserState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "POST",
"rel": "createState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "GET",
"rel": "states",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
},
{
"method": "GET",
"rel": "contentElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "GET",
"rel": "contentVisualElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"responseType": "application/vnd.sas.report.content.validation"
}
],
"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"
}
],
"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 contains invalid content that cannot be processed (error code 27540), or, if there is no published report theme, with the specified name (error code 27570). | Inline |
Response Schema
Status Code 400
Error
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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
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. |
Change theme of submitted report
Code samples
# You can also use wget
curl -X POST https://example.com/reportTransforms/rethemedReports/{themeName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-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": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Report",
"description": "TEST Description",
"creationTimeStamp": "2016-04-19T14:54:04.705Z",
"createdBy": "bob",
"modifiedTimeStamp": "2016-04-19T14:55:11.643Z",
"modifiedBy": "bob",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7"
},
{
"method": "GET",
"rel": "currentUserState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "POST",
"rel": "createState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "GET",
"rel": "states",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
},
{
"method": "GET",
"rel": "contentElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "GET",
"rel": "contentVisualElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"responseType": "application/vnd.sas.report.content.validation"
}
],
"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"
}
],
"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. Optionally, get the input report from a persistent report resource, specified in the input transform. Also optionally, save the modified report as a persistent resource. If the input report is a persistent report, optionally 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": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Report",
"description": "TEST Description",
"creationTimeStamp": "2016-04-19T14:54:04.705Z",
"createdBy": "bob",
"modifiedTimeStamp": "2016-04-19T14:55:11.643Z",
"modifiedBy": "bob",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7"
},
{
"method": "GET",
"rel": "currentUserState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "POST",
"rel": "createState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "GET",
"rel": "states",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
},
{
"method": "GET",
"rel": "contentElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "GET",
"rel": "contentVisualElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"responseType": "application/vnd.sas.report.content.validation"
}
],
"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"
}
],
"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": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Report",
"description": "TEST Description",
"creationTimeStamp": "2016-04-19T14:54:04.705Z",
"createdBy": "bob",
"modifiedTimeStamp": "2016-04-19T14:55:11.643Z",
"modifiedBy": "bob",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7"
},
{
"method": "GET",
"rel": "currentUserState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "POST",
"rel": "createState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "GET",
"rel": "states",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
},
{
"method": "GET",
"rel": "contentElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "GET",
"rel": "contentVisualElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"responseType": "application/vnd.sas.report.content.validation"
}
],
"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"
}
],
"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. | errorResponse |
406 | Not Acceptable | The media type is incorrect. | Inline |
Response Schema
Status Code 400
Error
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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 406
Error
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 | [#/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataMappedReports/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
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. |
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": "4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"name": "TEST Report",
"description": "TEST Description",
"creationTimeStamp": "2016-04-19T14:54:04.705Z",
"createdBy": "bob",
"modifiedTimeStamp": "2016-04-19T14:55:11.643Z",
"modifiedBy": "bob",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report"
},
{
"method": "GET",
"rel": "alternate",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"type": "application/vnd.sas.report",
"responseType": "application/vnd.sas.report"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7"
},
{
"method": "GET",
"rel": "currentUserState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states/@currentUserState",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "POST",
"rel": "createState",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.report.state.info"
},
{
"method": "GET",
"rel": "states",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/states",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "content",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content",
"type": "application/vnd.sas.report.content",
"responseType": "application/vnd.sas.report.content"
},
{
"method": "GET",
"rel": "contentElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "GET",
"rel": "contentVisualElements",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/elements?characteristics=visualElement",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.report.content.element"
},
{
"method": "POST",
"rel": "validateContent",
"href": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"uri": "/reports/reports/4eb3b675-e107-4857-a8f4-51aa555ac7e7/content/validation",
"responseType": "application/vnd.sas.report.content.validation"
}
],
"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"
}
],
"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 tranform 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 | This media type's schema version number. 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 | object | false | none | The representation of a report. |
» id | string | false | none | The string ID for the report. |
» name | string | true | none | The name for the report. |
» description | string | false | none | The description for the report. |
» creationTimeStamp | string(date-time) | false | none | The time stamp when the report was created. |
» createdBy | string | false | none | The user ID who created the report. |
» modifiedTimeStamp | string(date-time) | false | none | The time stamp when the report properties was modified. |
» modifiedBy | string | false | none | The user ID who modified the report. |
» links | [link] | false | none | The links that apply to the report. |
» imageUris | object | false | none | The map of images of the report. |
» version | integer | false | none | The version number of the report representation. 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. |
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 | [object] | false | none | Link objects, as described in SAS standards documentation. |
» Link | object | false | none | A link to a related operation or resource. |
»» 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. |
Enumerated Values
Property | Value |
---|---|
schemaValidationStatus | schemaValid |
schemaValidationStatus | schemaInvalid |
evaluationStatus | evaluationValid |
evaluationStatus | evaluationInvalid |
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 specification of data source used in this service operations.
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 will assume it is "serverLibraryTable" and may 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"
}
An object representing a code and a message linked to a named element.
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. This media type's schema version number. This representation is version 1. |
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 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 on responses.
See application/vnd.sas.error
for the common documentation.
application/vnd.sas.validation
Used for pre-flight 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 Media Type
application/vnd.sas.report.transform
Link relations for the transform
Relation | 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 |
||
content | GET | (OPTIONAL) Retrieve the report content from the repository for the report that was just saved. | |
Only used 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. | |
Only used 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 may 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.
Relation | 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 |