Get a pre-test
curl --request GET \
--url https://myunite.ai/api/v1/pretests/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://myunite.ai/api/v1/pretests/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://myunite.ai/api/v1/pretests/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "<string>",
"object": "pretest",
"status": "queued",
"channel": "ooh",
"title": "<string>",
"locale": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"brand": {
"id": "<string>",
"name": "<string>"
},
"creative": {
"type": "image",
"thumbnailUrl": "<string>"
},
"result": {
"score": 123,
"recommendation": "launch",
"recommendationLabel": "<string>",
"conclusion": "<string>",
"pillars": {},
"findings": [
{
"check": "<string>",
"name": "<string>",
"category": "<string>",
"status": "pass",
"score": 123,
"summary": "<string>",
"optional": true
}
],
"recommendations": [
{
"title": "<string>",
"description": "<string>",
"priority": "high",
"category": "<string>"
}
],
"maps": {
"heatmap": {
"url": "<string>",
"mediaType": "image/jpeg"
},
"contrast": {
"url": "<string>",
"mediaType": "image/jpeg"
},
"focus": {
"url": "<string>",
"mediaType": "image/jpeg"
}
}
},
"report": {
"status": "pending",
"url": "<string>"
},
"error": {
"code": "video_too_long",
"message": "<string>"
},
"metadata": {}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}Pretests
Get a pre-test
Returns one pre-test. result is present when status is completed, error when it is failed. The state you read here is the source of truth.
Requires the pretests:read scope.
GET
/
pretests
/
{id}
Get a pre-test
curl --request GET \
--url https://myunite.ai/api/v1/pretests/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://myunite.ai/api/v1/pretests/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://myunite.ai/api/v1/pretests/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "<string>",
"object": "pretest",
"status": "queued",
"channel": "ooh",
"title": "<string>",
"locale": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"brand": {
"id": "<string>",
"name": "<string>"
},
"creative": {
"type": "image",
"thumbnailUrl": "<string>"
},
"result": {
"score": 123,
"recommendation": "launch",
"recommendationLabel": "<string>",
"conclusion": "<string>",
"pillars": {},
"findings": [
{
"check": "<string>",
"name": "<string>",
"category": "<string>",
"status": "pass",
"score": 123,
"summary": "<string>",
"optional": true
}
],
"recommendations": [
{
"title": "<string>",
"description": "<string>",
"priority": "high",
"category": "<string>"
}
],
"maps": {
"heatmap": {
"url": "<string>",
"mediaType": "image/jpeg"
},
"contrast": {
"url": "<string>",
"mediaType": "image/jpeg"
},
"focus": {
"url": "<string>",
"mediaType": "image/jpeg"
}
}
},
"report": {
"status": "pending",
"url": "<string>"
},
"error": {
"code": "video_too_long",
"message": "<string>"
},
"metadata": {}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}Autorizações
Resposta
The pre-test.