Create a playback ID

POST /assets/{assetId}/playback-ids

Creates a playback ID that could be used to stream the video asset to a viewer.

Path parameters

  • assetId string(uuid) Required

    pass asset id

application/json

Body

Request body for creating playback id for an asset

  • accessPolicy string Required

    Determines if access to the streamed content is kept private or available to all.

Responses

  • 201 application/json

    Playback id for an asset

    Hide response attributes Show response attributes object
    • success boolean

      It demonstrates either the request is successfull or not.

    • data object
      Hide data attributes Show data attributes
  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • success boolean
    • error object
      Hide error attributes Show error attributes
      • code number

        It demonstrates either the request is successfull or not.

      • message string

        It demonstrates the cause of the error.

  • 404 application/json

    Asset Not Found

    Hide response attributes Show response attributes object
    • success boolean

      It demonstrates either the request is successfull or not.

    • error object
      Hide error attributes Show error attributes
      • code number

        It demonstrates either the request is successfull or not.

      • message string

        It demonstrates the cause of the error.

  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • success boolean

      It demonstrates either the request is successfull or not.

    • error object
      Hide error attributes Show error attributes
      • code integer

        Displays the status code of the error.

      • message string

        It demonstrates the cause of the error.

  • 422 application/json

    Payload Validation Failed

    Hide response attributes Show response attributes object
    • success boolean Required

      It demonstrates either the request is successfull or not.

    • error object Required
      Hide error attributes Show error attributes
      • code integer Required

        Displays the status code of the error.

      • message string Required

        It demonstrates the cause of the error.

      • fields array[object] Required
        Hide fields attributes Show fields attributes object
        • field string

          Shows the field name related to the error.

        • message string

          Shows why the error occur.

POST /assets/{assetId}/playback-ids
curl \
 -X POST https://api.fastpix.io/v1/video/assets/{"availableValue"=>"dbb8a39a-e4a5-4120-9f22-22f603f1446e"}/playback-ids \
 --user "username:password" \
 -H "Content-Type: application/json" \
 -d '{"accessPolicy":"public"}'
Request example
{
  "accessPolicy": "public"
}
Response examples (201)
{
  "success": true,
  "data": {
    "accessPolicy": "private",
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  }
}
Response examples (400)
{
  "success": false,
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}
Response examples (404)
{
  "success": false,
  "error": {
    "code": 404,
    "message": "Asset Not Found"
  }
}
Response examples (401)
{
  "success": false,
  "error": {
    "code": 401,
    "message": "Unauthorized"
  }
}
Response examples (422)
{
  "success": false,
  "error": {
    "code": 422,
    "message": "payload validation failed",
    "fields": [
      {
        "field": "fieldName",
        "message": "must not be null"
      }
    ]
  }
}