| Method | POST |
| URL | https://api.trustarc.com/api/reporting/data-extract |
| Content-Type | application/json |
| URL Parameters | Required JSON Parameters |
| Name | Value | Description |
| requestName | String | The unique name of the request or job |
| requestType | String | One of the possible values to indicate what type of assessment data to be extracted: - ASSESSMENT_SUMMARY
- ASSESSMENT_SURVEY
- ASSESSMENT_SURVEY_WITH_SUMMARY
|
| requestParams | JSON | The criteria of assessment to be extracted. The request in JSON are as follows: - assessmentStatus – (Optional) List of assessment status (OPEN, SURVEY, SURVEY_COMPLETE, IN_REVIEW, REVIEW_COMPLETE, APPROVED, APPROVED_PENDING_REMEDIATION)
- periodStart – (Required) Start of Epoch time in milliseconds of when assessments are created
- periodEnd – (Required) End of Epoch time in milliseconds of when assessments are created
- dateRangeType – (Optional) Type of period range. Possible values are:
- ASSESSMENT_CREATED_RANGE, (default)
- ASSESSMENT_START_RANGE,
- ASSESSMENT_SURVEY_COMPLETE_RANGE,
- ASSESSMENT_APPROVED_RANGE,
- ASSESSMENT_DUE_RANGE,
- ASSESSMENT_LAST_MODIFIED_RANGE
- assessmentIdentifiers – (Optional) List of assessment identifiers in PIDnnnn format. Use * for wildcard character. Ex: PID00* will match PID0001, PID002345, etc.
- assessmentNames – (Optional) List of assessment names. Use * for wildcard character. EX: ‘Test*’ will match "2301 Test level", "Test 23", "Test", "456 Test", etc.
- assessmentTemplates – (Optional) List of assessment template names. Use * for wildcard character.
- assessmentLabels – (Optional) List of Assessment Labels. Label is case sensitive and wildcard is not supported.
|
| Sample Request with curl | curl -X POST 'https://api.trustarc.com/api/reporting/data-extract/' -H "accept: application/json;charset=UTF-8" -H "authorization: Bearer " -H "Content-Type: application/json" -d "{ \"requestName\": \"AMDataExtraction- QA themis 1-32\", \"requestParams\": { \"assessmentStatus\": [ \"SURVEY\",\"SURVEY_COMPLETE\" ], \"periodEnd\": 1590187492179, \"periodStart\": 1585724400000 }, \"requestType\": \"ASSESSMENT_SURVEY_WITH_SUMMARY\"}" |
| Success Response | Code: 200 |
| Sample Success Response | { "requestName": "AMDataExtraction- QA themis 1-32", "requestParams": {
"periodEnd": 1590187492179, "periodStart": 1585724400000, "dateRangeType": "ASSESSMENT_SURVEY_COMPLETE_RANGE" }, "requestType": "ASSESSMENT_SURVEY_WITH_SUMMARY" } |
| Error Response | Code: 400 Bad Request Code: 401 Unauthorized |