NAV Navbar
Logo
cURL
  • Introduction
  • Authentication
  • User Management
  • Video
  • Category
  • Storage
  • Live Streaming
  • Callback
  • Analytic
  • Embed Metadata
  • Errors Code
  • Change log
  • Introduction

    Example Response

    {
        "data": {},
        "version": 3,
        "datetime": "2018-06-22T17:53:42.576Z",
        "policy": "public",
        "requestId": "f7cbd3d3-786b-4178-9a2d-13c5b6b7c2d5",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    This website documents the public API for Uiza version 3.0

    You can view code examples in the dark area to the right; switch the programming language of the examples with the tabs in the top right (coming soon).

    The Uiza API is organized around RESTful standard. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. JSON is returned by all API responses, including errors, although our API libraries convert responses to appropriate language-specific objects.

    All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

    Global format APIs

    This is format for all response of API. <requestId> should be included in your email or your chat for faster support from Uiza.

    Parameter Type Description
    data Object Array (multiple items) or object (single item)
    version Number Version of APIs
    datetime Datetime Response time of API (GTM+0)
    policy String Type of calling method (public)
    requestId String Response ID of request
    serviceName String Name of services
    message String Message response
    code Number Code of Status Response
    type String API's result

    Authentication

    In order, to use the Uiza, you should follow these steps:

    Step 1: Having an active Uiza account. (If you don't have, please get here)

    Step 2: Once you have an Uiza account, you can get a Token to call the APIs.

    This Token will have right & permission related with your account.

    Get API key

    After login to your workspace, you can get your own API key in the APPLICATION SETTING section

    Go to APPLICATION SETTING, section Publish API

    alt text

    Then you can create your own API key.

    alt text

    alt text

    This key used for calling Uiza's API.

    User Management

    You can manage user with APIs user. Uiza have 2 levels of user

    Admin - This account will have the highest priority, can have permission to create & manage users.

    User - This account level is under Admin level. It only manages APIs that relates to this account.

    Create an user

    Example Request

    curl -X POST \
      https://#{workspace_api_domain}/api/public/v3/admin/user \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "status":1,
        "username":"user_test",
        "email":"user_test@uiza.io",
        "fullname":"User Test",
        "avatar":"https://exemple.com/avatar.jpeg",
        "dob":"05/15/2018",
        "gender":0,
        "password":"FMpsr<4[dGPu?B#u",
        "isAdmin":1
    }'
    

    Create an user account for workspace

    Example Response

    {
        "data": {
            "id": "37d6706e-be91-463e-b3b3-b69451dd4752"
        },
        "version": 3,
        "datetime": "2018-06-22T18:05:47.676Z",
        "policy": "public",
        "requestId": "8b0dfeed-18b6-47e6-8e18-274968c7e94b",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    POST https://#{workspace_api_domain}/api/public/v3/admin/user

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    status integer Status of account ( 0 = de-active, 1 = active) Yes
    username string Username of account (used for login instead of email) Yes
    email string Email (used for login instead of username) Yes
    password text Password (from A to x , 6 to 25 characters) Yes
    avatar string Link of avatar ( suggest 300x300)
    fullname string Full name of user
    dob date Date of birth (MM/DD/YYYY)
    gender integer Gender ( 0 = Male, 1 = Female)
    isAdmin integer Set this account isAdmin or not (0 = Yes, 1 = No)

    Response Parameters

    Parameter Type Description
    id string Identifier of user has been created

    Retrieve an user

    Example Request

    curl -X GET \
      https://#{workspace_api_domain}/api/public/v3/admin/user?id=37d6706e-be91-463e-b3b3-b69451dd4752 \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
    

    Retrieves the details of an existing user. You need only supply the unique userId that was returned upon user creation.

    Example Response

    {
        "data": [
          {
              "id": "37d6706e-be91-463e-b3b3-b69451dd4752",
              "isAdmin": 1,
              "username": "user_test",
              "email": "user_test@uiza.io",
              "updatedAt": "2018-06-22T18:05:47.000Z",
              "createdAt": "2018-06-22T18:05:47.000Z"
          },
          {
              "id": "2c98b4d5-7d7f-4a0f-9258-5689f90fd28c",
              "isAdmin": 1,
              "username": "user_test",
              "email": "user_test@uiza.io",
              "updatedAt": "2018-06-22T18:05:47.000Z",
              "createdAt": "2018-06-22T18:05:47.000Z"
          },
        ],
        "version": 3,
        "datetime": "2018-06-22T18:20:46.780Z",
        "policy": "public",
        "requestId": "428bb8be-0e42-4b62-89e9-ac45b5e3d050",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    GET https://#{workspace_api_domain}/api/public/v3/admin/user

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id string Identifier of user Yes

    Response Parameters

    Parameter Type Description
    id string Identifier of user
    isAdmin number Determine role admin of user (0 = Yes, 1 = No)
    username string Username of account (used for login instead of email)
    email string Email (used for login instead of username)
    createdAt datetime Time created user
    updatedAt datetime Last edited time of user

    List all users

    Example Request

    curl -X GET \
      https://#{workspace_api_domain}/api/public/v3/admin/user \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
    

    Returns a list of your user. The users are returned sorted by creation date, with the most recent user appearing first.

    If you use Admin token, you will get all the user. If you use User token, you can only get the information of that user

    Example Response

    {
        "data": [
            {
                "id": "1a95f752-19e0-4a2e-9951-6d1fc0adbeaf",
                "isAdmin": 0,
                "username": "user_test",
                "email": "user_test@uiza.io",
                "updatedAt": "2018-06-22T02:31:14.000Z",
                "createdAt": "2018-06-22T02:31:14.000Z"
            },
            {
                "id": "95c1229a-73e6-4ef7-98eb-e64a765c32d5",
                "isAdmin": 1,
                "username": "user_admin",
                "email": "user_admin@uiza.io",
                "updatedAt": "2018-06-22T00:00:00.000Z",
                "createdAt": "2018-06-22T02:32:29.000Z"
            }
        ],
        "metadata": {
            "total": 2,
            "result": 2,
            "page": 1,
            "limit": 20
        },
        "version": 3,
        "datetime": "2018-06-22T19:34:51.363Z",
        "policy": "public",
        "requestId": "7921f7fe-e086-4455-9ef7-fb5f1c8c2b20",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    GET https://#{workspace_api_domain}/api/public/v3/admin/user

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Response Parameters

    Parameter Type Description
    id string Identifier of user
    isAdmin integer Set this account isAdmin or not (0 = Yes, 1 = No)
    username string Username of account (used for login instead of email)
    email string Email (used for login instead of username)
    createdAt datetime Time created user
    updatedAt datetime Last edited time of user

    Update an user

    Example Request

    curl -X PUT \
      https://#{workspace_api_domain}/api/public/v3/admin/user \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "id":"37d6706e-be91-463e-b3b3-b69451dd4752",
        "status":0,
        "username":"user_test",
        "email":"user_test@uiza.io",
        "avatar":"https://exemple.com/avatar.jpeg",
        "fullname":"User Test",
        "dob":"05/15/2018",
        "gender":0,
        "password":"123456789",
        "isAdmin":1
    }'
    

    Updates the specified user by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

    Example Response

    {
        "data": {
            "id": "37d6706e-be91-463e-b3b3-b69451dd4752",
            "isAdmin": 1,
            "username": "user_test",
            "email": "user_test@uiza.io",
            "updatedAt": "2018-06-22T00:00:00.000Z",
            "createdAt": "2018-06-22T18:05:47.000Z"
        },
        "version": 3,
        "datetime": "2018-06-22T18:27:24.882Z",
        "policy": "public",
        "requestId": "5b7c0a49-427c-49e8-b112-820b49217a22",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    PUT https://#{workspace_api_domain}/api/public/v3/admin/user

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id string Identifier of user wanted to update Yes
    status integer Status of account ( 0 = de-active, 1 = active) Yes
    username string Username of account (used for login instead of email) Yes
    email string Email (used for login instead of username) Yes
    password text Password (from a to Z, 6 to 25 characters) Yes
    avatar string Link of avatar (suggest 300x300)
    fullname string Full name of user
    dob date Date of birth (MM/DD/YYYY)
    gender integer Gender ( 0 = Male, 1 = Female)
    isAdmin integer Set this account isAdmin or not (0 = Yes, 1 = No)

    Response Parameters

    Parameter Type Description
    id string Identifier of user has been updated

    Delete an user

    Example Request

    curl -X DELETE \
      https://#{workspace_api_domain}/api/public/v3/admin/user \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
          "id":"2c98b4d5-7d7f-4a0f-9258-5689f90fd28c"
    }'
    

    Permanently deletes an user. It cannot be undone. Also immediately cancels all token & information of this user.

    Example Response

    {
        "data": {
            "id": "2c98b4d5-7d7f-4a0f-9258-5689f90fd28c"
        },
        "version": 3,
        "datetime": "2018-06-13T16:27:06.917Z",
        "policy": "public",
        "requestId": "b2997244-3579-4898-86ae-c0395c2db1ee",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    DELETE https://#{workspace_api_domain}/api/public/v3/admin/user

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id integer Identifier of user want to delete Yes

    Response Parameters

    Parameter Type Description
    id string Identifier of user has been deleted

    Update password

    Example Request

    curl -X POST \
      https://#{workspace_api_domain}//api/public/v3/admin/user/changepassword \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "id":"2c98b4d5-7d7f-4a0f-9258-5689f90fd28c",
        "oldPassword":"FMpsr<4[dGPu?B#u",
        "newPassword":"S57Eb{:aMZhW=)G$"
    }'
    

    Update password allows Admin or User update their current password.

    Example Response

    {
        "data": {
            "id":"2c98b4d5-7d7f-4a0f-9258-5689f90fd28c"
        },
        "version": 3,
        "datetime": "2018-06-22T16:27:06.917Z",
        "policy": "public",
        "requestId": "b2997244-3579-4898-86ae-c0395c2db1ee",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    PUT https://#{workspace_api_domain}//api/public/v3/admin/user/changepassword

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    oldPassword string Current password Yes
    newPassword string New password (from a to Z, 6 to 25 characters) Yes
    id string Identifier of user need reset password
    If API-key belong to Admin, input ID of user that you want to reset password. In case API-key belong to normal user, this field isn't require.
    Yes

    Response Parameters

    Parameter Type Description
    id string Identifier of user has been reset password

    Log Out

    Example Request

    curl -X POST \
      https://#{workspace_api_domain}/api/public/v3/admin/user/logout \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
    

    This API use to log out an user. After logged out, token will be removed.

    Example Response

    {
        "data": {
            "message": "Logout success"
        },
        "version": 3,
        "datetime": "2018-06-22T19:03:47.686Z",
        "policy": "public",
        "requestId": "187f008e-92ce-4f7b-a7ba-00308ad0c69c",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    POST https://#{workspace_api_domain}/api/public/v3/admin/user/logout

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Response Parameters

    Parameter Type Description
    message string

    Video

    These below APIs used to take action with your media files (we called Entity)

    Create entity

    Example Request

    curl -X POST \
      https://#{workspace_api_domain}/api/public/v3/media/entity \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "name": "Sample Video",
        "url": "https://example.com/video.mp4",
        "inputType": "http",
        "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry'\''s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
        "shortDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
        "poster": "https://example.com/picture001.jpeg",
        "thumbnail": "https://example.com/picture002.jpeg",
        "extendMetadata": {
            "movie_category":"action",
            "imdb_score":8.8,
            "published_year":"2018"
        },
        "embedMetadata": {
            "artist":"John Doe",
            "album":"Album sample",
            "genre":"Pop"
        },
        "metadataIds":["16a9e425-efb0-4360-bd92-8d49da111e88"]
    }'
    

    Create entity using full URL. Direct HTTP, FTP or AWS S3 link are acceptable.

    Example Response

    {
        "data": {
            "id": "8b83886e-9cc3-4eab-9258-ebb16c0c73de"
        },
        "version": 3,
        "datetime": "2018-06-15T18:52:45.755Z",
        "policy": "public",
        "requestId": "a27c393d-c90d-44a0-9d44-4d493647889a",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    POST https://#{workspace_api_domain}/api/public/v3/media/entity

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    name string Name of entity Yes
    url text Full URL of media file (direct public HTTP/HTTPS, FTP, AWS S3 acceptable). Send empty string in case of integration using SDK upload to AWS Yes
    inputType enum Type of URL (Allowed value: [ http, s3, ftp, s3-uiza ] ). In case url is empty string, this must be s3-uiza Yes
    description text Full description for entity (without max-length)
    metadataId array Add relation between entity and folder/playlist
    shortDescription text Short description of entity (250 characters)
    poster string Poster of entity
    thumbnail string Thumbnail of entity
    metadataIds array List of category will be attached with entity
    extendMetadata object Additional information of entity
    You can input additional information of entity by using [ key : value ] format. All information will show in entity detail.
    embedMetadata object See Embed Metadata for more information

    Response Parameters

    Parameter Type Description
    id string Identifier of entity has been created

    Retrieve an entity

    Example Request

    curl -X GET \
      https://#{workspace_api_domain}/api/public/v3/media/entity?id=16ab25d3-fd0f-4568-8aa0-0339bbfd674f \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "id": "16ab25d3-fd0f-4568-8aa0-0339bbfd674f",
    }'
    

    Get detail of entity including all information of entity

    Example Response

    {
        "data": {
            "id": "16ab25d3-fd0f-4568-8aa0-0339bbfd674f",
            "name": "Sample Video",
            "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
            "shortDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
            "view": 0,
            "poster": "https://example.com/picture001",
            "thumbnail": "https://example.com/picture002",
            "type": "vod",
            "status": 1,
            "duration": "237.865215",
            "publishToCdn":"success",
            "embedMetadata": {
                "artist": "John Doe",
                "album": "Album sample",
                "genre": "Pop"
            },
            "extendMetadata": {
                "movie_category":"action",
                "imdb_score":8.8,
                "published_year":"2018"
            },
            "createdAt": "2018-06-16T18:54:15.000Z",
            "updatedAt": "2018-06-16T18:54:29.000Z"
        },
        "version": 3,
        "datetime": "2018-06-16T18:56:10.713Z",
        "policy": "public",
        "requestId": "dd1a5a4a-9afc-4575-966b-21078b8bb7f0",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    GET https://#{workspace_api_domain}/api/public/v3/media/entity?id=16ab25d3-fd0f-4568-8aa0-0339bbfd674f

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id string Identifier of entity Yes

    Response Parameters

    Parameter Type Description
    id string Identifier of entity
    name string Name of entity
    description string Full description for entity (without max-length)
    shortDescription string Short description of entity (250 characters)
    view number Total view of entity
    poster string Poster of entity
    thumbnail string Thumbnail of entity
    type enum Has 2 types: VOD and AOD
    VOD stand for Video on demand. AOD stand for Audio on demand.
    duration string Duration of entity in seconds
    publishToCdn string Status of publish task, include [ queue, not-ready, success, failed ]
    embedMetadata object See Embed Metadata for more information
    extendData object Additional information of entity that already input while creating entity
    createdAt datetime Time created entity
    updatedAt datetime Last edited time of entity

    List all entities

    Example Request

    curl -X GET \
      https://#{workspace_api_domain}/api/public/v3/media/entity' \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
    

    Get list of entities including all detail.

    Example Response

    {
        "data": [
            {
                "id": "42ceb1ab-18ef-4f2e-b076-14299756d182",
                "name": "Sample Video 1",
                "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
                "shortDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
                "view": 0,
                "poster": "https://example.com/picture001",
                "thumbnail": "https://example.com/picture002",
                "type": "vod",
                "duration": "237.865215",
                "publishToCdn":"success",
                "embedMetadata": {
                    "artist": "John Doe",
                    "album": "Album sample",
                    "genre": "Pop"
                },
                "extendMetadata": {
                    "movie_category":"action",  
                    "imdb_score":8.8,
                    "published_year":"2018"
                },
                "createdAt": "2018-06-22T19:20:17.000Z",
                "updatedAt": "2018-06-22T19:20:17.000Z"
            },
            {
                "id": "64b15996-2261-4f41-a3c4-72b652323f67",
                "name": "Sample Video 2",
                "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
                "shortDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
                "view": 0,
                "poster": "https://example.com/picture001",
                "thumbnail": "https://example.com/picture002",
                "type": "vod",
                "duration": "178.178105",
                "publishToCdn":"success",
                "embedMetadata": {
                    "artist": "John Doe",
                    "album": "Album sample",
                    "genre": "Pop"
                },
                "extendMetadata": {
                    "movie_category":"action",
                    "imdb_score":8.8,
                    "published_year":"2018"
                },
                "createdAt": "2018-06-22T19:16:22.000Z",
                "updatedAt": "2018-06-22T19:16:22.000Z"
            }
        ],
        "metadata": {
            "total": 2,
            "result": 2,
            "page": 1,
            "limit": 20
        },
        "version": 3,
        "datetime": "2018-06-22T19:20:19.536Z",
        "policy": "public",
        "requestId": "beac9674-9d87-49eb-9ded-3b8ddc258044",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    GET https://#{workspace_api_domain}/api/public/v3/media/entity

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    publishToCdn string Status of publish task, include [ queue, not-ready, success, failed ] No
    metadataId string Get all entity in folder/playlist No

    Response Parameters

    Parameter Type Description
    id string Identifier of entity
    name string Name of entity
    description string Full description for entity (without max-length)
    shortDescription string Short description of entity (250 characters)
    view number Total view of entity
    poster string Poster of entity
    thumbnail string Thumbnail of entity
    type enum Has 2 types: VOD and AOD
    VOD stand for Video on demand. AOD stand for Audio on demand.
    duration string Duration of entity in seconds
    publishToCdn string Status of publish task, include [ queue, not-ready, success, failed ]
    embedMetadata object See Embed Metadata for more information
    extendData object Additional information of entity that already input while creating entity
    createdAt datetime Time created entity
    updatedAt datetime Last edited time of entity

    Update an entity

    Example Request

    curl -X PUT \
      https://#{workspace_api_domain}/api/public/v3/media/entity \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "id": "dd934a87-3342-41fa-8cdf-6381b6d92105",
        "name": "Title edited",
        "description": "Description edited",
        "shortDescription":"001 Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
        "poster":"/example.com/picture001a",
        "thumbnail":"/example.com/picture001a",
        "extendMetadata":{
            "movie_category":"action",
            "imdb_score":8.8,
            "published_year":"2018"
        }
    }'
    

    Update entity's information.

    Example Response

    {
        "data": {
            "id": "dd934a87-3342-41fa-8cdf-6381b6d92105"
        },
        "version": 3,
        "datetime": "2018-06-15T18:52:45.755Z",
        "policy": "public",
        "requestId": "0201d964-2e57-4577-9d2c-692ec8b02f88",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    PUT https://#{workspace_api_domain}/api/public/v3/media/entity

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id string Identifier of entity Yes
    name string Name of entity
    description text Full description for entity (without max-length)
    shortDescription text Short description of entity (250 characters)
    poster string Poster of entity
    thumbnail string Thumbnail of entity
    extendMetadata object Additional information of entity
    You can input additional information of entity by using [ key : value ] format. All information will show in entity detail.

    Response Parameters

    Parameter Type Description
    id string Identifier of entity has been updated

    Delete an entity

    Example Request

    curl -X DELETE \
      https://#{workspace_api_domain}/api/public/v3/media/entity \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "id": "16ab25d3-fd0f-4568-8aa0-0339bbfd674f",
    }'
    

    Delete entity

    Example Response

    {
        "data": {
            "id": "16ab25d3-fd0f-4568-8aa0-0339bbfd674f"
          },
        "version": 3,
        "datetime": "2018-06-16T18:56:10.713Z",
        "policy": "public",
        "requestId": "1ca5329c-08a7-4301-bddf-71f466363ff2",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    DELETE https://#{workspace_api_domain}/api/public/v3/media/entity

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id string Identifier of entity Yes

    Response Parameters

    Parameter Type Description
    id string Identifier of entity has been deleted

    Search entity

    Example Request

    curl -X GET \
      https://#{workspace_api_domain}/api/public/v3/media/entity/search?keyword=sample \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
    

    Search entity base on keyword entered

    Example Response

    {
        "data": [
          {
              "id": "16ab25d3-fd0f-4568-8aa0-0339bbfd674f",
              "name": "Sample Video 001",
              "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
              "shortDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
              "view": 0,
              "poster": "https://example.com/picture001",
              "thumbnail": "https://example.com/picture002",
              "type": "vod",
              "status": 1,
              "duration": "237.865215",
              "publishToCdn":"success",
              "embedMetadata": {
                  "artist": "John Doe",
                  "album": "Album sample",
                  "genre": "Pop"
              },
              "extendMetadata": {
                  "movie_category":"action",
                  "imdb_score":8.8,
                  "published_year":"2018"
              },
              "createdAt": "2018-06-16T18:54:15.000Z",
              "updatedAt": "2018-06-16T18:54:29.000Z"
          },
          {
              "id": "16ab25d3-fd0f-4568-8aa0-0339bbfd674f",
              "name": "Sample video test",
              "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
              "shortDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
              "view": 0,
              "poster": "https://example.com/picture003",
              "thumbnail": "https://example.com/picture004",
              "type": "vod",
              "status": 1,
              "duration": "178.178105",
              "publishToCdn":"success",
              "embedMetadata": {
                  "artist": "Jane Roe",
                  "album": "Album global 3",
                  "genre": "Country"
              },
              "extendMetadata": {
                  "movie_category":"action",
                  "imdb_score":8.8,
                  "published_year":"2018"
              },
              "createdAt": "2018-06-16T18:54:15.000Z",
              "updatedAt": "2018-06-16T18:54:29.000Z"
          }
        ],
        "metadata": {
                "total": 2,
                "result": 2,
                "page": 1,
                "limit": 20
            },
        "version": 3,
        "datetime": "2018-06-16T18:56:10.713Z",
        "policy": "public",
        "requestId": "ac92133c-c196-4cb3-bc55-776236d4ab13",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    GET https://#{workspace_api_domain}/api/public/v3/media/entity/search

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    keyword string Keyword for search entity Yes

    Response Parameters

    Parameter Type Description
    id string Identifier of entity
    name string Name of entity
    description string Full description for entity (without max-length)
    shortDescription string Short description of entity (250 characters)
    view number Total view of entity
    poster string Poster of entity
    thumbnail string Thumbnail of entity
    type enum Has 2 types: VOD and AOD
    VOD stand for Video. AOD stand for Audio.
    status number Status of entity
    duration string Duration of entity in seconds
    publishToCdn string Status of publish task, include [ queue, not-ready, success, failed ]
    embedMetadata object See Embed Metadata for more information
    extendData object Additional information of entity that already input while creating entity
    createdAt datetime Time created entity
    updatedAt datetime Last edited time of entity

    Publish entity to CDN

    Example Request

    curl -X POST \
      https://#{workspace_api_domain}/api/public/v3/media/entity/publish \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "id":"16ab25d3-fd0f-4568-8aa0-0339bbfd674f"
    }'
    

    Publish entity to CDN, use for streaming

    Example Response

    {
        "data": {
            "id": "16ab25d3-fd0f-4568-8aa0-0339bbfd674f",
            "message": "Your entity started publish, check process status with this entity ID",
            "entityId": "42ceb1ab-18ef-4f2e-b076-14299756d182"
        },
        "version": 3,
        "datetime": "2018-06-22T19:30:58.896Z",
        "policy": "public",
        "requestId": "10a495a7-20f4-4efd-ac98-913889b56944",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    POST https://#{workspace_api_domain}/api/public/v3/media/entity/publish

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id string Identifier of entity Yes

    Response Parameters

    Parameter Type Description
    id string Identifier of task publish
    message string Notification about publish status
    entityId string Identifier of entity

    Get status publish

    Example Request

    curl -X GET \
      https://#{workspace_api_domain}/api/public/v3/media/entity/publish/status?id=16ab25d3-fd0f-4568-8aa0-0339bbfd674f \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
    

    Publish entity to CDN, use for streaming

    Example Response

    {
        "data": {
            "progress": 0,
            "status": "processing"
        },
        "version": 3,
        "datetime": "2018-06-22T19:32:39.986Z",
        "policy": "public",
        "requestId": "70d462bd-4a2d-4b38-8bbe-3578e91ead08",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    GET https://#{workspace_api_domain}/api/public/v3/media/entity/publish

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    entityId string Identifier of entity Yes

    Response Parameters

    Parameter Type Description
    progress number Progress of task publish, will be success when reach 100
    status string Status of task publish (processing, success, error)

    Get AWS upload key

    Example Request

    curl -X GET \
      https://#{workspace_api_domain}/api/public/v3/admin/app/config/aws \
      -H 'Authorization: uap-91d6****123244f4ad74a5195f4c-c0522414' \
      -H 'Cache-Control: no-cache' \
    

    This API will be return the bucket temporary upload storage & key for upload, so that you can push your file to Uiza’s storage and get the link for URL upload & create entity

    Example Response

    {
        "data": {
            "temp_expire_at": 1533658598,
            "temp_access_id": "ASIAV*******GPHO2DTZ",
            "bucket_name": "uiza****-storage-ap-southeast-1-01/upload-temp/****ff4ad74a5195f4c/",
            "temp_session_token": "FQoGZXIvYXdzEKb//////////wEaDM3rrospIPdBVVULUiKQBHd6H6CNOlRc+xBXDa3Nw8gEymmC/XjDYjIScgx9wJ4QBWwQPwizxLn4AdoLgnYAXVfuGZgOVB6KLHlUZ09yE1IZtN1J3zeVnOaaLnCRSg2lWvwGos6pcLnvzUEGC9FevGfWKEjIQZO6z57BsW/k+1edwNUJpH7FNzmzF5/zid3+wDdzEd2mP4Y0OVdAd6l0oemndXsOQ0wQ2jYre2DXiQ+JRFOE696vpEUqQMm8dDStctLIKPG5WAeKguue2eorTF5fSc43qu/tzecaKGL2UMQVfIAu5wfT6S4uAxOpo0jLuwxqqlEbat6wIlpWCyESpFEoja7qpVnqG2cyAToSnvus2m82cT6WBFyhc6wmetYJDiTAZkOrMYm8yhdqwlb7jd/7p9WVjZOaY8BPB4eZ/tFWrKAZXenX0u5nFumwa2Pvv6TZQqORqLvoybkJnWAZtziK/Xlj+7GxKGep7l6X7/T/1wEIvlORBLLZ3qMFx6cEvhVAx8Zo+5MMHlUmgSLaRAL6kn9F8X6n2nvKGX3T36KXMEBeCVKWEhCUXFbJxz3otBUjaCzpYFuH5aM0DbotqrkNNoOd9oilH0d5oH5llH6lY6Qp1ZjzIHdMV/DCWmMeDqXgNcPakyX5d/zf4D+0LadhikLWctYQkJhoVCqkBCsc+glzk79tEER213nfjPr2i6+qQpfGYeoz8zcdaINRaiimuqTbBQ==",
            "region_name": "ap-southeast-1",
            "temp_access_secret": "dp****cx2mE2lZxsSq7kV++vWSL6RNatAhbqc"
        },
        "version": 3,
        "datetime": "2018-08-07T04:16:39.138Z",
        "policy": "public",
        "requestId": "5c7fd975-c5f1-4980-b74f-bea1bffffba8",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Response Parameters

    Parameter Type Description
    temp_expire_at timestamp Time that this token will be expired (you must recall this API if token expired)
    temp_access_id string Access keyId - used to input in aws SDK
    bucket_name string Bucket destination - used to input in aws SDK
    temp_session_token string Temporary key - used to input in aws SDK
    region_name string Region name - used to input in aws SDK
    temp_access_secret string Temporary Secret key - used to input in aws SDK

    The response body will return you the paramaters that used for input to aws sdk , then upload your files to Uiza’s storage

    You can read the aws sdk guildine here & start your upload
    - For Nodejs : https://aws.amazon.com/vi/sdk-for-node-js/
    - For PHP : https://aws.amazon.com/vi/sdk-for-php/
    - For Python : https://aws.amazon.com/vi/sdk-for-python/
    - For Ruby : https://aws.amazon.com/vi/sdk-for-ruby/

    Category

    Category has been splits into 3 types: folder, playlist and tag. These will make the management of entity more easier.

    Create category

    Example Request

    curl -X POST \
      https://#{workspace_api_domain}/api/public/v3/media/metadata \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "name":"Folder sample",
        "type":"folder",
        "description":"Folder description",
        "orderNumber":1,
        "icon":"https://exemple.com/icon.png"
    }'
    

    Create category for entity for easier management. Category use to group all the same entities into a group (like Folder/ playlist/or tag)

    Example Response

    {
        "data": {
            "id": "095778fa-7e42-45cc-8a0e-6118e540b61d"
        },
        "version": 3,
        "datetime": "2018-06-18T03:17:07.022Z",
        "policy": "public",
        "requestId": "244f6f8f-4fc5-4f20-a535-e8ea4e0cab0e",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    POST https://#{workspace_api_domain}/api/public/v3/media/metadata

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    name string Name of category Yes
    type enum Has 3 types of category [ folder, playlist, tag ] Yes
    description string Description for category
    orderNumber integer Order number for category, lower number is higher order
    icon string Small icon for each category

    Response Parameters

    Parameter Type Description
    id string Identifier of category has been created

    Retrieve category

    Example Request

    curl -X GET \
      https://#{workspace_api_domain}/api/public/v3/media/metadata?id=095778fa-7e42-45cc-8a0e-6118e540b61d \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
    

    Get detail of category

    Example Response

    {
        "data": {
            "id": "f932aa79-852a-41f7-9adc-19935034f944",
            "name": "Playlist sample",
            "description": "Playlist description",
            "slug": "playlist-sample",
            "type": "playlist",
            "orderNumber": 3,
            "icon": "https:///example.com/image002.png",
            "status": 1,
            "createdAt": "2018-06-18T04:29:05.000Z",
            "updatedAt": "2018-06-18T04:29:05.000Z"
        },
        "metadata": {
            "total": 2,
            "result": 2,
            "page": 1,
            "limit": 20
        },
        "version": 3,
        "datetime": "2018-06-18T04:30:26.394Z",
        "policy": "public",
        "requestId": "992ecf2d-3ece-44a2-880f-c60d4e6597fa",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    GET https://#{workspace_api_domain}/api/public/v3/media/metadata?id=095778fa-7e42-45cc-8a0e-6118e540b61d

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id string Identifier of category Yes

    Response Parameters

    Parameter Type Description
    id string Identifier of category
    name string Name of category
    type string Description for category
    description string Has 3 types of category [ folder, playlist, tag ]
    orderNumber string Order number for category, lower number is higher order
    icon string Small icon for each category
    status number Status of category
    createdAt datetime Time created category
    updatedAt datetime Last edited time of category

    Retrieve category list

    Example Request

    curl -X GET \
      https://#{workspace_api_domain}/api/public/v3/media/metadata \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
    

    Get all category

    Example Response

    {
        "data": [
            {
                "id": "f932aa79-852a-41f7-9adc-19935034f944",
                "name": "Playlist sample",
                "description": "Playlist desciption",
                "slug": "playlist-sample",
                "type": "playlist",
                "orderNumber": 3,
                "icon": "/example.com/image002.png",
                "status": 1,
                "createdAt": "2018-06-18T04:29:05.000Z",
                "updatedAt": "2018-06-18T04:29:05.000Z"
            },
            {
                "id": "ab54db88-0c8c-4928-b1be-1e7120ad2c39",
                "name": "Folder sample",
                "description": "Folder's description",
                "slug": "folder-sample",
                "type": "folder",
                "orderNumber": 1,
                "icon": "/example.com/icon.png",
                "status": 1,
                "createdAt": "2018-06-18T03:17:07.000Z",
                "updatedAt": "2018-06-18T03:17:07.000Z"
            }
        ],
        "metadata": {
            "total": 2,
            "result": 2,
            "page": 1,
            "limit": 20
        },
        "version": 3,
        "datetime": "2018-06-18T04:30:26.394Z",
        "policy": "public",
        "requestId": "992ecf2d-3ece-44a2-880f-c60d4e6597fa",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    GET https://#{workspace_api_domain}/api/public/v3/media/metadata

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Response Parameters

    Parameter Type Description
    id string Identifier of category
    name string Name of category
    type string Description for category
    description string Has 3 types of category [ folder, playlist, tag ]
    orderNumber string Order number for category, lower number is higher order
    icon string Small icon for each category
    status number Status of category
    createdAt datetime Time created of category
    updatedAt datetime Last edited time of category

    Update category

    Example Request

    curl -X PUT \
      https://#{workspace_api_domain}/api/public/v3/media/metadata \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "id":"095778fa-7e42-45cc-8a0e-6118e540b61d",
        "name":"Folder edited",
        "type":"folder",
        "description":"Folder description new",
        "orderNumber":1,
        "icon":"/exemple.com/icon_001.png"
    }'
    

    Update information of category

    Example Response

    {
        "data": {
            "id": "095778fa-7e42-45cc-8a0e-6118e540b61d"
        },
        "version": 3,
        "datetime": "2018-06-18T05:05:05.639Z",
        "policy": "public",
        "requestId": "ffc89642-8acd-4819-86ee-fec1d591017a",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    PUT https://#{workspace_api_domain}/api/public/v3/media/metadata

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id string Identifier of category Yes
    name string Name of category Yes
    type enum Has 3 types of category [ folder, playlist, tag ] Yes
    description string Description for category
    orderNumber integer Order number for category, lower number is higher order
    icon string Small icon for each category

    Response Parameters

    Parameter Type Description
    id string Identifier of category has been updated

    Delete category

    Example Request

    curl -X DELETE \
      https://#{workspace_api_domain}/api/public/v3/media/metadata \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Cache-Control: no-cache' \
      -d '{
        "id":"095778fa-7e42-45cc-8a0e-6118e540b61d"
    }'
    

    Delete category

    Example Response

    {
        "data": {
            "id": "095778fa-7e42-45cc-8a0e-6118e540b61d"
          },
        "version": 3,
        "datetime": "2018-06-16T18:56:10.713Z",
        "policy": "public",
        "requestId": "b80b7ad3-5529-4d5e-81f2-b4ca64285067",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    DELETE https://#{workspace_api_domain}/api/public/v3/media/metadata

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id string Identifier of category Yes

    Response Parameters

    Parameter Type Description
    id string Identifier of category has been deleted

    Create category relation

    Example Request

    curl -X POST \
      https://#{workspace_api_domain}/api/public/v3/media/entity/related/metadata \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "entityId":"16ab25d3-fd0f-4568-8aa0-0339bbfd674f",
        "metadataIds":["095778fa-7e42-45cc-8a0e-6118e540b61d","e00586b9-032a-46a3-af71-d275f01b03cf"]
    }'
    

    Add relation for entity and category

    Example Response

    {
        "data": [
            {
                "id": "5620ed3c-b725-4a9a-8ec1-ecc9df3e5aa6",
                "entityId": "16ab25d3-fd0f-4568-8aa0-0339bbfd674f",
                "metadataId": "095778fa-7e42-45cc-8a0e-6118e540b61d"
            },
            {
                "id": "47209e60-a99f-4c96-99fb-be4f858481b4",
                "entityId": "16ab25d3-fd0f-4568-8aa0-0339bbfd674f",
                "metadataId": "e00586b9-032a-46a3-af71-d275f01b03cf"
            }
        ],
        "metadata": {
            "total": 2,
            "result": 2,
            "page": 1,
            "limit": 20
        },
        "version": 3,
        "datetime": "2018-06-18T06:14:45.971Z",
        "policy": "public",
        "requestId": "137d4f7e-bdb8-4b9a-952f-a45eb4138382",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    POST https://#{workspace_api_domain}/api/public/v3/media/entity/related/metadata

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    entityId string Identifier of entity
    metadataIds string Identifier of category

    Response Parameters

    Parameter Type Description
    id string Identifier of relation between entity and category has been created
    entityId string Identifier of entity
    metadataIds string Identifier of category

    Delete category relation

    Example Request

    curl -X DELETE \
      https://#{workspace_api_domain}/api/public/v3/media/entity/related/metadata \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "entityId":"16ab25d3-fd0f-4568-8aa0-0339bbfd674f",
        "metadataIds":["095778fa-7e42-45cc-8a0e-6118e540b61d","e00586b9-032a-46a3-af71-d275f01b03cf"]
    }'
    

    Delete relation for entity and category

    Example Response

    {
        "data": [
            {
                "id": "5620ed3c-b725-4a9a-8ec1-ecc9df3e5aa6",
                "entityId": "16ab25d3-fd0f-4568-8aa0-0339bbfd674f",
                "metadataId": "095778fa-7e42-45cc-8a0e-6118e540b61d"
            },
        ],
        "metadata": {
            "total": 1,
            "result": 1,
            "page": 1,
            "limit": 20
        },
        "version": 3,
        "datetime": "2018-06-18T07:37:39.920Z",
        "policy": "public",
        "requestId": "393b0fcc-06fa-49b0-84d8-07a6acb8d1a8",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    DELETE https://#{workspace_api_domain}/api/public/v3/media/entity/related/metadata

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    entityId string Identifier of entity
    metadataIds string Identifier of category

    Response Parameters

    Parameter Type Description
    id string Identifier of relation between entity and category has been deleted
    entityId string Identifier of entity
    metadataIds string Identifier of category

    Storage

    You can add your storage (FTP, AWS S3) with UIZA. After synced, you can select your content easier from your storage to create entity.

    Add a storage

    You can sync your storage (FTP, AWS S3) with UIZA. After synced, you can select your content easier from your storage to create entity.

    Create a FTP Storage

    Example Request

    curl -X POST \
      https://#{workspace_api_domain}/api/public/v3/media/storage \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "name":"FTP Uiza",
        "description":"FTP of Uiza, use for transcode",
        "storageType":"ftp",
        "host":"ftp-example.uiza.io",
        "username":"uiza",
        "password":"=59x@LPsd+w7qW",
        "port":21
    }'
    

    Example Response

    {
        "data": {
            "id": "cd003123-7ec9-4f3a-9d7c-f2de93e83e49"
        },
        "version": 3,
        "datetime": "2018-06-19T03:01:56.476Z",
        "policy": "public",
        "requestId": "02387807-a0e2-4b06-9791-c45bcc9e1362",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    POST https://#{workspace_api_domain}/api/public/v3/media/storage

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Add a FTP storage

    Parameter Type Description Required
    name string Name of the storage Yes
    host string Host name of the server or IP address Yes
    port int Used port for FTP server. Normally will be 21 Yes
    type string Storage can be FTP or AWS S3. Allowed values: [S3, FTP] Yes
    username string Account username
    password string Account password
    description string Storage's description

    Add a AWS S3 storage

    Parameter Type Description Required
    name string Name of the storage Yes
    host string Host name of the server or IP address Yes
    port int Used port for S3 server. Normally will be 443 Yes
    type string Storage can be FTP or AWS S3. Allowed values: [S3, FTP] Yes
    awsAccessKey string AWS Access key ID
    awsSecretKey string AWS Secret key ID
    prefix string Prefix for objects store in AWS S3
    bucket string Bucket data of AWS S3
    region string AWS S3 region
    description string Storage's description

    Response Parameters

    Parameter Type Description
    id string Identifier of storage

    Retrieve a storage

    Example Request

    curl -X GET \
      https://#{workspace_api_domain}/api/public/v3/media/storage?id=cd003123-7ec9-4f3a-9d7c-f2de93e83e49 \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
    

    Get information of your added storage (FTP or AWS S3)

    Example Response

    {
        "data": {
            "id": "cd003123-7ec9-4f3a-9d7c-f2de93e83e49",
            "name": "FTP Uiza",
            "description": "FTP of Uiza, use for transcode",
            "storageType": "ftp",
            "usageType": "input",
            "bucket": null,
            "prefix": null,
            "host": "ftp-exemple.uiza.io",
            "awsAccessKey": null,
            "awsSecretKey": null,
            "username": "uiza",
            "password": "=5;9x@LPsd+w7qW",
            "region": null,
            "port": 21,
            "createdAt": "2018-06-19T03:01:56.000Z",
            "updatedAt": "2018-06-19T03:01:56.000Z"
        },
        "version": 3,
        "datetime": "2018-06-19T03:18:14.862Z",
        "policy": "public",
        "requestId": "f5ebaa82-95de-4ce7-8089-21a919ba88cb",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    GET https://#{workspace_api_domain}/api/public/v3/media/storage?id=cd003123-7ec9-4f3a-9d7c-f2de93e83e49

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id string Identifier of storage Yes

    Response Parameters

    Parameter Type Description
    id string Identifier of storage
    name string Name of storage
    description string Storage's description
    storageType string Storage can be FTP or AWS S3
    usageType string Input storage
    bucket string Bucket data of AWS S3
    prefix string Prefix for objects store in AWS S3
    host string Storage host (AWS S3, FTP)
    awsAccessKey string AccessKeyId
    awsSecretKey string SecretKeyId
    username string UserName of FTP
    password string Password of FTP
    region string AWS S3 region
    port number Storage port
    createdAt datetime Time created storage
    updatedAt datetime Last edited time of storage

    Update storage

    Update storage's information

    Create FTP a Storage

    Example Request

    curl -X PUT \
      https://#{workspace_api_domain}/api/public/v3/media/storage \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "id":"cd003123-7ec9-4f3a-9d7c-f2de93e83e49",
        "name":"FTP Uiza",
        "description":"FTP of Uiza, use for transcode",
        "storageType":"ftp",
        "host":"ftp-example.uiza.io",
        "username":"uiza",
        "password":"=5;'9x@LPsd+w7qW",
        "port":21
    }'
    

    Example Response

    {
        "data": {
            "id": "cd003123-7ec9-4f3a-9d7c-f2de93e83e49"
        },
        "version": 3,
        "datetime": "2018-06-19T03:01:56.476Z",
        "policy": "public",
        "requestId": "02387807-a0e2-4b06-9791-c45bcc9e1362",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    PUT https://#{workspace_api_domain}/api/public/v3/media/storage

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Update FTP storage

    Parameter Type Description Required
    id string Identifier of the storage Yes
    name string Name of the storage Yes
    host string Host name of the server or IP address Yes
    port int Used port for FTP server. Normally will be 21 Yes
    type string Storage can be FTP or S3. Allowed values: [S3, FTP] Yes
    username string Account username
    password string Account password
    description string Storage's description

    Update S3 storage

    Parameter Type Description Required
    id string Identifier of the storage Yes
    name string Name of the storage Yes
    host string Host name of the server or IP address Yes
    port int Used port for S3 server. Normally will be 443 Yes
    type string Storage can be FTP or AWS S3. Allowed values: [S3, FTP] Yes
    awsAccessKey string AWS Access key ID
    awsSecretKey string AWS Secret key ID
    prefix string Prefix for objects store in AWS S3
    bucket string Bucket data of AWS S3
    region string AWS S3 region
    description string Storage's description

    Response Parameters

    Parameter Type Description
    id string Identifier of storage
    name string Name of storage
    description string Storage's description
    storageType string Storage can be FTP or AWS S3
    usageType string Input storage
    bucket string Bucket data of AWS S3
    prefix string Prefix for objects store in AWS S3
    host string Storage host (AWS S3, ftp)
    awsAccessKey string AccessKeyId
    awsSecretKey string SecretKeyId
    username string UserName of FTP
    password string Password of FTP
    region string AWS region
    port number Storage port
    createdAt datetime Time created storage
    updatedAt datetime Last edited time of storage

    Remove storage

    Example Request

    curl -X DELETE \
      https://#{workspace_api_domain}/api/public/v3/media/storage \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json'
      -d '{
           "id":"cd003123-7ec9-4f3a-9d7c-f2de93e83e49"
      }'
    

    Remove storage that added to Uiza

    Example Response

    {
        "data": {
            "id": "cd003123-7ec9-4f3a-9d7c-f2de93e83e49",
           },
        "version": 3,
        "datetime": "2018-06-19T03:18:14.862Z",
        "policy": "public",
        "requestId": "f5ebaa82-95de-4ce7-8089-21a919ba88cb",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    DELETE https://#{workspace_api_domain}/api/public/v3/media/storage

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id string Identifier of storage Yes

    Response Parameters

    Parameter Type Description
    id string Identifier of storage has been removed

    Live Streaming

    These APIs used to create and manage live streaming event.

    Create a live event

    Example Request

    curl -X POST \
      https://#{workspace_api_domain}/api/public/v3/live/entity \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "name":"test event",
        "mode":"push",
        "encode":1,
        "description":"This is for test event",
        "poster":"//image1.jpeg",
        "thumbnail":"//image1.jpeg",
        "linkStream":[
                  "https://playlist.m3u8"
                ],
        "resourceMode":"single"
    }'
    

    These APIs use to create a live streaming and manage the live streaming input (output). A live stream can be set up and start later or start right after set up. Live Channel Minutes counts when the event starts.

    Example Response

    {
        "data": {
            "id": "8b83886e-9cc3-4eab-9258-ebb16c0c73de"
        },
        "version": 3,
        "datetime": "2018-06-21T14:33:36.770Z",
        "policy": "public",
        "requestId": "f66f3499-f952-445d-bf19-092474952779",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    POST https://#{workspace_api_domain}/api/public/v3/live/entity

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    name string The event name (limit 100 characters) Yes
    mode integer Type of event can be pull or push
    Pull: We has supported RTMP, HLS and direct Live Youtube link. Uiza pull feed from pull link and broadcast it using Uiza's SDK. Push: Uiza give you a Publish endpoint, you can push feed into the endpoint and Uiza will broadcast it using Uiza's SDK.
    Yes
    encode string Mode of live stream (0 = no encode, 1 = encoded) Yes
    description text Description of the live stream
    linkPublishSocial array Info to share live into social
    dropdown: type of social (youtube/facebook).

    address:: stream URL.

    streamKey:: stream key correspond to stream URL.
    thumbnail text An Image link
    linkStream array Link streaming (if you choose mode = pull) Yes
    resourceMode enum Resource mode ( single = only 1 feed & output), redundant = more than 1 feed & output to backup) Yes

    Response Parameters

    Parameter Type Description
    id string Identifier of event has been created

    Retrieve a live event

    Example Request

    curl -X GET \
      https://#{workspace_api_domain}/api/public/v3/live/ \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "id":"8b83886e-9cc3-4eab-9258-ebb16c0c73de"
    }'
    

    Retrieves the details of an existing event. You need only provide the unique identifier of event that was returned upon Live event creation.

    Example Response

    {
        "data": {
            "id": "8b83886e-9cc3-4eab-9258-ebb16c0c73de",
            "name": "checking 01",
            "description": "checking",
            "mode": "pull",
            "resourceMode": "single",
            "encode": 0,
            "channelName": "checking-01",
            "lastPresetId": null,
            "lastFeedId": null,
            "poster": "https://example.com/poster.jpeg",
            "thumbnail": "https://example.com/thumbnail.jpeg",
            "linkPublishSocial": null,
            "linkStream": "[\"https://www.youtube.com/watch?v=pQzaHPoNX1I\"]",
            "lastPullInfo": null,
            "lastPushInfo": null,
            "lastProcess": null,
            "eventType": null,
            "createdAt": "2018-06-21T14:33:36.000Z",
            "updatedAt": "2018-06-21T14:33:36.000Z"
        },
        "version": 3,
        "datetime": "2018-06-21T14:34:22.335Z",
        "policy": "public",
        "requestId": "088668ec-6046-4310-879a-2e0e72ac1f52",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    GET https://#{workspace_api_domain}/api/public/v3/live/entity

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description
    id string Identifier of live event.

    Response Parameters

    Parameter Type Description Required
    name string The event name (limit 100 characters) Yes
    mode integer Type of event ( pull or push)
    Pull link maybe a //rtmp or a link .m3u8 or a live youtube link - Push : uiza generate and end point and send it to you, to get the feed input
    Yes
    encode string Mode of live stream (0 = no encode, 1 = encoded) Yes
    channelName text Key name of channel Yes
    linkPublishSocial array into of social feed will be shared to Yes
    resourceMode enum Resource mode ( single = only 1 feed & output), redundant = more than 1 feed & output to backup) Yes

    Update a live event

    Example Request

    curl -X PUT \
      https://#{workspace_api_domain}/api/public/v3/live/ \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Cache-Control: no-cache' \
      -H 'Content-Type: application/json' \
      -d '{
        "id":"8b83886e-9cc3-4eab-9258-ebb16c0c73de",
        "name":"live test",
        "mode":"pull",
        "encode":0
        "resourceMode":"single"
    }'
    

    Update the specific Live event by edit values of parameters.

    Example Response

    {
        "data": {
            "id": "8b83886e-9cc3-4eab-9258-ebb16c0c73de"
        },
        "version": 3,
        "datetime": "2018-06-13T16:27:06.917Z",
        "policy": "public",
        "requestId": "b2997244-3579-4898-86ae-c0395c2db1ee",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    PUT https://#{workspace_api_domain}/api/public/v3/live/entity

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id string Identifier of entity live Yes
    name string The event name (limit 100 characters) Yes
    mode integer Type of event ( pull or push)
    Pull: We has supported RTMP, HLS and direct Live Youtube link. Uiza pull feed from pull link and broadcast it using Uiza's SDK. Push: Uiza give you a Publish endpoint, you can push feed into the endpoint and Uiza will broadcast it using Uiza's SDK.
    Yes
    encode string Mode of live stream (0 = no encode, 1 = encoded) Yes
    resourceMode enum Resource mode ( single = only 1 feed & output), redundant = more than 1 feed & output to backup) Yes

    Response Parameters

    Parameter Type Description
    id string Identifier of event has been updated

    Start a live feed

    Example Request

    curl -X POST \
      https://#{workspace_api_domain}/api/public/v3/live/entity/feed \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "id": "8b83886e-9cc3-4eab-9258-ebb16c0c73de"
    }'
    

    These API use to start a live event that has been create success. The Live channel minute start count whenever the event start success

    Example Response

    {
        "data": {
            "id": "8b83886e-9cc3-4eab-9258-ebb16c0c73de"
        },
        "version": 3,
        "datetime": "2018-06-13T16:27:06.917Z",
        "policy": "public",
        "requestId": "b2997244-3579-4898-86ae-c0395c2db1ee",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    POST https://#{workspace_api_domain}/api/public/v3/live/entity/feed

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id string Identifier of event. Yes

    Response Parameters

    Parameter Type Description
    id string Identifier of event

    Get view of live feed

    Example Request

    curl -X GET \
      https://#{workspace_api_domain}/api/public/v3/live/entity/tracking/current-view?id=f79cd626-bd60-4ef9-9790-c2066bcbdae9 \
      -H 'Authorization: uap-a9ad1b44c05747e8870917e5ae9e956b-05a4fd49' \
      -H 'Cache-Control: no-cache'
    

    This API use to get a live view status . This view only show when event has been started and being processing.

    Example Response

    {
        "data": {
            "stream_name": "peppa-pig-english-episodes",
            "watchnow": 1,
            "day": 1533271205999
        },
        "version": 3,
        "datetime": "2018-08-03T04:40:27.804Z",
        "policy": "public",
        "requestId": "9f52c11d-c495-4d57-9129-baad2ab28b49",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    GET https://#{workspace_api_domain}/api/public/v3/live/entity/tracking/current-view?id=f79cd626-bd60-4ef9-9790-c2066bcbdae9

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id string EventId has been created. Yes

    Response Parameters

    Parameter Type Description
    stream_name string Name of event
    day number Timestamp while getting view
    watchnow number Current view of event

    Stop a live feed

    Example Request

    curl -X PUT \
      https://#{workspace_api_domain}/api/public/v3/live/entity/feed \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "id": "d3a7b3e7-1b0b-4d52-b804-aa000a0bd711"
    }'
    

    Stop live event

    Example Response

    {
        "data": {
            "id": "d3a7b3e7-1b0b-4d52-b804-aa000a0bd711"
        },
        "version": 3,
        "datetime": "2018-06-13T16:27:06.917Z",
        "policy": "public",
        "requestId": "b2997244-3579-4898-86ae-c0395c2db1ee",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    PUT https://#{workspace_api_domain}/api/public/v3/live/entity/feed

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id string Identifier of event Yes

    Response Parameters

    Parameter Type Description
    entityId string Identifier of event
    message string Progress stop feed

    Callback

    Callback used to retrieve an information for Uiza to your server, so you can have a trigger notice about an entity is upload completed and .

    Example callback after create entity success

    {
      "text": "example callback",
      "id": "7fd1c81e-eecc-4aa1-8c7b-6aa647a468d9",
      "status": "Create success"
    }
    

    Example callback after publish entity success

    {
      "text": "example callback",
      "id": "7fd1c81e-eecc-4aa1-8c7b-6aa647a468d9",
      "status": "Entity publish success"
    }
    

    Response Parameters

    Parameter Type Description
    id string Identifier of entity has been created/published
    text string JSON Data you put in callback
    status enum Create of Publish success

    Create a callback

    Example Request

    curl -X POST \
      https://#{workspace_api_domain}/api/public/v3/media/entity/callback \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Cache-Control: no-cache' \
      -H 'Content-Type: application/json' \
      -d '{
        "url":"https://callback-url.uiza.co",
        "method":"POST"
      }'
    

    This API will allow you setup a callback to your server when an entity is completed for upload or public

    Example Response

    {
        "data": {
            "id": "8b83886e-9cc3-4eab-9258-ebb16c0c73de"
        },
        "version": 3,
        "datetime": "2018-06-13T16:27:06.917Z",
        "policy": "public",
        "requestId": "b2997244-3579-4898-86ae-c0395c2db1ee",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    POST https://#{workspace_api_domain}/api/public/v3/media/entity/callback

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    url string Your server URL for callback Yes
    method enum Method of callback (get-post-put..) Yes
    jsonData object Extra data you want to attach in callback response
    headersData object Add parameter to headers

    Response Parameters

    Parameter Type Description
    id string Id of callback setting

    Retrieve a callback

    Example Request

    curl -X GET \
      https://#{workspace_api_domain}/api/private/v3/media/entity/callback?id=0a6bf245-1cce-494f-a193-b5a44aa05558 \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
    

    Retrieves the details of an existing callback.

    Example Response

    {
        "data": {
            "id": "0a6bf245-1cce-494f-a193-b5a44aa05558",
            "url": "https://callback-url.uiza.co",
            "headersData": null,
            "jsonData": {
              "text": "example callback"
            },
            "method": "POST",
            "status": 1,
            "createdAt": "2018-06-23T01:27:08.000Z",
            "updatedAt": "2018-06-23T01:27:08.000Z"
        },
        "version": 3,
        "datetime": "2018-06-23T01:28:47.240Z",
        "policy": "public",
        "requestId": "eaa569a4-e11d-4615-9def-d5c95a575cc2",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    GET https://#{workspace_api_domain}/api/public/v3/media/entity/callback

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id string Id of callback setting Yes

    Response Parameters

    Parameter Type Description
    id string Identifier of callback
    url string Your server URL for callback
    method enum Method of callback (get-post-put..)
    jsonData object Data you want you add to your callback as JSON format
    headersData object Parameter of header

    Update a callback

    Example Request

    curl -X PUT \
      https://#{workspace_api_domain}/api/public/v3/media/entity/callback \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Cache-Control: no-cache' \
      -H 'Content-Type: application/json' \
      -d '{
        "url":"https://callback-url.uiza.co",
        "method":"GET"
      }'
    

    This API will allow you setup a callback to your server when an entity is completed for upload or public

    Example Response

    {
        "data": {
            "id": "8b83886e-9cc3-4eab-9258-ebb16c0c73de"
        },
        "version": 3,
        "datetime": "2018-06-13T16:27:06.917Z",
        "policy": "public",
        "requestId": "b2997244-3579-4898-86ae-c0395c2db1ee",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    PUT https://#{workspace_api_domain}/api/public/v3/media/entity/callback

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id string Id of callback setting Yes
    url string Your server URL for callback
    method enum Method of callback (get-post-put..)
    jsonData object Extra data you want to attach in callback response
    headersData object Add parameter to headers

    Response Parameters

    Parameter Type Description
    id string Id of callback setting

    Delete a callback

    Example Request

    curl -X DELETE \
      https://#{workspace_api_domain}/api/public/v3/media/entity/callback \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "id":"c54f115f-87b4-420c-9e52-e8dffe32e022"
      }'
    

    Delete an existing callback.

    Example Response

    {
        "data": {
            "id": "c54f115f-87b4-420c-9e52-e8dffe32e022"
        },
        "version": 3,
        "datetime": "2018-06-23T01:30:46.699Z",
        "policy": "public",
        "requestId": "f0d39d74-376f-4091-9da7-dc9a95f854fc",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    DELETE https://#{workspace_api_domain}/api/public/v3/media/entity/callback

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    id string Id of callback setting Yes

    Response Parameters

    Parameter Type Description
    id string Id of callback setting

    Analytic

    Analytic metrics

    Monitor the four key dimensions of video QoS: playback failures, startup time, rebuffering, and video quality. These 15 metrics help you track playback performance, so your team can know exactly what’s going on.

    Metric Unit Slug (use for API) Description
    Playback Failure Percentage Percentage (%) playback_failure_percentage The Playback Failure Percentage metric gives the percentage of video views that failed to play due to an error.
    Video Startup Time Millisecond (ms) video_startup_time Video Startup Time measures the time that the viewer waits for the video to play after the page is loaded and the player is ready. It specifically measures from when the player has been instructed to play the video, either directly by the user or via autoplay, to when the first frame of video is showing and the playhead is progressing. In the case that the player is configured with a pre-roll ad, Video Startup Time is the time until the first first frame of the pre-roll ad is displayed.
    Player Startup Time Millisecond (ms) player_startup_time Player Startup Time measures the time from when the player is first initialized in the page to when it is ready to receive further instructions.
    Page Load Time Millisecond (ms) page_load_time Page load time measures the time from the initial user request for a page to the time when the video player is first initialized. Use this metric to understand the impact of new page resources (JavaScript files, CSS, etc.) on the viewer wait time. This can also be used to compare video players, and the size and loading speed of their files impacts the wait time.
    Aggregate Startup Time Millisecond (ms) aggregate_startup_time Aggregate Startup Time combines Page Load Time, Player Startup Time, and Video Startup Time to show the total time a viewer waits for a video to play after requesting to watch the video on the previous screen or page.
    Seek Latency Millisecond (ms) seek_latency The Seek Latency metric measures the average amount of time that viewers wait for the video to start playing again after seeking to a new time. Seeking is any time the player is asked to jump backward or forward to a new time in the video, outside of normal playback. Aside from the viewer clicking on the progress bar, seeking can also happen programmatically, for example when jumping ahead to resume where the viewer previously stopped watching.
    Exist before start Percentage (%) exits_before_video_start Exist before start counts the number of video views where the viewer clicked play (or the player began to autoplay) but the video never began to play back (Video Startup Time was never recorded)
    Rebuffer Percentage Percentage (%) rebuffer_percentage Rebuffer Percentage measures the volume of rebuffering that is occurring across the platform. Total Rebuffer Duration is the sum of the time viewers spend rebuffering on the platform or the given set of video views. Total Watch Time is the sum of all time viewers spend watching video, inclusive of rebuffering time. The Total Rebuffer Percentage then measures the total rebuffer duration as a percentage of total watch time.
    Rebuffer Frequency Number / Minute rebuffer_frequency Rebuffer Frequency measures how often rebuffering events happen. It’s important to track this number because it can reveal issues of video stuttering, where the player is being too aggressive when restarting playback and has to frequently stop to rebuffer.
    Rebuffer Duration Millisecond (ms) rebuffer_duration Rebuffer Duration is the amount of time in seconds that viewers wait for rebuffering per video view.
    Rebuffer Count Number rebuffer_count Rebuffer Count shows the number of rebuffering events that happen during video views.
    Upscale Percentage Percentage (%) upscale_percentage Upscaling is when the video player has to increase the size of the video to fill the player’s display. For example, if the video source is 320x240 and the player size 640x480, the player will stretch the video to fill the player dimensions. In that process the quality of the video degrades. Upscale Percentage is measured as the change in one dimension, specifically the dimension that fits the player first when upscaling. In the 320x240 to 640x480 example, the Upscale Percentage would be 100%, calculated as (640-320) / 320.
    Downscale Percentage Percentage (%) downscale_percentage Downscaling is the inverse of upscaling, measuring when the video source is too big for the player and has to be reduced in size to fit the display. In the process of shrinking the video pixels are thrown out and essentially wasted. While this does not mean a reduction in video quality it does mean wasted bandwidth for you and the viewer, and significant occurrences of downscaling should be addressed.
    Max Upscale Percentage Percentage (%) max_upscale_percentage While Upscale Percentage helps understand the volume of upscaling that’s occurring on your platform, the Max Upscale Percentage can help reveal points of significant upscaling, even if they don’t last the full video. It can also be more clear which video rendition may be the culprit as the percentage will exactly match the difference between a rendition and the player dimensions.
    Max Downscale Percentage Percentage (%) max_downscale_percentage While Downscale Percentage helps understand the volume of downscaling that’s occurring on your platform, the Max Downscale Percentage can help reveal points of significant downscaling, even if they don’t last the full video. It can also be more clear which video rendition may be the culprit as the percentage will exactly match the difference between a rendition and the player dimensions.

    Total Line

    Example Request

    curl -X GET \
      'https://#{workspace_api_domain}/api/public/v3/analytic/entity/video-quality/total-line-v2?start_date=2018-11-01%2008:00&end_date=2018-11-19%2014:00&metric=rebuffer_count' \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
    

    Example Response

    {
        "data": [
            {
                "date_time": 1542978000000,
                "rebuffer_count": 1.6666666666666667
            },
            {
                "date_time": 1543204800000,
                "rebuffer_count": 0.5
            },
            {
                "date_time": 1543215600000,
                "rebuffer_count": 5
            }
        ],
        "version": 3,
        "datetime": "2018-06-18T03:17:07.022Z",
        "policy": "public",
        "requestId": "244f6f8f-4fc5-4f20-a535-e8ea4e0cab0e",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    Get data grouped by hour (data refresh every 5 minutes). Track video playback on any metric performance, so you can know exactly what’s happening on every user’s device and debug more effectively.

    About grouped by hour algorithm, Uiza currently support up to 16 days (it means when your time range is lower than 16 days, data response will be grouped by hour. Otherwise, it will return and to be grouped by day). In case your requested timerange doesn't have data, API won't show it in response.

    HTTP Request

    GET https://#{workspace_api_domain}/api/public/v3/analytic/entity/video-quality/total-line-v2

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    start_date string Start date (UTC+0) with format: YYYY-MM-DD hh:mm (24-hour clock) Yes
    end_date string End date (UTC+0) with format: YYYY-MM-DD hh:mm (24-hour clock) Yes
    metric string You can get data of any metric from list (use Slug) Yes

    Response Parameters

    Parameter Type Description
    date_time timestamp Time point
    playback_failure_score number see list
    playback_failure_percentage number see list
    page_load_time number see list
    video_startup_time number see list
    player_startup_time number see list
    aggregate_startup_time number see list
    seek_latency number see list
    exits_before_video_start number see list
    rebuffer_percentage number see list
    rebuffer_frequency number see list
    rebuffer_duration number see list
    rebuffer_count number see list
    upscale_percentage number see list
    downscale_percentage number see list
    max_upscale_percentage number see list
    max_downscale_percentage number see list

    Type

    Example Request

    curl -X GET \
      'https://#{workspace_api_domain}/api/public/v3/analytic/entity/video-quality/type?start_date=2018-09-01&end_date=2018-11-25&type_filter=country' \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
    

    Example Response

    {
        "data": [
            {
                "name": "Vietnam",
                "total_view": 15,
                "percentage_of_view": 0.625
            },
            {
                "name": "Other",
                "total_view": 9,
                "percentage_of_view": 0.375
            }
        ],
        "version": 3,
        "datetime": "2018-06-18T03:17:07.022Z",
        "policy": "public",
        "requestId": "244f6f8f-4fc5-4f20-a535-e8ea4e0cab0e",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    Get data base on 4 type of filter: country, device, title, player

    HTTP Request

    GET https://#{workspace_api_domain}/api/public/v3/analytic/entity/video-quality/type

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    start_date string Start date (UTC+0) with format: YYYY-MM-DD Yes
    end_date string End date (UTC+0) with format: YYYY-MM-DD Yes
    type_filter enum Value accept: [ country, device, title, player ] Yes

    Response Parameters

    Parameter Type Description
    name string name of filter (can be country, device name, title or player name)
    total_view number Total view corresponding to filter
    percentage_of_view number Percentage of view corresponding to filter

    Line

    Example Request

    curl -X GET \
      'https://#{workspace_api_domain}/api/public/v3/analytic/entity/video-quality/line?start_date=2018-11-01&end_date=2018-11-19' \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
    

    Example Response

    {
        "data": [
            {
                "day": 1541548800000,
                "total_view": 4
            },
            {
                "day": 1541635200000,
                "total_view": 5
            },
            {
                "day": 1541721600000,
                "total_view": 5
            },
            {
                "day": 1541980800000,
                "total_view": 1
            },
            {
                "day": 1542240000000,
                "total_view": 1
            },
            {
                "day": 1542499200000,
                "total_view": 1
            },
            {
                "day": 1542585600000,
                "total_view": 1
            }
        ],
        "version": 3,
        "datetime": "2018-06-18T03:17:07.022Z",
        "policy": "public",
        "requestId": "244f6f8f-4fc5-4f20-a535-e8ea4e0cab0e",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    Get data grouped by hour. Get total view in time range. This help you to draw a line chart to visualize data

    About grouped by hour algorithm, Uiza currently support upto 16 days (it's mean when your time range is lower than 16 days, data response will be grouped by hour. Otherwise, it will return and to be grouped by day). In case your requested timerange doesn't have data, API won't show it in response.

    HTTP Request

    GET https://#{workspace_api_domain}/api/public/v3/analytic/entity/video-quality/line

    Header Request

    Header Type Description Required
    Authorization string Token get from API Get API key Yes

    Body Request

    Parameter Type Description Required
    start_date string Start date (UTC+0) with format: YYYY-MM-DD Yes
    end_date string End date (UTC+0) with format: YYYY-MM-DD Yes

    Response Parameters

    Parameter Type Description
    day timestamp Time point
    total_view number Total view in time range

    Embed Metadata

    Embed metadata is information that can be embed into video/audio file. You can embed into file by adding a json compose these tag.

    "embedData": {
         "title": "Despacito",
         "artist": "Luis Fonsi",
         "album_artist": "",
         "album": "",
         "composer": "",
         "year": "2017",
         "track": null,
         "genre": "Nhạc trẻ",
         "description": null,
         "copyright": "Universal Music Latino",
         "network": null,
         "show": null,
         "episode_id": null
    }
    

    Note

    To keep embedData of source file, tag value will be null

    To remove embedData of source file, tag value will be a string without value ""

    Tag list

    Tags Type Description
    title string Title of video/audio
    artist string Name of artist
    album_artist string Artist of album
    album string Name of album
    composer string Name of composer
    year int(4) Published year
    track int Order of track in album
    genre string Genre
    description string Video/Audio's description
    copyright string
    network string Network channel
    show string Name of show
    episode_id int Episode number

    Errors Code

    Uiza uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with Uiza's servers.

    Errors list

    Error Code Detail
    200 - OK Everything worked as expected.
    400 - Bad Request The request was unacceptable, often due to missing a required parameter.
    401 - Unauthorized No valid API key provided.
    404 - Not Found The requested resource doesn't exist.
    422 - Unprocessable The syntax of the request is correct (often cause of wrong parameter)
    500 - Internal Server Error We had a problem with our server. Try again later.
    503 - Service Unavailable The server is overloaded or down for maintenance.

    Change log

    Date Version Change log
    27/11/2018 3.0.7 add API analytic
    05/10/2018 3.0.6 add linkPublishSocial to Event live
    06/09/2018 3.0.5 Add callback function
    04/09/2018 3.0.4 Add parameter publishToCdn for VOD
    07/08/2018 3.0.3 Update API get AWS Upload key
    03/08/2018 3.0.2 Change naming metadata to category
    30/07/2018 3.0.1 Add metadataIds while create entity
    14/06/2018 3.0.0 Release API docs for version 3