Aviaryconnector v1

Version 1

Connector Overview: This page documents all 34 actions for the Aviaryconnector v1.

View API Documentation

Authorization

POST Authorization: /api/v1/auth/sign_in

/api/v1/auth/sign_in

This endpoint allows Aviary users to sign in with an API Key and, upon successful authentication, returns a JSON response containing data about the user's profile and data about each of the organizations that the user is a member of. For more information about generating an Aviary user API Key, see: Creating an API Key.

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Response Type

N/A

Collections (5)

GET /api/v1/collections

/api/v1/collections

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Response Type

N/A

POST /api/v1/collections

/api/v1/collections

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Response Type

N/A

Options (30)

Option Name

Description

Title

string | required

About

string | optional

Image

file | optional

Is Public

boolean | optional [true, false]

Is Featured

boolean | optional [true, false]

Favicon

file | optional

Click Through

boolean | optional [true, false]

Conditions For Access

string | optional

Automated Access Approval

boolean | optional [true, false]

Period Of Access

string | optional [Ongoing, Fixed, Duration]

Time Period

string | optional

Target Of Access

stext | optional [resource, collection]

Access Request Approval Email

string | optional

Display Banner

boolean | optional [true, false]

Global Ip Enabled

boolean | optional [true, false]

From Name

string | optional

Subject

string | optional

Bcc Request Email

string | optional

Is Audio Only

boolean | optional [true, false]

Disable Player

boolean | optional [true, false]

Banner Slider Resources

string | optional

Banner Type

string | optional [banner_image, featured_resources_slider]

Default Tab Selection

string | optional [resources, about]

Enable Resource Search

boolean | optional [true, false]

Search Resource Placeholder

string | optional

Enable Itc Autoscroll

boolean | optional [true, false]

Card Image

file | optional

Enable Alternative Playback

boolean | optional [true, false]

Default Thumb

file | optional

Enable Default Thumb

boolean | optional [true, false]

PUT /api/v1/collections/{collection_id}

/api/v1/collections/{collection_id}

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Collection Id

collection_id

Response Type

N/A

Options (30)

Option Name

Description

Title

string | required

About

string | optional

Image

file | optional

Is Public

boolean | optional [true, false]

Is Featured

boolean | optional [true, false]

Favicon

file | optional

Click Through

boolean | optional [true, false]

Conditions For Access

string | optional

Automated Access Approval

boolean | optional [true, false]

Period Of Access

string | optional [Ongoing, Fixed, Duration]

Time Period

string | optional

Target Of Access

stext | optional [resource, collection]

Access Request Approval Email

string | optional

Display Banner

boolean | optional [true, false]

Global Ip Enabled

boolean | optional [true, false]

From Name

string | optional

Subject

string | optional

Bcc Request Email

string | optional

Is Audio Only

boolean | optional [true, false]

Disable Player

boolean | optional [true, false]

Banner Slider Resources

string | optional

Banner Type

string | optional [banner_image, featured_resources_slider]

Default Tab Selection

string | optional [resources, about]

Enable Resource Search

boolean | optional [true, false]

Search Resource Placeholder

string | optional

Enable Itc Autoscroll

boolean | optional [true, false]

Card Image

file | optional

Enable Alternative Playback

boolean | optional [true, false]

Default Thumb

file | optional

Enable Default Thumb

boolean | optional [true, false]

GET /api/v1/collections/{collection_id}/metadata

/api/v1/collections/{collection_id}/metadata

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Collection Id

collection_id

Response Type

N/A

GET /api/v1/collections/{collection_id}/resources

/api/v1/collections/{collection_id}/resources

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

ID of your organization

Page Number

Starts with 1

Page Size

Max limit is 100

Collection Id

ID of your collection

Response Type

N/A

Imports (3)

GET /api/v1/imports

/api/v1/imports

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Response Type

N/A

POST /api/v1/imports

/api/v1/imports

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Response Type

N/A

Options (10)

Option Name

Description

Collection Id

N/A

Import Type

N/A

Status

N/A

New Collection Name

N/A

Resource File

N/A

Media File

N/A

Transcript File

N/A

Index File

N/A

Zip File

N/A

Title

N/A

GET /api/v1/imports/{id}

/api/v1/imports/{id}

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Id

collection_id

Response Type

N/A

Indexes (4)

POST /api/v1/indexes

/api/v1/indexes

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Response Type

N/A

Options (9)

Option Name

Description

Language

N/A

Title

N/A

Is Public

N/A

Associated File

N/A

Resource File Id

Media ID

Is Aes60 Xml

N/A

Remove Title

N/A

Description

N/A

Metadata

N/A

DELETE /api/v1/indexes/{id}

/api/v1/indexes/{id}

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Id

index_id

Response Type

N/A

GET /api/v1/indexes/{id}

/api/v1/indexes/{id}

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Id

index_id

Response Type

N/A

PUT /api/v1/indexes/{id}

/api/v1/indexes/{id}

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Id

index_id

Response Type

N/A

Options (5)

Option Name

Description

Language

N/A

Is Public

N/A

Description

N/A

Title

N/A

Is Aes60 Xml

N/A

Media (Importing via pre-signed URL) (3)

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

/api/v1/media_files/{id}/complete

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

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Id

media_file_id

Response Type

N/A

POST Upload a new media file for a resource

/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

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

ID of your organization

Response Type

N/A

Options (17)

Option Name

Description

Collection Resource Id

N/A

Access

N/A

Is 360

N/A

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

PUT https://aviary-odin-weareavp.s3.wasabisys.com/collection_resource_files/resource_files/000/000/335/original/1668480870_PS549C3S62004vx_AM_01_01.mp4

https://aviary-odin-weareavp.s3.wasabisys.com/collection_resource_files/resource_files/000/000/335/original/1668480870_PS549C3S62004vx_AM_01_01.mp4

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Response Type

N/A

Options (6)

Option Name

Description

X-amz-algorithm

N/A

X-amz-credential

N/A

X-amz-date

N/A

X-amz-expires

N/A

X-amz-signedheaders

N/A

X-amz-signature

N/A

Media Files (6)

GET /api/v1/media_files/{id}

/api/v1/media_files/{id}

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Id

media_file_id

Response Type

N/A

PUT /api/v1/media_files/{id}

/api/v1/media_files/{id}

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Id

media_file_id

Response Type

N/A

Options (17)

Option Name

Description

Collection Resource Id

N/A

Access

N/A

Is 360

N/A

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

DELETE Delete media file from your organization resource.

/api/v1/media_files/{id}

Delete media file from your organization resource.

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Id

media_file_id

Response Type

N/A

PUT This will update the media thumbnail.

/api/v1/media_files/{id}/thumbnail

This will update the media thumbnail.

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Id

media_file_id

Response Type

N/A

Options (1)

Option Name

Description

Thumbnail Image

N/A

POST Upload a new media file for a resource

/api/v1/media_files/{id}

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

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Id

media_file_id

Response Type

N/A

Options (17)

Option Name

Description

Collection Resource Id

N/A

Access

N/A

Is 360

N/A

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

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

/api/v1/media_files/{id}/thumbnail

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

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Id

media_file_id

Response Type

N/A

Resources (4)

GET Use GET request to fetch resource data using an existing custom unique identifier. Convert the durations value into hours, minutes, and seconds. total_seconds = 11289.30776 Convert to hours, minutes, seconds hours = int(total_seconds / 3600) minutes = int((total_seconds % 3600) / 60) seconds = int(total_seconds % 60) Format as hh:mm:ss time_formatted = f"{hours:02}:{minutes:02}:{seconds:02}"

/api/v1/resources/{custom_unique_identifier}

Use GET request to fetch resource data using an existing custom unique identifier.

Convert the durations value into hours, minutes, and seconds.

total_seconds = 11289.30776

Convert to hours, minutes, seconds

hours = int(total_seconds / 3600)

minutes = int((total_seconds % 3600) / 60)

seconds = int(total_seconds % 60)

Format as hh:mm:ss

time_formatted = f"{hours:02}:{minutes:02}:{seconds:02}"

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Custom Unique Identifier

custom unique identifier

Response Type

N/A

GET Use GET request to fetch resource data using an existing resource id. Convert the durations value into hours, minutes, and seconds. total_seconds = 11289.30776 Convert to hours, minutes, seconds hours = int(total_seconds / 3600) minutes = int((total_seconds % 3600) / 60) seconds = int(total_seconds % 60) Format as hh:mm:ss time_formatted = f"{hours:02}:{minutes:02}:{seconds:02}"

/api/v1/resources/{resource_id}

Use GET request to fetch resource data using an existing resource id.

Convert the durations value into hours, minutes, and seconds.

total_seconds = 11289.30776

Convert to hours, minutes, seconds

hours = int(total_seconds / 3600)

minutes = int((total_seconds % 3600) / 60)

seconds = int(total_seconds % 60)

Format as hh:mm:ss

time_formatted = f"{hours:02}:{minutes:02}:{seconds:02}"

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Resource Id

resource_id

Response Type

N/A

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

/api/v1/resources

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

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Response Type

N/A

Options (29)

Option Name

Description

Collection Id

N/A

Title

N/A

Access

N/A

Is Featured

N/A

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

PUT Use PUT request to update an existing resource.

/api/v1/resources/{id}

Use PUT request to update an existing resource.

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Id

id

Response Type

N/A

Options (3)

Option Name

Description

Title

N/A

Access

N/A

Is Featured

N/A

Supplemental Files (4)

POST /api/v1/supplemental_files

/api/v1/supplemental_files

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Response Type

N/A

Options (5)

Option Name

Description

Title

N/A

Access

N/A

Description

N/A

Collection Resource Id

Resource ID

Associated File

N/A

DELETE /api/v1/supplemental_files/{id}

/api/v1/supplemental_files/{id}

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Id

supplemental_id

Response Type

N/A

GET /api/v1/supplemental_files/{id}

/api/v1/supplemental_files/{id}

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Id

supplemental_id

Response Type

N/A

PUT /api/v1/supplemental_files/{id}

/api/v1/supplemental_files/{id}

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Id

supplemental_id

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

Transcripts (4)

POST /api/v1/transcripts

/api/v1/transcripts

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Response Type

N/A

Options (9)

Option Name

Description

Is Caption

N/A

Language

N/A

Title

N/A

Is Public

N/A

Associated File

N/A

Resource File Id

Media ID

Remove Title

N/A

Description

N/A

Is Downloadable

N/A

GET /api/v1/transcripts/{id}

/api/v1/transcripts/{id}

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Id

transcript_id

Response Type

N/A

DELETE /api/v1/transcripts/{transcript_id}

/api/v1/transcripts/{transcript_id}

Parameters

Parameter Name

Description

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Transcript Id

transcript_id

Response Type

N/A

PUT /api/v1/transcripts/{transcript_id}

/api/v1/transcripts/{transcript_id}

Parameters

Parameter Name

Description

Content Type

N/A

headers

N/A

headers.Header Key

N/A

headers.Header Value

N/A

queryParams

N/A

queryParams.Query Param Key

N/A

queryParams.Query Param Value

N/A

Organization-id

Id of your organization

Transcript Id

transcript_id

Response Type

N/A

Options (4)

Option Name

Description

Is Caption

N/A

Resource File Id

N/A

Description

N/A

Is Downloadable

N/A