GET /api/v2/publishing_channels
Return publishing channels for current user

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Examples

// Successful request
GET /api/v2/publishing_channels
200
{
  "publishing_channels": [
    {
      "id": 1,
      "name": "test_publishing_channel",
      "user_id": 66,
      "config_id": 1,
      "config_type": "FtpConfig",
      "created_at": "2023-11-27T09:42:51.185Z",
      "updated_at": "2023-11-27T09:42:51.185Z",
      "private": false,
      "config": {
        "id": 1,
        "host": "test_ftp_server.com/ftp",
        "username": "test_user",
        "path": "/ftp/folder",
        "created_at": "2023-11-27T09:42:51.159Z",
        "updated_at": "2023-11-27T09:42:51.159Z"
      },
      "users": [],
      "authorized_with": "password"
    }
  ]
}

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters

GET /api/v2/publishing_channels/:publishing_channel_id
Return publishing channel by ID

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Params

Param name Description
publishing_channel_id
required

Publishing channel ID

Validations:

  • Must be a String

Examples

// Successful request
GET /api/v2/publishing_channels/2
200
{
  "publishing_channel": {
    "id": 2,
    "name": "test_publishing_channel",
    "user_id": 67,
    "config_id": 2,
    "config_type": "FtpConfig",
    "created_at": "2023-11-27T09:42:51.341Z",
    "updated_at": "2023-11-27T09:42:51.341Z",
    "private": false,
    "config": {
      "id": 2,
      "host": "test_ftp_server.com/ftp",
      "username": "test_user",
      "path": "/ftp/folder",
      "created_at": "2023-11-27T09:42:51.328Z",
      "updated_at": "2023-11-27T09:42:51.328Z"
    },
    "users": [],
    "authorized_with": "password"
  }
}
// Publishing channel not found
GET /api/v2/publishing_channels/not-found-id
404
{
  "error": "Publishing channel not found"
}

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters

POST /api/v2/publishing_channels/:publishing_channel_id/share
Share to publishing channel

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Params

Param name Description
share_params
required

Parameters for sharing

Validations:

  • Must be a Hash

Examples

// Successful request
POST /api/v2/publishing_channels/3/share
{
  "share_params": {
    "assetId": "5PxQ0o09AKMnNArmE6xH",
    "filename": "qprRc3wBx_jIS9u7SRcE_publish.mp4",
    "s3_key": "media/qprRc3wBx_jIS9u7SRcE/qprRc3wBx_jIS9u7SRcE_publish.mp4",
    "title": "small.mp4",
    "description": "small.mp4",
    "tags": []
  }
}
200
{
  "ok": "ok"
}
// When trying to share media type the channel does not support
POST /api/v2/publishing_channels/4/share
{
  "share_params": {
    "assetId": "GkCgAnxobt5gKGFzeqR4",
    "filename": "qprRc3wBx_jIS9u7SRcE_publish.mp4",
    "s3_key": "media/qprRc3wBx_jIS9u7SRcE/qprRc3wBx_jIS9u7SRcE_publish.mp4",
    "title": "small.mp4",
    "description": "small.mp4",
    "tags": []
  }
}
422
{
  "error": "Media type must be [\"audio\", \"video\", \"image\", \"other\"] for this channel type"
}
// Publishing channel does not exist
POST /api/v2/publishing_channels/1337/share
{
  "share_params": {
    "assetId": "EJA9N_Y_cK3gbwRNIhmi",
    "filename": "qprRc3wBx_jIS9u7SRcE_publish.mp4",
    "s3_key": "media/qprRc3wBx_jIS9u7SRcE/qprRc3wBx_jIS9u7SRcE_publish.mp4",
    "title": "small.mp4",
    "description": "small.mp4",
    "tags": []
  }
}
404
{
  "error": "Publishing channel not found"
}

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters

POST /api/v2/admin/publishing_channels/aspera
Create Aspera publishing channel

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Params

Param name Description
name
required

Publishing channel name

Validations:

  • Must be a String

private
optional

Is channel private

Validations:

  • Must be one of: true, false.

users
optional

User ID

Validations:

  • Must be an array of Integer

config
required

Configuration for the channel

Validations:

  • Must be a Hash

config[host]
required

Host address

Validations:

  • Must be a String

config[port]
required

Port for the ASCP connection

Validations:

  • Must be a String

config[username]
required

Username for the ASCP connection

Validations:

  • Must be a String

config[password]
optional

Password for the ASCP connection

Validations:

  • Must be a String

config[pkey]
optional

Private key for the ASCP connection

Validations:

  • Must be a String

config[path]
required

Path at ASCP host

Validations:

  • Must be a String

config[create_folder]
optional

Option, create folder if does not exist

Validations:

  • Must be one of: true, false.

config[overwrite_behaviour]
optional

Option, file overwrite behaviour

Validations:

  • Must be one of: default, older, never.

config[required_segments]
optional

Option, required string segments

Validations:

  • Must be an array of String

config[excluded_segments]
optional

Option, forbidden string segments

Validations:

  • Must be an array of String

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters

POST /api/v2/admin/publishing_channels/ftp
Create FTP publishing channel

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Params

Param name Description
name
required

Publishing channel name

Validations:

  • Must be a String

private
optional

Is channel private

Validations:

  • Must be one of: true, false.

users
optional

User ID

Validations:

  • Must be an array of Integer

config
required

Configuration for the channel

Validations:

  • Must be a Hash

config[host]
required

Host address

Validations:

  • Must be a String

config[username]
required

Username for FTP connection

Validations:

  • Must be a String

config[password]
required

Password for FTP connection

Validations:

  • Must be a String

config[path]
required

Path at FTP host

Validations:

  • Must be a String

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters

POST /api/v2/admin/publishing_channels/scp
Create SCP publishing channel

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Params

Param name Description
name
required

Publishing channel name

Validations:

  • Must be a String

private
optional

Is channel private

Validations:

  • Must be one of: true, false.

users
optional

User ID

Validations:

  • Must be an array of Integer

config
required

Configuration for the channel

Validations:

  • Must be a Hash

config[host]
required

Host address

Validations:

  • Must be a String

config[username]
required

Username for SCP connection

Validations:

  • Must be a String

config[password]
optional

Password for SCP connection

Validations:

  • Must be a String

config[pkey]
optional

Private key for the SCP

Validations:

  • Must be a String

config[path]
required

Path at SCP host

Validations:

  • Must be a String

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters

POST /api/v2/admin/publishing_channels/aws_s3
Create AWS S3 publishing channel

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Params

Param name Description
name
required

Publishing channel name

Validations:

  • Must be a String

private
optional

Is channel private

Validations:

  • Must be one of: true, false.

users
optional

User ID

Validations:

  • Must be an array of Integer

config
required

Configuration for the channel

Validations:

  • Must be a Hash

config[aws_access_key_id]
required

AWS S3 Access key ID

Validations:

  • Must be a String

config[aws_secret_access_key]
required

AWS S3 secret access key

Validations:

  • Must be a String

config[bucket_name]
required

AWS S3 Bucket

Validations:

  • Must be a String

config[region_name]
required

AWS Region name

Validations:

  • Must be a String

config[endpoint_url]
required

URL for the AWS S3 bucket

Validations:

  • Must be a String

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters

POST /api/v2/admin/publishing_channels/azure_blob
Create Azure Blob publishing channel

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Params

Param name Description
name
required

Publishing channel name

Validations:

  • Must be a String

private
optional

Is channel private

Validations:

  • Must be one of: true, false.

users
optional

User ID

Validations:

  • Must be an array of Integer

config
required

Configuration for the channel

Validations:

  • Must be a Hash

config[azure_account_name]
required

Azure Blob account name

Validations:

  • Must be a String

config[azure_container_name]
required

Azure Blob container name

Validations:

  • Must be a String

config[azure_access_key]
required

Azure Blob access key

Validations:

  • Must be a String

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters

POST /api/v2/admin/publishing_channels/:publishing_channel_id
Update publishing channel

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Params

Param name Description
name
required

Publishing channel name

Validations:

  • Must be a String

private
optional

Is channel private

Validations:

  • Must be one of: true, false.

users
optional

User ID

Validations:

  • Must be an array of Integer

config_type
required

Type of the publishing channel

Validations:

  • Must be one of: FtpConfig, AsperaConfig, ScpConfig, S3Config, AzureBlobConfig.

config
required

Configuration for publishing channel

Validations:

  • Must be a Hash

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters

DELETE /api/v2/admin/publishing_channels/:publishing_channel_id
Delete publishing channel

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters