Skip to content
  • API documentation
Introduction
Introduction
Foundational Pillars
Get started with the API
HTTP methods
HTTP Status Codes
Pagination
Common annotation workflow
Taxonomy
Overview
GET Taxonomy
POST Insert taxonomy node
Asset
Overview
POST Direct picture element upload
POST Create Picture asset
Annotation
Overview
POST Create annotation on asset
API documentation
/
Asset

Asset

Overview

An element refers to a physical object, such as an image, stored within the Everything Platform

Assets are versatile containers for object elements, such as images or image crops, accompanied by additional metadata.

 

 

Each asset, along with its metadata (e.g. the coordinates), can be of a various types:

  • Picture: Encapsulates an entire image element.
  • SubAsset: Encapsulates a cropped portion of an image element, representing a concept instance identified within the source image.

 

 

 

POST Direct picture element upload
POST api/assets/v1/assets/element-direct-upload

This endpoint allows the direct upload of an element asset.

Request Body

  • tag (string, optional): A tag for the asset.
  • data_bytes (string, required): The base64 encoded data of the asset.

Response
The response for this request is a JSON schema. Please refer to the response schema for details.

 

Request Headers
accessToken<Acces Token>

 

Body

{
    "tag": "image",
    "data_bytes": "UklGRjrsAABXRUJQVlA4IC7sAACQ0gWdASo0BhoJPkUijkWipCGiolp4MIAIiWdu4XafU/8/rNZwg1...."
}

Example

curl --location 'external/assets/v1/assets/element-direct-upload' \
--header 'accessToken: ' \
--data '{
    "tag": "image",
    "data_bytes": "UklGRjrsAABXRUJQVlA4IC7sAACQ0gWdASo0BhoJPkUijkWipCGiolp4MIAIiWdu4XafU/8/rNZwg1ef6yI6R7cWPj/U0xwh6P/Nf5D9u......."
}'
{
  "tenant_id": "9bbb4dc7-915d-46a3-9cce-38f275865658",
  "project_id": "c5f382b0-6a4d-4c97-9c87-e99af3c09cf3",
  "workspace_id": "8f3999d5-af90-4f70-9ceb-d517bdab85ab",
  "element_id": "30828914-3d8f-494f-a5fb-9db04edafe4e",
  "url": "https://media.mira.cv/submitted-media/2024/04/02/9260898/193332220/dbkvVH1kQm.jpg"
}
POST Create Picture asset
POST api/assets/v1/assets

External Assets
This endpoint allows the user to create new assets by making an HTTP POST request.

Request Body
The request should include the following parameters in the raw request body:

  • asset_type (string): The type of the asset.
  • element_id (string): The ID of the element associated with the asset.
Request Headers
accessToken<Acces Token>

Body

{
    "asset_type": "asset_picture",
    "element_id": "00000000-0000-4000-8000-000000000000"
}
Last updated on
September 11, 2024.