Version 1
Connector Overview: This page documents all 26 endpoints for the Aviaryconnector v1.
GET
Collections: authorizationApiV1collections
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
GET
Complete: authorizationApiV1collectionsresourcesmediagetcompelete
Update the status of media file as complete after successfully uploading to wasabi presigned url.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) resource_id |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
GET
Imports: authorizationApiV1Importsget
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
POST
Imports: authorizationApiV1Importspostid
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
|
|
N/A |
POST
Indexes: authorizationApiV1Indexespost
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
|
|
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 |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
|
|
N/A |
GET
Resources: authorizationApiV1collectionsresources
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) collection_id |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
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 |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
|
|
N/A |
POST
Sign_in: authorizationApiV1AuthSignIn
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
POST
Supplemental_files: authorizationApiV1SupplementalFilespostid
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
|
|
N/A |
GET
Thumbnail: authorizationApiV1collectionsresourcesmediaget
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) resource_id |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
DELETE
Thumbnail: authorizationApiV1collectionsresourcesmediagetthumbnail
this will delete the media thumbnail and place a default aviary thumbnail.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) resource_id |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
POST
Transcripts: authorizationApiV1Transcriptspost
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
|
|
N/A |
GET
{id}: authorizationApiV1Importsgetid
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) collection_id |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
DELETE
{id}: authorizationApiV1Indexesdelete
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) collection_id |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
GET
{id}: authorizationApiV1Indexesget
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) resource_id |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
PUT
{id}: authorizationApiV1Indexesput
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) collection_id |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
|
|
N/A |
DELETE
{id}: authorizationApiV1SupplementalFilesdeleteid
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) collection_id |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
GET
{id}: authorizationApiV1SupplementalFilesgetid
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) collection_id |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
PUT
{id}: authorizationApiV1SupplementalFilespostid
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) collection_id |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
|
|
N/A |
GET
{id}: authorizationApiV1Transcriptsget
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) resource_id |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
DELETE
{id}: authorizationApiV1collectionsresourcesmediadelete
Delete media file from your organization resource.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) resource_id |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
PUT
{id}: authorizationApiV1resourcesput
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) id |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
|
|
N/A |
GET
{resource_id}: authorizationApiV1collectionsresourcesget
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) resource_id |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
DELETE
{transcript_id}: authorizationApiV1Transcriptsdelete
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) collection_id |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
PUT
{transcript_id}: authorizationApiV1Transcriptsput
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
(Required) collection_id |
|
|
(Required) Id of your organization |
|
|
N/A |
|
|
N/A |
|
|
N/A |