Aviary API Documentation

Authorization 1

Description

Authorization:

Success Response Header

  • Please find these information in response header, these will be required in headers for all API endpoints.
    access-token DtpECO-cm0lwtc-8x8fFyQ
    client AI_FagdNB4y5EcL0JjspbA
    expiry 1596710533
    token-type Bearer
    uid [email protected]
    

Success body:

{
    "data": {
        "id": 1,
        "email": "[email protected]",
        "first_name": "Api",
        "last_name": "User",
        "photo_file_name": null,
        "photo_content_type": null,
        "organizations": [
            {
                "id": 1,
                "name": "weareavp",
                "subdomain": "weareavp",
                "custom_domain": "",
                "description": "",
                "addresses": [
                    {
                        "address_line_1": "",
                        "address_line_2": "",
                        "city": "",
                        "state": "",
                        "zipcode": "",
                        "country": ""
                    }
                ]
            }
        ]
    }
}

Error body:

{
    “success”: false,
    “errors”: [
        “Invalid login credentials. Please try again.”
    ]
}


Body
KeyValueDescription
email[email protected]

string | required

passwordmyAviaryPassw0rd

string | required


Collections 2

Description

Provides all collections information

Success


{
    "data": [
        {
            "id": 1,
            "title": "First collection",
            "about": "

Description of the collection

", "is_public": true, "is_featured": true, "banner_image": "http://image.com/collections/images/000/000/001/original/coralandtusk_desert_pillows_1.jpg?1590848399", "card_image": "", "created_at": "2020-03-17T19:45:20.000+05:00", "updated_at": "2020-06-04T11:38:31.000+05:00" }, { "id": 2, "title": "Private collection", "about": "", "is_public": false, "is_featured": true, "banner_image": "http://image.com/collections/images/000/000/002/original/coralandtusk_desert_pillows_1.jpg?1584456357", "card_image": "", "created_at": "2020-03-17T19:45:58.000+05:00", "updated_at": "2020-03-24T12:33:29.000+05:00" } ] }
  • Status code: 200


Headers
KeyValueDescription
access-tokenf2Zmi8CyTPKcmJWdt9iVcA

required

uid[email protected]

required

clientzaw2ixLEQrAuosvgGefUnw

required

organization-id5

optional if using subdomain of your organization

Description

Success



Headers
KeyValueDescription
access-tokenf2Zmi8CyTPKcmJWdt9iVcA

required

uid[email protected]

required

clientzaw2ixLEQrAuosvgGefUnw

required

organization-id5

optional if using subdomain of your organization

Resources 3

Description

PUT request to update provided resource data.

  • Content-Type: application/x-www-form-urlencoded
  • response code: 200

Success

{
    “data”: {
        “status”: “success”,
        “update”: {
            “id”: 3,
            “title”: “Update: SVR v1992”,
            “custom_unique_identifier”: “custom-unique-identifier”,
            “access”: “private”,
            “is_featured”: false,
            “media_file_id”: [
                4,
                6,
                5
            ],
            “media_files_count”: 3,
            “transcripts_count”: 2,
            “indexes_count”: 1,
            “metadata”: [
                {
                    “label”: “Preferred Citation”,
                    “data”: [
                        {
                            “value”: “TEST-pc”,
                            “vocabulary”: “”
                        }
                    ]
                },
                {
                    “label”: “Duration”,
                    “data”: [
                        {
                            “value”: “75.198”,
                            “vocabulary”: “”
                        }
                    ]
                },
                {
                    “label”: “Publisher”,
                    “data”: [
                        {
                            “value”: “avp.com”,
                            “vocabulary”: “”
                        }
                    ]
                },
                {
                    “label”: “Source”,
                    “data”: [
                        {
                            “value”: “internet”,
                            “vocabulary”: “”
                        }
                    ]
                },
                {
                    “label”: “Language”,
                    “data”: [
                        {
                            “value”: “ English “,
                            “vocabulary”: “primary”
                        },
                        {
                            “value”: “ esp”,
                            “vocabulary”: “secondary”
                        }
                    ]
                },
                {
                    “label”: “Description”,
                    “data”: [
                        {
                            “value”: “v1991”,
                            “vocabulary”: “”
                        },
                        {
                            “value”: “2ndv1992”,
                            “vocabulary”: “Fronsic”
                        }
                    ]
                },
                {
                    “label”: “Subject”,
                    “data”: [
                        {
                            “value”: “API-v1.190”,
                            “vocabulary”: “”
                        }
                    ]
                },
                {
                    “label”: “ABC”,
                    “data”: [
                        {
                            “value”: “1991”,
                            “vocabulary”: “”
                        },
                        {
                            “value”: “1992”,
                            “vocabulary”: “”
                        },
                        {
                            “value”: “1993”,
                            “vocabulary”: “”
                        },
                        {
                            “value”: “1994”,
                            “vocabulary”: “year”
                        }
                    ]
                },
                {
                    “label”: “Auth”,
                    “data”: [
                        {
                            “value”: “Insertion”,
                            “vocabulary”: “20012”
                        }
                    ]
                },
                {
                    “label”: “Social”,
                    “data”: [
                        {
                            “value”: “twitter”,
                            “vocabulary”: “”
                        }
                    ]
                }
            ],
            “persistent_url”: “http://weareavp.lvh.me:3000/r/sq8qb9vd0w”,
            “direct_url”: “http://weareavp.lvh.me:3000/collections/2/collection_resources/3”,
            “created_at”: “2021-01-12 15:56:32 +0500”,
            “updated_at”: “2021-01-19 18:09:36 +0500”
        }
    }
}

Note: Enter the value of [TRUNCATE] in any metadata field to delete all existing values for that specific field.

Headers
KeyValueDescription
access-tokenf2Zmi8CyTPKcmJWdt9iVcA

required

uid[email protected]

required

clientzaw2ixLEQrAuosvgGefUnw

required

organization-id5

requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain.

Body
KeyValueDescription
collection_id2

required

titleUpdate: SVR v1999

required

accessprivate

required

is_featuredfalse

required

custom_unique_identifiercustom-unique-identifier

Using this unique identifier for your resource, you can construct a direct URL as follows: https://[yourSubdomain].aviaryplatform.com/c/[custom-unique-identifier] Because this value becomes part of a URL, Aviary does not support the use of the following special characters: \ “ ! * ‘ ( ) ; : @ & = + $ , / ? % # [ ]. Aviary does not support duplicate custom unique identifiers within a single organization.

metadata[duration][][value]4567
metadata[description][][value]v1991
metadata[description][][vocabulary]Fronsic
metadata[description][][value]2ndv1992
metadata[description][][vocabulary]Fronsicv2
metadata[subject][][value]API-v1.190
metadata[duration][][vocabulary]
metadata[subject][][vocabulary]
metadata[abc][][value]1991
metadata[abc][][value]1992
metadata[abc][][value]1993
metadata[abc][][value]1994
metadata[abc][][vocabulary]year
metadata[auth][][vocabulary]20012
metadata[auth][][value]Insertion
metadata[social][][value]twitter
Description

Use POST request to create a new resource in an existing collection (a collection must be created first).

  • Content-Type: application/x-www-form-urlencoded
  • response code: 200

Success

{
    “data”: {
        “status”: “success”,
        “update”: {
            “collection_id”: 2,
            “id”: 1,
            “title”: “Example Resource Title”,
            “access”: “private”,
            “is_featured”: false,
            “custom_unique_identifier”: “custom-unique-identifier”,
            “media_file_id”: [],
            “media_files_count”: 0,
            “transcripts_count”: 0,
            “indexes_count”: 0,
            “metadata”: [
                {
                    “label”: “Duration”,
                    “data”: [
                        {
                            “value”: 0,
                            “vocabulary”: “”
                        }
                    ]
                },
                {
                    “label”: “Description”,
                    “data”: [
                        {
                            “value”: “Example general description”,
                            “vocabulary”: “general”
                        }
                    ]
                },
                {
                    “label”: “Date”,
                    “data”: [
                        {
                            “value”: “2022-09-28”,
                            “vocabulary”: “created”
                        }
                    ]
                }
            ],
            “persistent_url”: “https://weareavp.aviaryplatform.com/r/#######”,
            “direct_url”: “https://weareavp.aviaryplatform.com/collections/##/collection_resources/#####”,
            “created_at”: “2022-09-28 15:13:37 +0000”,
            “updated_at”: “2022-09-28 15:13:37 +0000”
        }
    }
}


Headers
KeyValueDescription
access-tokenf2Zmi8CyTPKcmJWdt9iVcA

required

uid[email protected]

required

clientzaw2ixLEQrAuosvgGefUnw

required

organization-id5

requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain.

Body
KeyValueDescription
collection_id2

required

titleExample Resource Title

required

accessprivate

required

is_featuredfalse

required

custom_unique_identifiercustom-unique-identifier

Using this unique identifier for your resource, you can construct a direct URL as follows: https://[yourSubdomain].aviaryplatform.com/c/[custom-unique-identifier] Because this value becomes part of a URL, Aviary does not support the use of the following special characters: \ “ ! * ‘ ( ) ; : @ & = + $ , / ? % # [ ]. Aviary does not support duplicate custom unique identifiers within a single organization.

metadata[Preferred Citation][][value]<p>Example <b>Preferred</b> Citation</p>

Default field. By default no vocabulary displayed. Accepts a limited set of HTML tags. The preferred citation for the resource.

metadata[Source Metadata URI][][value]https://www.aviaryplatform.com/

Default field. By default no vocabulary displayed. A link to the source metadata for the resource.

metadata[Publisher][][value]Example Publisher

Default field. By default no vocabulary displayed. The publisher of the resource.

metadata[Rights Statement][][value]Example Rights Statement

Default field. By default no vocabulary displayed. Accepts a limited set of HTML tags. Describes copyright status of the resource.

metadata[Source][][value]Example Source

Default field. By default no vocabulary displayed. The work, either print or electronic, from which the resource is delivered.

metadata[Agent][][value]Example Agent

Default field. People or organizations associated with the resource.

metadata[Agent][][vocabulary]Creator

Default field. People or organizations associated with the resource. A role descriptor for each agent

metadata[Date][][value]1999-01-01

Default field. A date associated with the resource in YYYY-MM-DD format.

metadata[Date][][vocabulary]Created

Default field. Date type descriptor.

metadata[Coverage][][value]Example Coverage

Default field. Terms related to the geographic or temporal nature of the resource.

metadata[Coverage][][vocabulary]20th Century

Default field. Specifies the type of coverage.

metadata[Language][][value]Example Language

Default field. The language of the resource.

metadata[Language][][vocabulary]primary

Default field. Specific use of language (e.g., ‘primary’)

metadata[Description][][value]<p>Example <b>Description</b></p>

Default field. Accepts a limited set of HTML tags. A description of the resource.

metadata[Description][][vocabulary]General Note

Default field. Label of the description metadata.

metadata[Format][][value]Example format

Default field. By default no vocabulary displayed. The description of the format of the resource

metadata[Identifier][][value]123456

Default field. An external identifier associated with the resource.

metadata[Identifier][][vocabulary]Catalog number

Default field. Type of identifier.

metadata[Relation][][value]Example Related Item

Default field. A relationship a resource has with other resources or constituent parts.

metadata[Relation][][vocabulary]part of

Default field. The type of relationship.

metadata[Subject][][value]Example Subject

Default field. Terms about the resource.

metadata[Subject][][vocabulary]geographic

Default field. The type of subject.

metadata[Keyword][][value]Example Keyword

Default field. By default no vocabulary displayed. Uncontrolled access terms for the resource.

metadata[Type][][value]Example type

Default field. The category of the resource.

Description

GET request to fetch resource data against provided resource id.

Success

  • response code: 200
    {
    “data”: {
        “resource_id”: 2,
        “title”: “SV-R1”,
        “custom_unique_identifier”: “custom-unique-identifier”,
        “media_file_id”: [
            3,
            2
        ],
        “media_files_count”: 2,
        “transcript_count”: 0,
        “indexes_count”: 0,
        “metadata”: [
            {
                “label”: “Duration”,
                “data”: [
                    {
                        “value”: “47.0”,
                        “vocabulary”: “”
                    }
                ]
            },
            {
                “label”: “Description”,
                “data”: [
                    {
                        “value”: “

    v10009

    ”, “vocabulary”: “scope content” }, { “value”: “

    What is Lorem Ipsum Lorem Ipsum is simply dummy text of the printing and typesetting industry Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s when an unknown printer took a galley of type and scrambled it to make a type specimen book

    ”, “vocabulary”: “supplement” } ] }, { “label”: “Type”, “data”: [ { “value”: “Type C “, “vocabulary”: “” }, { “value”: “890”, “vocabulary”: “” } ] }, { “label”: “ABC”, “data”: [ { “value”: “Actual value of something”, “vocabulary”: “somthing a” }, { “value”: “v4.678”, “vocabulary”: “b” } ] } ], “persistent_url”: “http://weareavp.lvh.me:3000/r/rj48p5vk26”, “direct_url”: “http://weareavp.lvh.me:3000/collections/2/collection_resources/2”, “created_at”: “2021-01-12 15:45:06 +0500”, “updated_at”: “2021-01-14 19:37:18 +0500” } }


Headers
KeyValueDescription
access-tokenf2Zmi8CyTPKcmJWdt9iVcA

required

uid[email protected]

required

clientzaw2ixLEQrAuosvgGefUnw

required

organization-id5

requried if using aviary degaul endpoint | optional if endpoint contains yout organization subdomain.

Media Files 7

Description

Success:

{
    "data": {
        "id": 4,
        "collection_resource_id": 3,
        "thumbnail_url": "/system/collection_resource_files/thumbnails/000/000/004/original/data?1610449012",
        "aviary_media_embed_url": "http://weareavp.lvh.me:3000/embed/media/4",
        "media_embed_type": "Youtube",
        "media_embed_code": "https://www.youtube.com/watch?v=Lq43g6rpYx0",
        "display_name": "KaiOS is the future? - Nokia 2720 Full Review || Yes Hello 911? Tech",
        "file_name": "Audio Video Sync Test",
        "media_download_url": "",
        "duration": "00:01:04.000",
        "access": true,
        "is_downloadable": false,
        "turn_on_cc": true,
        "download_enabled_for": null,
        "downloadable_duration": null,
        "is_360": false,
        "transcode_url": "",
        "sequence_no": 1,
        "metadata": [
            {
                "label": "publisher",
                "data": [
                    {
                        "value": "Test",
                        "vocabulary": ""
                    }
                ]
            },
            {
                "label": "rights_statement",
                "data": [
                    {
                        "value": "<p>Rights statements</p>",
                        "vocabulary": ""
                    }
                ]
            },
            {
                "label": "source",
                "data": [
                    {
                        "value": "Source",
                        "vocabulary": ""
                    }
                ]
            },
            {
                "label": "date",
                "data": [
                    {
                        "value": "2022-10-05",
                        "vocabulary": ""
                    }
                ]
            },
            {
                "label": "coverage",
                "data": [
                    {
                        "value": "test",
                        "vocabulary": "temporal"
                    }
                ]
            },
            {
                "label": "language",
                "data": [
                    {
                        "value": "English",
                        "vocabulary": "primary"
                    }
                ]
            },
            {
                "label": "description",
                "data": [
                    {
                        "value": "<p>Description</p>",
                        "vocabulary": "general"
                    }
                ]
            },
            {
                "label": "format",
                "data": [
                    {
                        "value": "Audio",
                        "vocabulary": ""
                    }
                ]
            },
            {
                "label": "identifier",
                "data": [
                    {
                        "value": "handle",
                        "vocabulary": "hdl (Handle)"
                    }
                ]
            },
            {
                "label": "subject",
                "data": [
                    {
                        "value": "Subject",
                        "vocabulary": "personal name"
                    }
                ]
            },
            {
                "label": "type",
                "data": [
                    {
                        "value": "Type",
                        "vocabulary": ""
                    }
                ]
            },
            {
                "label": "custom_field_1",
                "data": [
                    {
                        "value": "Custom field 1",
                        "vocabulary": ""
                    }
                ]
            },
            {
                "label": "custom_field_2",
                "data": [
                    {
                        "value": "Custom Field2",
                        "vocabulary": ""
                    }
                ]
            }
        ],
        "transcripts": [
            {
                "id": 1,
                "title": "YouTube English",
                "language": "en",
                "is_caption": false,
                "is_public": false,
                "has_annotation_set": false
            }
        ],
        "indexes": [
            {
                "id": 1,
                "title": "okok",
                "language": "en",
                "is_public": true
            }
        ],
        "created_at": "2021-01-12T15:56:53.000+05:00",
        "updated_at": "2021-01-12T15:56:53.000+05:00"
    }



Headers
KeyValueDescription
access-tokenfFaHj-0yMJb3F9VlXTjRQw

required

uid[email protected]

required

clientwDYpJ7XiJqmwuv3AixvsZA

required

organization-id5

requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain.


Description

Upload a new media file for a resource

Media File

The Aviary API does not allow media files larger than 100 MB to be directly uploaded. Instead, users must break media files into 100 MB chunks and send each piece describing it and the content range in the POST to the chunked media file upload endpoint (a slightly different workflow from single file upload).

Here we have a example:

import requests
import os
import uuid
from uuid import uuid4
CHUNK_SIZE = 1000000

def read_in_chunks(file_object, CHUNK_SIZE): while True: data = file_object.read(CHUNK_SIZE) if not data: break yield data

def upload(file, url): content_name = str(file) content_path = os.path.abspath(file) content_size = os.stat(content_path).st_size

print(content_name, content_path, content_size)

f = open(content_path, “rb”)

index = 0 offset = 0 headers = {}

for chunk in read_in_chunks(f, CHUNK_SIZE): offset = index + len(chunk) headers[‘Content-Range’] = ‘bytes %s-%s/%s’ % (index, offset -1, content_size) headers[‘access-token’] = ‘ErutfY1xgh2aLfT8OG-qcA’ headers[‘client’] = ‘T1JsOijMdkKMPlIjf-fGmQ’ headers[‘uid’] = ‘[email protected]’ headers[‘organization-id’] = ‘5’ index = offset try: params = {“collection_resource_id”: “90”,“access”: “true”,“filename”: “sample.mp4”,“is_360”: “false”, “title”: str(uuid4())} files = {“media_file”: chunk} r = requests.post(url=url, files=files,params=params, headers=headers) print(r.json()) print(“r: %s, Content-Range: %s” % (r, headers[‘Content-Range’])) except Exception as e: print(e) upload(‘Video1.mp4’, “https://aviaryplatform.com/api/v1/media_files”)

Success

{
    "data": {
        "id": 4,
        "collection_resource_id": 3,
        "thumbnail_url": "/system/collection_resource_files/thumbnails/000/000/004/original/data?1610449012",
        "aviary_media_embed_url": "http://weareavp.lvh.me:3000/embed/media/4",
        "media_embed_type": "Youtube",
        "media_embed_code": "https://www.youtube.com/watch?v=Lq43g6rpYx0",
        "display_name": "Audio Video Sync Test",
        "media_download_url": "",
        "duration": "00:01:04.000",
        "access": "yes",
        "is_360": false,
        "turn_on_cc": true,
        "is_downloadable": false,
        "transcode_url": "",
        "sequence_no": 1,
        "metadata": [
            {
                "label": "description",
                "data": [
                    {
                        "value": "Example value",
                        "vocabulary": "Details field"
                    }
                ]
            },
            {
                "label": "publisher",
                "data": [
                    {
                        "value": "Example publisher",
                        "vocabulary": ""
                    }
                ]
            }
        ],
        "transcripts": [
            {
                "id": 38,
                "title": "YouTube en",
                "language": "en",
                "is_caption": false,
                "is_public": false,
                "has_annotation_set": false
            }
        ],
        "indexes": [
        ],
        "created_at": "2021-01-12T15:56:53.000+05:00",
        "updated_at": "2021-01-12T15:56:53.000+05:00",
        "presigned_url": "https://wasabi-presigned-url.com"
        }
}

Error

{
    “data”: {
        “errors”: [
            “invalid id.”
        ]

}

}



Headers
KeyValueDescription
access-tokenT_QeID3be894OHotgKeGlg

required

uid[email protected]

required

clientd7Pw74DbciLilRUiXrQFIQ

required

organization-id23

requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain.

Body
KeyValueDescription
collection_resource_id327

integer | required | valid resource ID against which media will be created

accesstrue

boolean | required [true, false]

is_360false

boolean | required [true, false]

is_downloadable

boolean | optional [true, false]

turn_on_cc

boolean | optional [true, false]

media_filepresigned

string | optional | required if media_file_link and embed not is not present

media_file_linkhttps://www.dropbox.com/s/ph3ynhvpbqfanl3/32044116593328_DM_01_01.mov?dl=0

url | optional | required if media_file and embed not is not present

media_embed_code

string | optional | required if media_file_link and media_file not is not present

media_embed_type

string | optional [Local Media Embed, Avalon, Vimeo, Youtube]

titleIts a link upload

string | optional | only used if embed type is “Local Media Server”

duration

integer | optional | only used if embed type is “Local Media Server” and pass the duration in seconds

target_domain

url | optional | only used if embed type is “Avalon”

display_name

string | optional

filename1668480870_PS549C3S62004vx_AM_01_01.mp4

string | required | if media file uploaded in chunk

metadata[description][][value]

text | optional

metadata[description][][vocabulary]

string | optional

metadata[publisher][][value]

string | optional

Description

After successfully creating a media file in aviary using /api/v1/media_files, you will receive the presigned_url in the response of that request. Use that url to upload a file to wasabi. Once file is. uploaded use the /api/v1/media_files/{:id}/complete api to update aviary system so it can begin the processing on the file

Success

Empty Response

Error

Error String

Query
KeyValueDescription
X-Amz-AlgorithmAWS4-HMAC-SHA256
X-Amz-Credential9GO7SIS1DMGWNXVUV0Y2%2F20230721%2Fus-east-1%2Fs3%2Faws4_request
X-Amz-Date20230721T073644Z
X-Amz-Expires900
X-Amz-SignedHeadershost
X-Amz-Signature8b10a2a3ee75d1df30656505f1ad8aee7ba7ede82cd5c5be9f314b8404f986cf
Description

Update the status of media file as complete after successfully uploading to wasabi presigned url.

{
    “data”: [
        “id”: 335,
        “processing: true
    ]
}


Headers
KeyValueDescription
access-tokenT_QeID3be894OHotgKeGlg
uid[email protected]
clientd7Pw74DbciLilRUiXrQFIQ
organization-id23
Description

Upload a new media file for a resource

Success

{
    "data": {
        "id": 4,
        "collection_resource_id": 3,
        "thumbnail_url": "/system/collection_resource_files/thumbnails/000/000/004/original/data?1610449012",
        "aviary_media_embed_url": "http://weareavp.lvh.me:3000/embed/media/4",
        "media_embed_type": "Youtube",
        "media_embed_code": "https://www.youtube.com/watch?v=Lq43g6rpYx0",
        "display_name": "Audio Video Sync Test",
        "media_download_url": "",
        "duration": "00:01:04.000",
        "access": "yes",
        "is_360": false,
        "turn_on_cc": true,
        "is_downloadable": false,
        "transcode_url": "",
        "sequence_no": 1,
        "metadata": [
            {
                "label": "description",
                "data": [
                    {
                        "value": "Example description",
                        "vocabulary": "Details field"
                    }
                ]
            },
            {
                "label": "publisher",
                "data": [
                    {
                        "value": "Example publisher updated",
                        "vocabulary": ""
                    }
                ]
            },
            {
                "label": "source",
                "data": [
                    {
                        "value": "Put request source",
                        "vocabulary": ""
                    }
                ]
            }
        ],
        "transcripts": [
            {
                "id": 38,
                "title": "YouTube en",
                "language": "en",
                "is_caption": false,
                "is_public": false,
                "has_annotation_set": false
            }
        ],
        "indexes": [
        ],
        "created_at": "2021-01-12T15:56:53.000+05:00",
        "updated_at": "2021-01-12T15:56:53.000+05:00"
    }}

Error

{
    “data”: {
        “errors”: [
            “invalid id.”
        ]

}

}



Headers
KeyValueDescription
access-tokenErutfY1xgh2aLfT8OG-qcA

required

uid[email protected]

required

clientT1JsOijMdkKMPlIjf-fGmQ

required

organization-id2

requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain.

Body
KeyValueDescription
collection_resource_id

integer | required | valid resource ID against which media will be created

access

boolean | required [true, false]

is_360

boolean | required [true, false]

is_downloadable

boolean | optional [true, false]

turn_on_cc

boolean | optional [true, false]

media_file

file | optional | required if media_file_link and embed not is not present

media_file_link

url | optional | required if media_file and embed not is not present

media_embed_code

string | optional | required if media_file_link and media_file not is not present

media_embed_type

string | optional [Local Media Embed, Avalon, Vimeo, Youtube]

title

string | optional | only used if embed type is “Local Media Server”

duration

integer | optional | only used if embed type is “Local Media Server” and pass the duration in seconds

target_domain

url | optional | only used if embed type is “Avalon”

display_name

string | optional

metadata[description][][value]

text | optional

metadata[description][][vocabulary]

string | optional

metadata[publisher][][value]

string | optional

metadata[source][][value]

string | optional

Description

Delete media file from your organization resource.

{
    “data”: [
        “The media file deleted successfully from Aviary.”
    ]
}


Headers
KeyValueDescription
access-tokenEQ03sZT4MQVOzKsiUAiBpQ

required

uid[email protected]

required

clientesRq6sg8AwtxtDD8aST5CQ

required

organization-id5

requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain.

Description

Delete Media Thumbnail

this will delete the media thumbnail and place a default aviary thumbnail.

Success

{
    "data": [
        "The media file thumbnail deleted successfully from Aviary."
    ]
}

Error


{ “errors”: [ “media file id is required.” ] }



Headers
KeyValueDescription
access-tokenEQ03sZT4MQVOzKsiUAiBpQ

required

uid[email protected]

required

clientesRq6sg8AwtxtDD8aST5CQ

required

organization-id5

requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain.

Transcripts 4

Description

Success

{
    "data": {
        "id": 8,
        "resource_file_id": 3799,
        "is_caption": false,
        "is_public": false,
        "title": "English transcript v1.1901-clone",
        "language": "en",
        "description": "help text",
        "is_downloadable": "Yes",
        "export": {
            "webvtt": {
                "file": "https://aviaryplatform.com/api/v1/transcripts/8/export/webvtt",
                "file_name": "transcript_1697719455.vtt",
                "file_content_type": "text/vtt"
            },
            "srt": {
                "file": "https://aviaryplatform.com/api/v1/transcripts/8/export/srt",
                "file_name": "transcript_1697719455.srt",
                "file_content_type": "text/srt"
            },
            "txt": {
                "file": "https://aviaryplatform.com/api/v1/transcripts/8/export/txt",
                "file_name": "transcript_1697719455.txt",
                "file_content_type": "text/plain"
            },
            "txtanno": {
                "file": "https://aviaryplatform.com/api/v1/transcripts/8/export/txtanno",
                "file_name": "transcript_1697719455.txtanno",
                "file_content_type": "text/plain"
            }
        }
    },
    "success": true
}

Error

{
    "errors": [
        "invalid transcript id."
    ]
}



Headers
KeyValueDescription
access-tokenEQ03sZT4MQVOzKsiUAiBpQ

required

uid[email protected]

required

clientesRq6sg8AwtxtDD8aST5CQ

required

Description

Success

{
    "data": {
        "id": 8,
        "resource_file_id": 3799,
        "is_caption": false,
        "is_public": false,
        "title": "English transcript v1.1901-clone",
        "language": "en",
        "description": "help text",
        "is_downloadable": "Yes"
    },
    "success": true
}

Error:

{
    “errors”: [
        “resource_file_id is required.”
    ]
}


Headers
KeyValueDescription
access-tokenErutfY1xgh2aLfT8OG-qcA

required

uid[email protected]

required

clientT1JsOijMdkKMPlIjf-fGmQ

required

organization-id2

requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain.

Body
KeyValueDescription
is_captionfalse

boolean | required

languageen

Example: en | ru *ISO 639-2 language code | required

titleAviary Sample Transcript test

string | required

is_publicfalse

boolean | required

associated_file

file | required

resource_file_id9

int | required

remove_title1

boolean | required

descriptionfirst version, can contains errors.

string | optional

is_downloadableYes

string | optional

Description

Content-Type: multipart/form-data;

Success:

{
    "data": {
        "id": 8,
        "resource_file_id": 3799,
        "is_caption": false,
        "is_public": false,
        "title": "English transcript v1.1901-clone",
        "language": "en",
        "description": "help text",
        "is_downloadable": "Yes"
    },
    "success": true
}

Error:

{
    “errors”: [
        “invalid transcript id.”
    ]
}


Headers
KeyValueDescription
access-tokenEQ03sZT4MQVOzKsiUAiBpQ

requried

uid[email protected]

requried

clientesRq6sg8AwtxtDD8aST5CQ

requried

Body
KeyValueDescription
is_captionfalse
resource_file_id2
descriptionThis is description for transcript.
is_downloadableYes
Description

Success

{
    "data": [
        "Transcript file deleted successfully from Aviary."
    ]
}

Error

{
    “errors”: [
        “invalid transcript id.”
    ]
}


Headers
KeyValueDescription
access-tokenEQ03sZT4MQVOzKsiUAiBpQ

required

uid[email protected]

required

clientesRq6sg8AwtxtDD8aST5CQ

required

Indexes 4

Description

  • Response status code: 200

Success

{
    "data": {
        "id": 14,
        "resource_file_id": 304,
        "is_public": true,
        "title": "aviaryplatform test",
        "language": "en",
        "description": "aviaryplatform test",
        "export": {
            "file": "https://aviaryplatform.com/api/v1/indexes/2006/export",
            "file_name": "dfff_1697719352.webvtt",
            "file_content_type": "text/vtt"
        }
    },
    "success": true
}
}

Error

{
    "data": {
        "errors": [
            "invalid file_index_id"
        ]
    },
    "success": false
}



Headers
KeyValueDescription
access-tokenEQ03sZT4MQVOzKsiUAiBpQ

requried

uid[email protected]

requried

clientesRq6sg8AwtxtDD8aST5CQ

requried

organization-id5

requried if using aviary degaul endpoint | optional if endpoint contains yout organization subdomain.

Body
Description

  • Response status code: 200

Success

{
    "data": {
        "id": 14,
        "resource_file_id": 3858,
        "is_public": false,
        "title": "Some title",
        "language": "en",
        "description": "Index is generated by machine, can contain errors."
    },
    "success": true
}
}

Error


{ “data”: { “errors”: [ “index id is required” ] }, “success”: false }



Headers
KeyValueDescription
access-tokenEQ03sZT4MQVOzKsiUAiBpQ

requried

uid[email protected]

requried

clientesRq6sg8AwtxtDD8aST5CQ

requried

organization-id5

requried if using aviary degaul endpoint | optional if endpoint contains yout organization subdomain.

Body
KeyValueDescription
languageen

ISO 639-2 language code | required

titleSome title

string | required

is_publicfalse

boolean | required

associated_file

file | required

resource_file_id3858

integer | required

remove_title1

boolean | required

descriptionIndex is generated by machine, can contain errors.

string | optional

Description

  • Content-Type: multipart/form-data; if uploading the file

Success

{
    "data": {
        "id": 13,
        "resource_file_id": 3858,
        "is_public": true,
        "title": "Sample title",
        "language": "ru",
        "description": "This is index description::::"
    },
    "success": true
}

Error

{
    “errors”: [
        “invalid index id.”
    ]
}


Headers
KeyValueDescription
access-tokenEQ03sZT4MQVOzKsiUAiBpQ

requried

uid[email protected]

requried

clientesRq6sg8AwtxtDD8aST5CQ

requried

organization-id5

requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain.

Body
KeyValueDescription
languageru

OPTIONAL

titleSample title

OPTIONAL

is_publictrue

OPTIONAL

descriptionThis is index description.

OPTIONAL

associated_file

OPTIONAL

Headers
KeyValueDescription
access-tokenEQ03sZT4MQVOzKsiUAiBpQ

requried

uid[email protected]

requried

clientesRq6sg8AwtxtDD8aST5CQ

requried

organization-id5

requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain.

Imports 3

Description

Response Body

  • Success
    {
        “data”: [
            {
                “id”: 1,
                “title”: “My Title”,
                “collection_id”: 1,
                “new_collection_name”: “”,
                “status”: 1,
                “status_readable”: “Not Started”,
                “import_type”: 2,
                “import_type_readable”: “AVIARY_PACKAGE”,
                “logs”: null,
                “created_at”: “2020-03-30T11:29:51.000+05:00”,
                “updated_at”: “2020-04-02T13:09:09.000+05:00”
            },
            {
                “id”: 2,
                “title”: “”,
                “collection_id”: 0,
                “new_collection_name”: “bulk edit”,
                “status”: 1,
                “status_readable”: “Not Started”,
                “import_type”: 1,
                “import_type_readable”: “OHMS_XML”,
                “logs”: null,
                “created_at”: “2020-04-02T14:52:53.000+05:00”,
                “updated_at”: “2020-04-02T15:37:39.000+05:00”
            }
        ]
    }
    


Headers
KeyValueDescription
access-tokenErutfY1xgh2aLfT8OG-qcA

required

uid[email protected]

required

clientT1JsOijMdkKMPlIjf-fGmQ

required

organization-id5

requried if using aviary degaul endpoint | optional if endpoint contains yout organization subdomain.

Description

Response Body

  • Success
    {
        “data”: [
            {
                “id”: 1,
                “title”: “”,
                “collection_id”: 1,
                “new_collection_name”: “”,
                “status”: 1,
                “status_readable”: “Not Started”,
                “import_type”: 2,
                “import_type_readable”: “AVIARY_PACKAGE”,
                “logs”: null,
                “created_at”: “2020-03-30T11:29:51.000+05:00”,
                “updated_at”: “2020-04-02T13:09:09.000+05:00”
            }
        ]
    }
    


Headers
KeyValueDescription
access-tokenErutfY1xgh2aLfT8OG-qcA

required

uid[email protected]

required

clientT1JsOijMdkKMPlIjf-fGmQ

required

organization-id5

requried if using aviary degaul endpoint | optional if endpoint contains yout organization subdomain.

Description

Response Body

  • Success
    {
        “data”: [
            {
                “id”: 1,
                “collection_id”: 1,
                “new_collection_name”: “”,
                “status”: 1,
                “status_readable”: “Not Started”,
                “import_type”: 2,
                “import_type_readable”: “AVIARY_PACKAGE”,
                “logs”: null,
                “created_at”: “2020-03-30T11:29:51.000+05:00”,
                “updated_at”: “2020-04-02T13:09:09.000+05:00”
            }
        ]
    }
    


Headers
KeyValueDescription
access-tokenErutfY1xgh2aLfT8OG-qcA

required

uid[email protected]

required

clientT1JsOijMdkKMPlIjf-fGmQ

required

organization-id5

requried if using aviary degaul endpoint | optional if endpoint contains yout organization subdomain.

Body
KeyValueDescription
collection_id

integer | requried

import_type

integer | optional

status

integer | optional

new_collection_name

string | | optional * this is required if collection_id parameter is empty

resource_file

file | required | csv

media_file

file | required | csv

transcript_file

file | required | csv

index_file

file | required | csv

zip_file

file | required | zip

title

string | required

Supplemental Files 4

Description

Success:

{
    "data": {
        "id": 1,
        "collection_resource_id": 16,
        "title": "Air Quality index",
        "description": "",
        "access": "public",
        "status": true,
        "sort_order": null,
        "associated_file_file_name": "air-quality.png",
        "associated_file_content_type": "image/png",
        "file": "/system/supplemental_files/associated_files/000/000/001/original/air-quality.png?1645606932",
        "created_at": "2022-02-23T14:02:12.000+05:00",
        "updated_at": "2022-02-23T14:02:12.000+05:00"
    }
}

Error:

{
    "errors": [
        "You are not authorized to access this endpoint."
    ]
}



Headers
KeyValueDescription
access-token6Wp9gioTz5AyYvG2oN5i8A

requried

uid[email protected]

requried

clientNPooO5I21ytGJuHprpOwoQ

requried


Description

Success:

{
    "data": {
        "id": 1,
        "collection_resource_id": 16,
        "title": "Air Quality index",
        "description": "",
        "access": "public",
        "status": true,
        "sort_order": null,
        "associated_file_file_name": "air-quality.png",
        "associated_file_content_type": "image/png",
        "file": "/system/supplemental_files/associated_files/000/000/001/original/air-quality.png?1645606932",
        "created_at": "2022-02-23T14:02:12.000+05:00",
        "updated_at": "2022-02-23T14:02:12.000+05:00"
    },
    "message": "Information successfully updated!"
}

Error:

{
    "errors": [
        "You are not authorized to access this endpoint."
    ]
}

Validation Error:

{
    "message": "Something went wrong, Information could not be updated.",
    "errors": [
        "Collection resource must exist",
        "Title is required."
    ]
}



Headers
KeyValueDescription
access-token6Wp9gioTz5AyYvG2oN5i8A

requried

uid[email protected]

requried

clientNPooO5I21ytGJuHprpOwoQ

requried

Query
KeyValueDescription
titleAQI Stats
accesstrue
descriptionAQI Stats for 2020
collection_resource_id16
Body
KeyValueDescription
titleAQI Stats
accesstrue
descriptionAQI Stats for 2020
collection_resource_id16
associated_file

Description

Success:

{
    "data": {
        "id": 1,
        "collection_resource_id": 16,
        "title": "Air Quality index",
        "description": "",
        "access": "public",
        "status": true,
        "sort_order": null,
        "associated_file_file_name": "air-quality.png",
        "associated_file_content_type": "image/png",
        "file": "/system/supplemental_files/associated_files/000/000/001/original/air-quality.png?1645606932",
        "created_at": "2022-02-23T14:02:12.000+05:00",
        "updated_at": "2022-02-23T14:02:12.000+05:00"
    },
    "message": "Information successfully updated!"
}

Error:

{
    "errors": [
        "You are not authorized to access this endpoint."
    ]
}

Validation Error:

{
    "message": "Something went wrong, Information could not be updated.",
    "errors": [
        "Collection resource must exist",
        "Title is required."
    ]
}



Headers
KeyValueDescription
access-token6Wp9gioTz5AyYvG2oN5i8A

requried

uid[email protected]

requried

clientNPooO5I21ytGJuHprpOwoQ

requried

Body
KeyValueDescription
titleAQI / pm2.5 Stats

Description

Success:

{
    "data": [
        "The file deleted successfully from Avairy."
    ]
}

Error:

{
    "errors": [
        "You are not authorized to access this endpoint."
    ]
}



Headers
KeyValueDescription
access-token6Wp9gioTz5AyYvG2oN5i8A

requried

uid[email protected]

requried

clientNPooO5I21ytGJuHprpOwoQ

requried