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
OAuth2PasswordBearer header string N/A No
context_id query No
context_type query No
media_resource_id path string No

Responses

{
    "pins": [
        {
            "id": "45fb84b0-d6f2-4306-9047-13212b9f2b29",
            "media_resource_id": "6edf8a65-9ed4-4a18-99f9-6ff0160ac59e",
            "owner_id": "93ae0fcc-041b-47d9-9324-4cfddd60702d",
            "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": "7e891029-cc34-45d3-9d95-2822726bc0da",
                    "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": "83a0d3ba-8eb2-4d5c-a51f-9964b49ede1a",
            "media_resource_id": "84ce9024-1ae2-46ce-90c0-870c6aa7d361",
            "owner_id": "081ef2ab-b5a9-41d7-ad70-de3c319ad0ae",
            "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": "7a67fdde-d9b3-4542-91bf-a9fb99237eca",
    "media_resource_id": "131048eb-0c58-44a4-b575-3e218429ba27",
    "owner_id": "39d30264-3368-490c-96cc-288b1aa2fb6b",
    "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": "9ffdc684-3834-4bf7-86d5-125c41dd3b79",
            "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": "65527888-7db6-435f-a279-cccff0045bc6",
    "media_resource_id": "86149516-28cd-47fd-b609-f4bc57888b80",
    "owner_id": "9359cea2-d184-4b17-a94d-adce63ac1cb1",
    "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": "65bda154-7f93-4548-abbd-b54fd57876f7",
            "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": "225cd961-3293-4a1e-b502-8c321a3e816e"
}
⚠️ 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": "23da4849-f7ae-4667-94f4-f750f898fb93",
    "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": "6ea4295b-0587-40b3-9bb1-068ef4ea2bca",
    "media_resource_id": "6b8178c9-404c-4fad-9c1d-ce745c3b6368",
    "owner_id": "840d0ed6-dd58-4d63-b299-ade9d01f9004",
    "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": "5b3928d9-dd61-412e-9910-a44de0477279",
    "media_resource_id": "83364008-5bfa-48d3-800a-1f20d879184f",
    "owner_id": "536a2835-8d9e-402e-861c-f7613b4b212d",
    "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