Skip to content

Media Annotations Endpoints

Media Annotations API endpoints.


Overview

Method Endpoint Description
GET /api/v1/media-resources/{media_resource_id}/annotations/ Get Annotations
POST /api/v1/media-resources/{media_resource_id}/annotations/draws Create Or Update Draw
PUT /api/v1/media-resources/{media_resource_id}/annotations/draws/{draw_id} Update Draw
DELETE /api/v1/media-resources/{media_resource_id}/annotations/draws/{draw_id} Delete Draw
POST /api/v1/media-resources/{media_resource_id}/annotations/pins Create Pin
PATCH /api/v1/media-resources/{media_resource_id}/annotations/pins/{pin_id} Update Pin
DELETE /api/v1/media-resources/{media_resource_id}/annotations/pins/{pin_id} Delete Pin
POST /api/v1/media-resources/{media_resource_id}/annotations/pins/{pin_id}/attachments Add Pin Attachment
DELETE /api/v1/media-resources/{media_resource_id}/annotations/pins/{pin_id}/attachments/{attachment_resource_id} Remove Pin Attachment

API Reference

Sartiq Backend Server - Media Annotations 0.1.0

Media Annotations


GET /api/v1/media-resources/{media_resource_id}/annotations/

Get Annotations

Input parameters

Parameter In Type Default Nullable Description
context_id query No
context_type query No
media_resource_id path string No

Responses

{
    "pins": [
        {
            "id": "f0fb2b02-2035-4d39-abd2-e7695c352316",
            "media_resource_id": "5828a4cd-539a-4e11-803b-dfd82789fb46",
            "owner_id": "bb0f6202-b4c2-4a88-9d65-8836532b4e6a",
            "owner_full_name": null,
            "owner_email": null,
            "position_x": 10.12,
            "position_y": 10.12,
            "number": 0,
            "note_text": "string",
            "context_type": null,
            "context_id": null,
            "attachments": [
                {
                    "id": "40ea8f07-4e1f-4aa2-864a-e2e6beb5d1a8",
                    "resource_type": "IMAGE",
                    "url": "string",
                    "content_hash": "string",
                    "extension": "string",
                    "file_size": 0,
                    "width": null,
                    "height": null,
                    "dominant_color": null,
                    "protected": true,
                    "alt_text": null,
                    "caption": null,
                    "color_profile": null,
                    "duration": null,
                    "aspect_ratio": null,
                    "orientation": null,
                    "created_at": "2022-04-13T15:42:05.901Z"
                }
            ],
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z"
        }
    ],
    "draws": [
        {
            "id": "e2030805-60aa-4193-86e3-55150be95e06",
            "media_resource_id": "0ff82f23-adc2-4dca-b1dd-d644f5541c0e",
            "owner_id": "5014d3af-78da-4803-a9bd-ec1cdabeb2be",
            "owner_full_name": null,
            "owner_email": null,
            "strokes": [
                {
                    "points": [
                        {
                            "x": 10.12,
                            "y": 10.12,
                            "pressure": null
                        }
                    ],
                    "color": null,
                    "width": null
                }
            ],
            "context_type": null,
            "context_id": null,
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "pins": {
            "items": {
                "$ref": "#/components/schemas/AnnotationPinPublic"
            },
            "type": "array",
            "title": "Pins",
            "default": []
        },
        "draws": {
            "items": {
                "$ref": "#/components/schemas/AnnotationDrawPublic"
            },
            "type": "array",
            "title": "Draws",
            "default": []
        }
    },
    "type": "object",
    "title": "MediaAnnotationsPublic"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/media-resources/{media_resource_id}/annotations/pins

Create Pin

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
media_resource_id path string No

Request body

{
    "position_x": 10.12,
    "position_y": 10.12,
    "note_text": "string",
    "context_type": null,
    "context_id": null,
    "attachments": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "position_x": {
            "type": "number",
            "title": "Position X"
        },
        "position_y": {
            "type": "number",
            "title": "Position Y"
        },
        "note_text": {
            "type": "string",
            "title": "Note Text"
        },
        "context_type": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/AnnotationContextType"
                },
                {
                    "type": "null"
                }
            ]
        },
        "context_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Context Id"
        },
        "attachments": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/MediaInput"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Attachments"
        }
    },
    "type": "object",
    "required": [
        "position_x",
        "position_y",
        "note_text"
    ],
    "title": "AnnotationPinCreate"
}

Responses

{
    "id": "7798ad70-b8c5-4a9a-9954-b8ca59ce211f",
    "media_resource_id": "0c226af4-0f45-4c38-8bec-2dfd98de4ff8",
    "owner_id": "a28fd84b-a7dd-43b3-af2d-b313087681d4",
    "owner_full_name": null,
    "owner_email": null,
    "position_x": 10.12,
    "position_y": 10.12,
    "number": 0,
    "note_text": "string",
    "context_type": null,
    "context_id": null,
    "attachments": [
        {
            "id": "9e013bf7-49b8-40eb-a76f-cb5f7e92fa90",
            "resource_type": "IMAGE",
            "url": "string",
            "content_hash": "string",
            "extension": "string",
            "file_size": 0,
            "width": null,
            "height": null,
            "dominant_color": null,
            "protected": true,
            "alt_text": null,
            "caption": null,
            "color_profile": null,
            "duration": null,
            "aspect_ratio": null,
            "orientation": null,
            "created_at": "2022-04-13T15:42:05.901Z"
        }
    ],
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "media_resource_id": {
            "type": "string",
            "format": "uuid",
            "title": "Media Resource Id"
        },
        "owner_id": {
            "type": "string",
            "format": "uuid",
            "title": "Owner Id"
        },
        "owner_full_name": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Owner Full Name"
        },
        "owner_email": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Owner Email"
        },
        "position_x": {
            "type": "number",
            "title": "Position X"
        },
        "position_y": {
            "type": "number",
            "title": "Position Y"
        },
        "number": {
            "type": "integer",
            "title": "Number"
        },
        "note_text": {
            "type": "string",
            "title": "Note Text"
        },
        "context_type": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/AnnotationContextType"
                },
                {
                    "type": "null"
                }
            ]
        },
        "context_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Context Id"
        },
        "attachments": {
            "items": {
                "$ref": "#/components/schemas/MediaResourcePublic"
            },
            "type": "array",
            "title": "Attachments",
            "default": []
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        }
    },
    "type": "object",
    "required": [
        "id",
        "media_resource_id",
        "owner_id",
        "position_x",
        "position_y",
        "number",
        "note_text",
        "created_at",
        "updated_at"
    ],
    "title": "AnnotationPinPublic"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

PATCH /api/v1/media-resources/{media_resource_id}/annotations/pins/{pin_id}

Update Pin

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
pin_id path string No

Request body

{
    "position_x": null,
    "position_y": null,
    "note_text": null,
    "attachments": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "position_x": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Position X"
        },
        "position_y": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Position Y"
        },
        "note_text": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Note Text"
        },
        "attachments": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/MediaInput"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Attachments"
        }
    },
    "type": "object",
    "title": "AnnotationPinUpdate"
}

Responses

{
    "id": "d80f018e-ccdb-42f4-9d6d-72442a261757",
    "media_resource_id": "0219c095-57fd-4a2b-80e0-06f7e9b62dfa",
    "owner_id": "489285ee-a34e-4bc7-8fef-77dce021cd16",
    "owner_full_name": null,
    "owner_email": null,
    "position_x": 10.12,
    "position_y": 10.12,
    "number": 0,
    "note_text": "string",
    "context_type": null,
    "context_id": null,
    "attachments": [
        {
            "id": "de49853f-401a-4dcd-8174-51dd00453597",
            "resource_type": "IMAGE",
            "url": "string",
            "content_hash": "string",
            "extension": "string",
            "file_size": 0,
            "width": null,
            "height": null,
            "dominant_color": null,
            "protected": true,
            "alt_text": null,
            "caption": null,
            "color_profile": null,
            "duration": null,
            "aspect_ratio": null,
            "orientation": null,
            "created_at": "2022-04-13T15:42:05.901Z"
        }
    ],
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "media_resource_id": {
            "type": "string",
            "format": "uuid",
            "title": "Media Resource Id"
        },
        "owner_id": {
            "type": "string",
            "format": "uuid",
            "title": "Owner Id"
        },
        "owner_full_name": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Owner Full Name"
        },
        "owner_email": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Owner Email"
        },
        "position_x": {
            "type": "number",
            "title": "Position X"
        },
        "position_y": {
            "type": "number",
            "title": "Position Y"
        },
        "number": {
            "type": "integer",
            "title": "Number"
        },
        "note_text": {
            "type": "string",
            "title": "Note Text"
        },
        "context_type": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/AnnotationContextType"
                },
                {
                    "type": "null"
                }
            ]
        },
        "context_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Context Id"
        },
        "attachments": {
            "items": {
                "$ref": "#/components/schemas/MediaResourcePublic"
            },
            "type": "array",
            "title": "Attachments",
            "default": []
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        }
    },
    "type": "object",
    "required": [
        "id",
        "media_resource_id",
        "owner_id",
        "position_x",
        "position_y",
        "number",
        "note_text",
        "created_at",
        "updated_at"
    ],
    "title": "AnnotationPinPublic"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

DELETE /api/v1/media-resources/{media_resource_id}/annotations/pins/{pin_id}

Delete Pin

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
pin_id path string No

Responses

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/media-resources/{media_resource_id}/annotations/pins/{pin_id}/attachments

Add Pin Attachment

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
pin_id path string No

Request body

{
    "media_resource_id": "1444d1ed-2881-4b0e-8dad-a14102a9d1ed"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "media_resource_id": {
            "type": "string",
            "format": "uuid",
            "title": "Media Resource Id"
        }
    },
    "type": "object",
    "required": [
        "media_resource_id"
    ],
    "title": "PinAttachmentCreate"
}

Responses

{
    "id": "fabd181d-f7bb-4707-af96-9b813273a8d0",
    "resource_type": "IMAGE",
    "url": "string",
    "content_hash": "string",
    "extension": "string",
    "file_size": 0,
    "width": null,
    "height": null,
    "dominant_color": null,
    "protected": true,
    "alt_text": null,
    "caption": null,
    "color_profile": null,
    "duration": null,
    "aspect_ratio": null,
    "orientation": null,
    "created_at": "2022-04-13T15:42:05.901Z"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "resource_type": {
            "$ref": "#/components/schemas/MediaResourceType"
        },
        "url": {
            "type": "string",
            "title": "Url"
        },
        "content_hash": {
            "type": "string",
            "title": "Content Hash"
        },
        "extension": {
            "type": "string",
            "title": "Extension"
        },
        "file_size": {
            "type": "integer",
            "title": "File Size"
        },
        "width": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Width"
        },
        "height": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Height"
        },
        "dominant_color": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Dominant Color"
        },
        "protected": {
            "type": "boolean",
            "title": "Protected",
            "default": false
        },
        "alt_text": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Alt Text"
        },
        "caption": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Caption"
        },
        "color_profile": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Color Profile"
        },
        "duration": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Duration"
        },
        "aspect_ratio": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Aspect Ratio"
        },
        "orientation": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Orientation"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        }
    },
    "type": "object",
    "required": [
        "id",
        "resource_type",
        "url",
        "content_hash",
        "extension",
        "file_size",
        "created_at"
    ],
    "title": "MediaResourcePublic",
    "description": "Public output schema for media resources.\n\nThe `url` field contains the full CDN URL resolved from the\ninternal `storage_key`."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

DELETE /api/v1/media-resources/{media_resource_id}/annotations/pins/{pin_id}/attachments/{attachment_resource_id}

Remove Pin Attachment

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
attachment_resource_id path string No
pin_id path string No

Responses

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/media-resources/{media_resource_id}/annotations/draws

Create Or Update Draw

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
media_resource_id path string No

Request body

{
    "strokes": [
        {
            "points": [
                {
                    "x": 10.12,
                    "y": 10.12,
                    "pressure": null
                }
            ],
            "color": null,
            "width": null
        }
    ],
    "context_type": null,
    "context_id": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "strokes": {
            "items": {
                "$ref": "#/components/schemas/DrawStroke"
            },
            "type": "array",
            "title": "Strokes"
        },
        "context_type": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/AnnotationContextType"
                },
                {
                    "type": "null"
                }
            ]
        },
        "context_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Context Id"
        }
    },
    "type": "object",
    "required": [
        "strokes"
    ],
    "title": "AnnotationDrawCreate"
}

Responses

{
    "id": "e0b82972-78ea-4b57-90b1-618ffb11250e",
    "media_resource_id": "4ff4c2a7-9e44-47ec-8b0a-87f06d60d347",
    "owner_id": "3902f061-90d3-4edc-b09a-1b3d99c9c453",
    "owner_full_name": null,
    "owner_email": null,
    "strokes": [
        {
            "points": [
                {
                    "x": 10.12,
                    "y": 10.12,
                    "pressure": null
                }
            ],
            "color": null,
            "width": null
        }
    ],
    "context_type": null,
    "context_id": null,
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "media_resource_id": {
            "type": "string",
            "format": "uuid",
            "title": "Media Resource Id"
        },
        "owner_id": {
            "type": "string",
            "format": "uuid",
            "title": "Owner Id"
        },
        "owner_full_name": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Owner Full Name"
        },
        "owner_email": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Owner Email"
        },
        "strokes": {
            "items": {
                "$ref": "#/components/schemas/DrawStroke"
            },
            "type": "array",
            "title": "Strokes"
        },
        "context_type": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/AnnotationContextType"
                },
                {
                    "type": "null"
                }
            ]
        },
        "context_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Context Id"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        }
    },
    "type": "object",
    "required": [
        "id",
        "media_resource_id",
        "owner_id",
        "strokes",
        "created_at",
        "updated_at"
    ],
    "title": "AnnotationDrawPublic"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

PUT /api/v1/media-resources/{media_resource_id}/annotations/draws/{draw_id}

Update Draw

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
draw_id path string No

Request body

{
    "strokes": [
        {
            "points": [
                {
                    "x": 10.12,
                    "y": 10.12,
                    "pressure": null
                }
            ],
            "color": null,
            "width": null
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "strokes": {
            "items": {
                "$ref": "#/components/schemas/DrawStroke"
            },
            "type": "array",
            "title": "Strokes"
        }
    },
    "type": "object",
    "required": [
        "strokes"
    ],
    "title": "AnnotationDrawUpdate"
}

Responses

{
    "id": "f49809ae-d173-44be-a9ca-40e53d2d17b4",
    "media_resource_id": "e58149e1-8f50-45c6-8230-461daabd865d",
    "owner_id": "359eef25-ad92-4ba0-b9d0-3dbca8e857ef",
    "owner_full_name": null,
    "owner_email": null,
    "strokes": [
        {
            "points": [
                {
                    "x": 10.12,
                    "y": 10.12,
                    "pressure": null
                }
            ],
            "color": null,
            "width": null
        }
    ],
    "context_type": null,
    "context_id": null,
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "media_resource_id": {
            "type": "string",
            "format": "uuid",
            "title": "Media Resource Id"
        },
        "owner_id": {
            "type": "string",
            "format": "uuid",
            "title": "Owner Id"
        },
        "owner_full_name": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Owner Full Name"
        },
        "owner_email": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Owner Email"
        },
        "strokes": {
            "items": {
                "$ref": "#/components/schemas/DrawStroke"
            },
            "type": "array",
            "title": "Strokes"
        },
        "context_type": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/AnnotationContextType"
                },
                {
                    "type": "null"
                }
            ]
        },
        "context_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Context Id"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        }
    },
    "type": "object",
    "required": [
        "id",
        "media_resource_id",
        "owner_id",
        "strokes",
        "created_at",
        "updated_at"
    ],
    "title": "AnnotationDrawPublic"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

DELETE /api/v1/media-resources/{media_resource_id}/annotations/draws/{draw_id}

Delete Draw

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
draw_id path string No

Responses

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Schemas

AnnotationContextType

Type: string

AnnotationDrawCreate

Name Type Description
context_id
context_type
strokes Array<DrawStroke>

AnnotationDrawPublic

Name Type Description
context_id
context_type
created_at string(date-time)
id string(uuid)
media_resource_id string(uuid)
owner_email
owner_full_name
owner_id string(uuid)
strokes Array<DrawStroke>
updated_at string(date-time)

AnnotationDrawUpdate

Name Type Description
strokes Array<DrawStroke>

AnnotationPinCreate

Name Type Description
attachments
context_id
context_type
note_text string
position_x number
position_y number

AnnotationPinPublic

Name Type Description
attachments Array<MediaResourcePublic>
context_id
context_type
created_at string(date-time)
id string(uuid)
media_resource_id string(uuid)
note_text string
number integer
owner_email
owner_full_name
owner_id string(uuid)
position_x number
position_y number
updated_at string(date-time)

AnnotationPinUpdate

Name Type Description
attachments
note_text
position_x
position_y

DrawStroke

Name Type Description
color
points Array<StrokePoint>
width

HTTPValidationError

Name Type Description
detail Array<ValidationError>

MediaAnnotationsPublic

Name Type Description
draws Array<AnnotationDrawPublic>
pins Array<AnnotationPinPublic>

MediaInput

Name Type Description
alt_text
caption
color_profile
dominant_color
duration
height
media_resource_id
protected boolean
url
width

MediaResourcePublic

Name Type Description
alt_text
aspect_ratio
caption
color_profile
content_hash string
created_at string(date-time)
dominant_color
duration
extension string
file_size integer
height
id string(uuid)
orientation
protected boolean
resource_type MediaResourceType
url string
width

MediaResourceType

Type: string

PinAttachmentCreate

Name Type Description
media_resource_id string(uuid)

StrokePoint

Name Type Description
pressure
x number
y number

ValidationError

Name Type Description
ctx
input
loc Array<>
msg string
type string

Security schemes

Name Type Scheme Description
OAuth2PasswordBearer oauth2