Authorization:
access-token DtpECO-cm0lwtc-8x8fFyQ client AI_FagdNB4y5EcL0JjspbA expiry 1596710533 token-type Bearer uid [email protected]
{ "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": "" } ] } ] } }
{ “success”: false, “errors”: [ “Invalid login credentials. Please try again.” ] }
Key | Value | Description |
---|---|---|
[email protected] | string | required | |
password | myAviaryPassw0rd | string | required |
Provides all collections information
{ "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" } ] }
Key | Value | Description |
---|---|---|
access-token | f2Zmi8CyTPKcmJWdt9iVcA | required |
uid | [email protected] | required |
client | zaw2ixLEQrAuosvgGefUnw | required |
organization-id | 5 | optional if using subdomain of your organization |
{ “data”: [ { “resource_id”: 3, “title”: “svr2”, “media_file_id”: [ 4 ], “media_files_count”: 1, “transcript_count”: 0, “indexes_count”: 0, “persistence_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-12 15:56:32 +0500” }, { “resource_id”: 2, “title”: “SV-R1”, “media_file_id”: [ 3, 2 ], “media_files_count”: 2, “transcript_count”: 0, “indexes_count”: 0, “persistence_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-12 15:45:06 +0500” } ] }
Key | Value | Description |
---|---|---|
access-token | f2Zmi8CyTPKcmJWdt9iVcA | required |
uid | [email protected] | required |
client | zaw2ixLEQrAuosvgGefUnw | required |
organization-id | 5 | optional if using subdomain of your organization |
PUT request to update provided resource data.
{ “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.
Key | Value | Description |
---|---|---|
access-token | f2Zmi8CyTPKcmJWdt9iVcA | required |
uid | [email protected] | required |
client | zaw2ixLEQrAuosvgGefUnw | required |
organization-id | 5 | requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain. |
Key | Value | Description |
---|---|---|
collection_id | 2 | required |
title | Update: SVR v1999 | required |
access | private | required |
is_featured | false | required |
custom_unique_identifier | custom-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] |
Use POST request to create a new resource in an existing collection (a collection must be created first).
{ “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” } } }
Key | Value | Description |
---|---|---|
access-token | f2Zmi8CyTPKcmJWdt9iVcA | required |
uid | [email protected] | required |
client | zaw2ixLEQrAuosvgGefUnw | required |
organization-id | 5 | requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain. |
Key | Value | Description |
---|---|---|
collection_id | 2 | required |
title | Example Resource Title | required |
access | private | required |
is_featured | false | required |
custom_unique_identifier | custom-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. |
GET request to fetch resource data against provided resource id.
{ “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” } }
Key | Value | Description |
---|---|---|
access-token | f2Zmi8CyTPKcmJWdt9iVcA | required |
uid | [email protected] | required |
client | zaw2ixLEQrAuosvgGefUnw | required |
organization-id | 5 | requried if using aviary degaul endpoint | optional if endpoint contains yout organization subdomain. |
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"
}
Key | Value | Description |
---|---|---|
access-token | fFaHj-0yMJb3F9VlXTjRQw | required |
uid | [email protected] | required |
client | wDYpJ7XiJqmwuv3AixvsZA | required |
organization-id | 5 | requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain. |
Upload a new media file for a resource
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 = 1000000def 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”)
{ "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" } }
{ “data”: { “errors”: [ “invalid id.” ]}
}
Key | Value | Description |
---|---|---|
access-token | T_QeID3be894OHotgKeGlg | required |
uid | [email protected] | required |
client | d7Pw74DbciLilRUiXrQFIQ | required |
organization-id | 23 | requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain. |
Key | Value | Description |
---|---|---|
collection_resource_id | 327 | integer | required | valid resource ID against which media will be created |
access | true | boolean | required [true, false] |
is_360 | false | boolean | required [true, false] |
is_downloadable | boolean | optional [true, false] | |
turn_on_cc | boolean | optional [true, false] | |
media_file | presigned | string | optional | required if media_file_link and embed not is not present |
media_file_link | https://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] | |
title | Its 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 | |
filename | 1668480870_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 |
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
Empty Response
Error String
Key | Value | Description |
---|---|---|
X-Amz-Algorithm | AWS4-HMAC-SHA256 | |
X-Amz-Credential | 9GO7SIS1DMGWNXVUV0Y2%2F20230721%2Fus-east-1%2Fs3%2Faws4_request | |
X-Amz-Date | 20230721T073644Z | |
X-Amz-Expires | 900 | |
X-Amz-SignedHeaders | host | |
X-Amz-Signature | 8b10a2a3ee75d1df30656505f1ad8aee7ba7ede82cd5c5be9f314b8404f986cf |
Update the status of media file as complete after successfully uploading to wasabi presigned url.
{ “data”: [ “id”: 335, “processing: true ] }
Key | Value | Description |
---|---|---|
access-token | T_QeID3be894OHotgKeGlg | |
uid | [email protected] | |
client | d7Pw74DbciLilRUiXrQFIQ | |
organization-id | 23 |
Upload a new media file for a resource
{ "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" }}
{ “data”: { “errors”: [ “invalid id.” ]}
}
Key | Value | Description |
---|---|---|
access-token | ErutfY1xgh2aLfT8OG-qcA | required |
uid | [email protected] | required |
client | T1JsOijMdkKMPlIjf-fGmQ | required |
organization-id | 2 | requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain. |
Key | Value | Description |
---|---|---|
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 |
Delete media file from your organization resource.
{ “data”: [ “The media file deleted successfully from Aviary.” ] }
Key | Value | Description |
---|---|---|
access-token | EQ03sZT4MQVOzKsiUAiBpQ | required |
uid | [email protected] | required |
client | esRq6sg8AwtxtDD8aST5CQ | required |
organization-id | 5 | requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain. |
this will delete the media thumbnail and place a default aviary thumbnail.
{ "data": [ "The media file thumbnail deleted successfully from Aviary." ] }
{ “errors”: [ “media file id is required.” ] }
Key | Value | Description |
---|---|---|
access-token | EQ03sZT4MQVOzKsiUAiBpQ | required |
uid | [email protected] | required |
client | esRq6sg8AwtxtDD8aST5CQ | required |
organization-id | 5 | requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain. |
{
"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
}
{
"errors": [
"invalid transcript id."
]
}
Key | Value | Description |
---|---|---|
access-token | EQ03sZT4MQVOzKsiUAiBpQ | required |
uid | [email protected] | required |
client | esRq6sg8AwtxtDD8aST5CQ | required |
{ "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 }
{ “errors”: [ “resource_file_id is required.” ] }
Key | Value | Description |
---|---|---|
access-token | ErutfY1xgh2aLfT8OG-qcA | required |
uid | [email protected] | required |
client | T1JsOijMdkKMPlIjf-fGmQ | required |
organization-id | 2 | requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain. |
Key | Value | Description |
---|---|---|
is_caption | false | boolean | required |
language | en | Example: en | ru *ISO 639-2 language code | required |
title | Aviary Sample Transcript test | string | required |
is_public | false | boolean | required |
associated_file | file | required | |
resource_file_id | 9 | int | required |
remove_title | 1 | boolean | required |
description | first version, can contains errors. | string | optional |
is_downloadable | Yes | string | optional |
Content-Type: multipart/form-data;
{ "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 }
{ “errors”: [ “invalid transcript id.” ] }
Key | Value | Description |
---|---|---|
access-token | EQ03sZT4MQVOzKsiUAiBpQ | requried |
uid | [email protected] | requried |
client | esRq6sg8AwtxtDD8aST5CQ | requried |
Key | Value | Description |
---|---|---|
is_caption | false | |
resource_file_id | 2 | |
description | This is description for transcript. | |
is_downloadable | Yes |
{ "data": [ "Transcript file deleted successfully from Aviary." ] }
{ “errors”: [ “invalid transcript id.” ] }
Key | Value | Description |
---|---|---|
access-token | EQ03sZT4MQVOzKsiUAiBpQ | required |
uid | [email protected] | required |
client | esRq6sg8AwtxtDD8aST5CQ | required |
{
"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
}
}
{
"data": {
"errors": [
"invalid file_index_id"
]
},
"success": false
}
Key | Value | Description |
---|---|---|
access-token | EQ03sZT4MQVOzKsiUAiBpQ | requried |
uid | [email protected] | requried |
client | esRq6sg8AwtxtDD8aST5CQ | requried |
organization-id | 5 | requried if using aviary degaul endpoint | optional if endpoint contains yout organization subdomain. |
{ "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 } }
{ “data”: { “errors”: [ “index id is required” ] }, “success”: false }
Key | Value | Description |
---|---|---|
access-token | EQ03sZT4MQVOzKsiUAiBpQ | requried |
uid | [email protected] | requried |
client | esRq6sg8AwtxtDD8aST5CQ | requried |
organization-id | 5 | requried if using aviary degaul endpoint | optional if endpoint contains yout organization subdomain. |
Key | Value | Description |
---|---|---|
language | en | ISO 639-2 language code | required |
title | Some title | string | required |
is_public | false | boolean | required |
associated_file | file | required | |
resource_file_id | 3858 | integer | required |
remove_title | 1 | boolean | required |
description | Index is generated by machine, can contain errors. | string | optional |
{ "data": { "id": 13, "resource_file_id": 3858, "is_public": true, "title": "Sample title", "language": "ru", "description": "This is index description::::" }, "success": true }
{ “errors”: [ “invalid index id.” ] }
Key | Value | Description |
---|---|---|
access-token | EQ03sZT4MQVOzKsiUAiBpQ | requried |
uid | [email protected] | requried |
client | esRq6sg8AwtxtDD8aST5CQ | requried |
organization-id | 5 | requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain. |
Key | Value | Description |
---|---|---|
language | ru | OPTIONAL |
title | Sample title | OPTIONAL |
is_public | true | OPTIONAL |
description | This is index description. | OPTIONAL |
associated_file | OPTIONAL |
Key | Value | Description |
---|---|---|
access-token | EQ03sZT4MQVOzKsiUAiBpQ | requried |
uid | [email protected] | requried |
client | esRq6sg8AwtxtDD8aST5CQ | requried |
organization-id | 5 | requried if using aviary default endpoint | optional if endpoint contains yout organization subdomain. |
{ “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” } ] }
Key | Value | Description |
---|---|---|
access-token | ErutfY1xgh2aLfT8OG-qcA | required |
uid | [email protected] | required |
client | T1JsOijMdkKMPlIjf-fGmQ | required |
organization-id | 5 | requried if using aviary degaul endpoint | optional if endpoint contains yout organization subdomain. |
{ “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” } ] }
Key | Value | Description |
---|---|---|
access-token | ErutfY1xgh2aLfT8OG-qcA | required |
uid | [email protected] | required |
client | T1JsOijMdkKMPlIjf-fGmQ | required |
organization-id | 5 | requried if using aviary degaul endpoint | optional if endpoint contains yout organization subdomain. |
{ “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” } ] }
Key | Value | Description |
---|---|---|
access-token | ErutfY1xgh2aLfT8OG-qcA | required |
uid | [email protected] | required |
client | T1JsOijMdkKMPlIjf-fGmQ | required |
organization-id | 5 | requried if using aviary degaul endpoint | optional if endpoint contains yout organization subdomain. |
Key | Value | Description |
---|---|---|
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 |
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."
]
}
Key | Value | Description |
---|---|---|
access-token | 6Wp9gioTz5AyYvG2oN5i8A | requried |
uid | [email protected] | requried |
client | NPooO5I21ytGJuHprpOwoQ | requried |
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."
]
}
Key | Value | Description |
---|---|---|
access-token | 6Wp9gioTz5AyYvG2oN5i8A | requried |
uid | [email protected] | requried |
client | NPooO5I21ytGJuHprpOwoQ | requried |
Key | Value | Description |
---|---|---|
title | AQI Stats | |
access | true | |
description | AQI Stats for 2020 | |
collection_resource_id | 16 |
Key | Value | Description |
---|---|---|
title | AQI Stats | |
access | true | |
description | AQI Stats for 2020 | |
collection_resource_id | 16 | |
associated_file |
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."
]
}
Key | Value | Description |
---|---|---|
access-token | 6Wp9gioTz5AyYvG2oN5i8A | requried |
uid | [email protected] | requried |
client | NPooO5I21ytGJuHprpOwoQ | requried |
Key | Value | Description |
---|---|---|
title | AQI / pm2.5 Stats |
Success:
{
"data": [
"The file deleted successfully from Avairy."
]
}
Error:
{
"errors": [
"You are not authorized to access this endpoint."
]
}
Key | Value | Description |
---|---|---|
access-token | 6Wp9gioTz5AyYvG2oN5i8A | requried |
uid | [email protected] | requried |
client | NPooO5I21ytGJuHprpOwoQ | requried |