Vizit Public APIAPI
Benchmarks

Add images to a benchmark

Add images already in your workspace to a custom benchmark.

POST/v1/benchmarks/{benchmark_id}/images

Adds up to 500 existing images to a custom benchmark. Every image must be in your default workspace, visible, and of the benchmark's scope; one image that is not refuses the whole request.

Images already in the benchmark are reported in already_member_image_ids rather than added again, so a retry is safe.

Authorization

bearerAuth
Authorization<token>

Short-lived access token issued by Create a token. Send it on every request as Authorization: Bearer <token>.

In: header

Path Parameters

benchmark_id*string

The id of a custom benchmark in your default workspace.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

image_ids*array<>

Images already in your default workspace, such as an image_id from Submit an image for scoring. Duplicates are dropped.

Items1 <= items <= 500

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://ext.vizit.com/v1/benchmarks/497f6eca-6276-4993-bfeb-53cbbbba6f08/images" \  -H "Content-Type: application/json" \  -d '{    "image_ids": [      "7d59d86b-0fab-46dc-a3e1-ec52ebe432a5"    ]  }'
{  "benchmark": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "Spring refresh hero set",    "description": "string",    "scope": "hero",    "asset_type": "string",    "image_count": 0,    "minimum_images": 30,    "recommended_images": 80,    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z",    "last_scoring": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "benchmark_id": "f1254acf-0c77-40a6-91d2-a34bd4970fd9",      "retailer": "amazon",      "product_category_id": "8df7b127-d8ab-4b5d-a571-ee2b3ab38511",      "product_category_name": "Snack Bars",      "status": "PROCESSING",      "requested_at": "2019-08-24T14:15:22Z",      "ready_at": "2019-08-24T14:15:22Z",      "error_code": "ENQUEUE_FAILED"    }  },  "added_image_ids": [    "41eebb04-3fa2-419c-85c3-d25b347be0c3"  ],  "already_member_image_ids": [    "89a619ee-21a2-43ef-acb1-74168a9648c9"  ]}
{  "detail": "string",  "status_code": 0,  "error_code": "IMAGE_DOWNLOAD_FAILED",  "request_id": "266ea41d-adf5-480b-af50-15b940c2b846",  "extra": {    "failed_urls": [      {        "url": "https://cdn.example.com/broken.jpg",        "reason": "IMAGE_DOWNLOAD_TIMEOUT"      },      {        "url": "https://cdn.example.com/icon.svg",        "reason": "UNSUPPORTED_IMAGE_FORMAT"      }    ]  },  "timestamp": "2019-08-24T14:15:22Z"}
Empty
{  "detail": "string",  "status_code": 0,  "error_code": "IMAGE_DOWNLOAD_FAILED",  "request_id": "266ea41d-adf5-480b-af50-15b940c2b846",  "extra": {    "failed_urls": [      {        "url": "https://cdn.example.com/broken.jpg",        "reason": "IMAGE_DOWNLOAD_TIMEOUT"      },      {        "url": "https://cdn.example.com/icon.svg",        "reason": "UNSUPPORTED_IMAGE_FORMAT"      }    ]  },  "timestamp": "2019-08-24T14:15:22Z"}
{  "detail": "string",  "status_code": 0,  "error_code": "IMAGE_DOWNLOAD_FAILED",  "request_id": "266ea41d-adf5-480b-af50-15b940c2b846",  "extra": {    "failed_urls": [      {        "url": "https://cdn.example.com/broken.jpg",        "reason": "IMAGE_DOWNLOAD_TIMEOUT"      },      {        "url": "https://cdn.example.com/icon.svg",        "reason": "UNSUPPORTED_IMAGE_FORMAT"      }    ]  },  "timestamp": "2019-08-24T14:15:22Z"}
Empty