Breadcrumbs

Aviary Connector v1.0 Initial Release

Version 1

Connector Overview: This page documents all 26 endpoints for the Aviaryconnector v1.


GET

Collections: authorizationApiV1collections

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Response Type

N/A


GET

Complete: authorizationApiV1collectionsresourcesmediagetcompelete

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

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Id

(Required) resource_id

Organization-id

(Required) Id of your organization

Accept

N/A

Response Type

N/A


GET

Imports: authorizationApiV1Importsget

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Organization-id

(Required) Id of your organization

Accept

N/A

Response Type

N/A


POST

Imports: authorizationApiV1Importspostid

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Organization-id

(Required) Id of your organization

Content-type

N/A

Accept

N/A

Response Type

N/A

Options (10)

Option Name

Description

Collection Id

(Required)

Resource File

(Required)

Media File

(Required)

Transcript File

(Required)

Index File

(Required)

Zip File

(Required)

Title

(Required)

Import Type

N/A

Status

N/A

New Collection Name

N/A


POST

Indexes: authorizationApiV1Indexespost

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Organization-id

(Required) Id of your organization

Content-type

N/A

Accept

N/A

Response Type

N/A

Options (9)

Option Name

Description

Is Caption

(Required)

Language

(Required)

Title

(Required)

Is Public

(Required)

Associated File

(Required)

Resource File Id

(Required)

Remove Title

N/A

Description

N/A

Is Downloadable

N/A


POST

Media_files: authorizationApiV1collectionsresourcesmediapost

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’] = ‘user@example.com’
    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”)

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Organization-id

(Required) Id of your organization

Content-type

N/A

Accept

N/A

Response Type

N/A

Options (17)

Option Name

Description

Collection Resource Id

(Required)

Access

(Required)

Is 360

(Required)

Is Downloadable

N/A

Turn On Cc

N/A

Media File

N/A

Media File Link

N/A

Media Embed Code

N/A

Media Embed Type

N/A

Title

N/A

Duration

N/A

Target Domain

N/A

Display Name

N/A

Filename

N/A

Metadata[description][][value]

N/A

Metadata[description][][vocabulary]

N/A

Metadata[publisher][][value]

N/A


GET

Resources: authorizationApiV1collectionsresources

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Collection Id

(Required) collection_id

Organization-id

(Required) Id of your organization

Accept

N/A

Response Type

N/A


POST

Resources: authorizationApiV1resourcespost

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

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Organization-id

(Required) Id of your organization

Content-type

N/A

Accept

N/A

Response Type

N/A

Options (29)

Option Name

Description

Collection Id

(Required)

Title

(Required)

Access

(Required)

Is Featured

(Required)

Custom Unique Identifier

N/A

Metadata[preferred citation][][value]

N/A

Metadata[source metadata uri][][value]

N/A

Metadata[publisher][][value]

N/A

Metadata[rights statement][][value]

N/A

Metadata[source][][value]

N/A

Metadata[agent][][value]

N/A

Metadata[agent][][vocabulary]

N/A

Metadata[date][][value]

N/A

Metadata[date][][vocabulary]

N/A

Metadata[coverage][][value]

N/A

Metadata[coverage][][vocabulary]

N/A

Metadata[language][][value]

N/A

Metadata[language][][vocabulary]

N/A

Metadata[description][][value]

N/A

Metadata[description][][vocabulary]

N/A

Metadata[format][][value]

N/A

Metadata[identifier][][value]

N/A

Metadata[identifier][][vocabulary]

N/A

Metadata[relation][][value]

N/A

Metadata[relation][][vocabulary]

N/A

Metadata[subject][][value]

N/A

Metadata[subject][][vocabulary]

N/A

Metadata[keyword][][value]

N/A

Metadata[type][][value]

N/A


POST

Sign_in: authorizationApiV1AuthSignIn

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Accept

N/A

Response Type

N/A

Options (2)

Option Name

Description

Email

N/A

Password

N/A


POST

Supplemental_files: authorizationApiV1SupplementalFilespostid

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Organization-id

(Required) Id of your organization

Content-type

N/A

Accept

N/A

Response Type

N/A

Options (5)

Option Name

Description

Title

N/A

Access

N/A

Description

N/A

Collection Resource Id

N/A

Associated File

N/A


GET

Thumbnail: authorizationApiV1collectionsresourcesmediaget

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Id

(Required) resource_id

Organization-id

(Required) Id of your organization

Accept

N/A

Response Type

N/A


DELETE

Thumbnail: authorizationApiV1collectionsresourcesmediagetthumbnail

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

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Id

(Required) resource_id

Organization-id

(Required) Id of your organization

Accept

N/A

Response Type

N/A


POST

Transcripts: authorizationApiV1Transcriptspost

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Organization-id

(Required) Id of your organization

Content-type

N/A

Accept

N/A

Response Type

N/A

Options (9)

Option Name

Description

Is Caption

(Required)

Language

(Required)

Title

(Required)

Is Public

(Required)

Associated File

(Required)

Resource File Id

(Required)

Remove Title

N/A

Description

N/A

Is Downloadable

N/A


GET

{id}: authorizationApiV1Importsgetid

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Id

(Required) collection_id

Organization-id

(Required) Id of your organization

Accept

N/A

Response Type

N/A


DELETE

{id}: authorizationApiV1Indexesdelete

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Id

(Required) collection_id

Organization-id

(Required) Id of your organization

Accept

N/A

Response Type

N/A


GET

{id}: authorizationApiV1Indexesget

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Id

(Required) resource_id

Organization-id

(Required) Id of your organization

Accept

N/A

Response Type

N/A


PUT

{id}: authorizationApiV1Indexesput

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Id

(Required) collection_id

Organization-id

(Required) Id of your organization

Content-type

N/A

Accept

N/A

Response Type

N/A

Options (4)

Option Name

Description

Language

N/A

Is Public

N/A

Description

N/A

Title

N/A


DELETE

{id}: authorizationApiV1SupplementalFilesdeleteid

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Id

(Required) collection_id

Organization-id

(Required) Id of your organization

Accept

N/A

Response Type

N/A


GET

{id}: authorizationApiV1SupplementalFilesgetid

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Id

(Required) collection_id

Organization-id

(Required) Id of your organization

Accept

N/A

Response Type

N/A


PUT

{id}: authorizationApiV1SupplementalFilespostid

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Id

(Required) collection_id

Organization-id

(Required) Id of your organization

Content-type

N/A

Accept

N/A

Response Type

N/A

Options (5)

Option Name

Description

Title

N/A

Access

N/A

Description

N/A

Collection Resource Id

N/A

Associated File

N/A


GET

{id}: authorizationApiV1Transcriptsget

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Id

(Required) resource_id

Organization-id

(Required) Id of your organization

Accept

N/A

Response Type

N/A


DELETE

{id}: authorizationApiV1collectionsresourcesmediadelete

Delete media file from your organization resource.

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Id

(Required) resource_id

Organization-id

(Required) Id of your organization

Accept

N/A

Response Type

N/A


PUT

{id}: authorizationApiV1resourcesput

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Id

(Required) id

Organization-id

(Required) Id of your organization

Content-type

N/A

Accept

N/A

Response Type

N/A

Options (15)

Option Name

Description

Collection Id

(Required)

Title

(Required)

Access

(Required)

Is Featured

(Required)

Custom Unique Identifier

N/A

Metadata[duration][][value]

N/A

Metadata[description][]["vocabulary"]

N/A

Metadata[description][]["value"]

N/A

Metadata[subject][][value]

N/A

Metadata[duration][][vocabulary]

N/A

Metadata[abc][][value]

N/A

Metadata[abc][][vocabulary]

N/A

Metadata[auth][][vocabulary]

N/A

Metadata[auth][][value]

N/A

Metadata[social][][value]

N/A


GET

{resource_id}: authorizationApiV1collectionsresourcesget

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Resource Id

(Required) resource_id

Organization-id

(Required) Id of your organization

Accept

N/A

Response Type

N/A


DELETE

{transcript_id}: authorizationApiV1Transcriptsdelete

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Transcript Id

(Required) collection_id

Organization-id

(Required) Id of your organization

Accept

N/A

Response Type

N/A


PUT

{transcript_id}: authorizationApiV1Transcriptsput

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

Transcript Id

(Required) collection_id

Organization-id

(Required) Id of your organization

Content-type

N/A

Accept

N/A

Response Type

N/A

Options (4)

Option Name

Description

Is Caption

(Required)

Resource File Id

(Required)

Description

N/A

Is Downloadable

N/A