NAV Navbar
Logo
cURL Ruby Python PHP Java Node Go .NET
  • 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

    Create an user account for workspace

    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
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      status: 1,
      username: "user_test",
      email: "user_test@uiza.io",
      password: "FMpsr<4[dGPu?B#u",
      gender: 0,
      dob: "05/15/2018",
      avatar: "https://exemple.com/avatar.jpeg",
      fullname: "User Test",
      isAdmin: 0
    }
    
    begin
      user = Uiza::User.create params
      puts user.id
      puts user.username
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.user import User
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    user_data = {
      "status": 1,
      "username": "test_admin_pythonvn",
      "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
    }
    
    try:
      res, status_code = User().create(**user_data)
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    $params = [
      "status"  => 1,
      "username" => "test",
      "email" => "abc_test@uiza.io",
      "fullname" => "Test",
      "avatar" => "https://exemple.com/avatar.jpeg",
      "dob" => "05/15/2018",
      "gender" => 0,
      "password" => "FMpsr<4[dGPu?B#u",
      "isAdmin" => 1
    ];
    
    try {
      Uiza\User::create($params);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.User;
    import io.uiza.model.User.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        Map<String, Object> params = new HashMap<>();
        params.put("status", Status.ACTIVE.getVal());
        params.put("username", "user_test");
        params.put("email", "user_test@uiza.io");
        params.put("fullname", "User Test");
        params.put("avatar", "https://exemple.com/avatar.jpeg");
        params.put("dob", "05/15/2018");
        params.put("gender", Gender.MALE.getVal());
        params.put("password", "FMpsr<4[dGPu?B#u");
        params.put("isAdmin", Role.ADMIN.getVal());
    
        try {
          JsonObject response = User.create(params);
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    const params = {
      'status': 1,
      'username': 'user_test_1',
      '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
    };
    
    uiza.user.create(params)
      .then((res) => {
        // Identifier of user has been created
      }).catch((err) => {
        // Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/user"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.UserCreateParams{
      Status: uiza.Int64(1),
      Username: uiza.String("user_test_go"),
      Email: uiza.String("user_test@uiza.io"),
      Password: uiza.String("FMpsr<4[dGPu?B#u"),
      Avatar: uiza.String("https://exemple.com/avatar.jpeg"),
      Fullname: uiza.String("User Test Go"),
      Dob: uiza.String("05/15/2018"),
      Gender: uiza.Int64(0),
      IsAdmin: uiza.Int64(1),
    }
    response, err := user.Create(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.User.Create(new CreatUserParameter()
      {
        Status = UserStatus.Active,
        UserName = Guid.NewGuid().ToString(),
        Email = string.Format("{0}@gmail.com", Guid.NewGuid().ToString()),
        PassWord = curentPW,
        FullName = Guid.NewGuid().ToString(),
        Avatar = "https://static.uiza.io/uiza_logo_128.png"
      });
    
      Console.WriteLine(string.Format("Create New User Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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 (1 = Yes, 0 = No)

    Response Parameters

    Parameter Type Description
    id string Identifier of user has been created

    Retrieve an user

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

    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' \
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      user = Uiza::User.retrieve "your-user-id"
      puts user.id
      puts user.username
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.user import User
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = User().retrieve("your-user-id")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain('your-workspace-api-domain.uiza.co');
    Uiza\Base::setApiKey('your-api-key');
    
    try {
      Uiza\User::retrieve("your-user-id");
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.User;
    import io.uiza.model.User.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = User.retrieve("<user-id>");
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.user.retrieve('your-user-id')
      .then((res) => {
        // Identifier of user
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/user"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.UserIDParams{ID: uiza.String("your-user-id")}
    response, err := user.Retrieve(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.User.Retrieve("your-user-id");
    
      Console.WriteLine(string.Format("Get User Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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

    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 Request

    curl -X GET \
      https://#{workspace_api_domain}/api/public/v3/admin/user \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      users = Uiza::User.list
      # or users = Uiza::User.list limit: 2, page: 2
      puts users.first.id
      puts users.first.username
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.user import User
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = User().list()
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\User::list();
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.User;
    import io.uiza.model.User.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonArray response = User.list();
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.user.list()
      .then((res) => {
        //Get list of user including all detail.
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/user"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.UserListParams{}
    response, err := user.List(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.User.List();
    
      Console.WriteLine(string.Format("List User Success, total record {0}", result.Data.Count));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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

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

    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
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      id: "your-user-id",
      status: 1,
      username: "user_test",
      email: "user_test@uiza.io",
      password: "FMpsr<4[dGPu?B#u",
      gender: 0,
      dob: "05/15/2018",
      avatar: "https://exemple.com/avatar.jpeg",
      fullname: "User Test",
      isAdmin: 0
    }
    
    begin
      user = Uiza::User.update params
      puts user.id
      puts user.username
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.user import User
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = User().update(id="your-user-id", status=1)
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain('your-workspace-api-domain.uiza.co');
    Uiza\Base::setApiKey('your-api-key');
    
    $params = [
      "status"  => 1,
      "username" => "test",
      "email" => "abc_test@uiza.io",
      "fullname" => "Test",
      "avatar" => "https://exemple.com/avatar.jpeg",
      "dob" => "05/15/2018",
      "gender" => 0,
      "password" => "FMpsr<4[dGPu?B#u",
      "isAdmin" => 1
    ];
    
    try {
      Uiza\User::update("your-user-id", $params);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.User;
    import io.uiza.model.User.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        Map<String, Object> params = new HashMap<>();
        params.put("status", Status.ACTIVE.getVal());
        params.put("username", "user_test");
        params.put("email", "user_test@uiza.io");
        params.put("fullname", "User Test");
        params.put("avatar", "https://exemple.com/avatar.jpeg");
        params.put("dob", "05/15/2018");
        params.put("gender", Gender.MALE.getVal());
        params.put("password", "FMpsr<4[dGPu?B#u");
        params.put("isAdmin", Role.ADMIN.getVal());
    
        try {
          JsonObject response = User.update("<user-id>", params);
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    const params = {
      'id': 'your-user-id',
      'status': 0,
      'username': 'user_test_110',
      'email': 'user_test@uiza.io',
      'avatar': 'https://exemple.com/avatar.jpeg',
      'fullname': 'User Test',
      'dob': '05/15/2018',
      'gender': 0,
      'password': '123456789',
      'isAdmin': 1  
    };
    
    uiza.user.update(params)
      .then((res) => {
        // Identifier of user wanted to update
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/user"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.UserUpdateParams{
      ID: uiza.String("your-user-id"),
      Status: uiza.Int64(0),
      Username: uiza.String("user_test_go"),
      Email: uiza.String("user_test_go@uiza.io"),
      Password: uiza.String("FMpsr<4[dGPu?B#u"),
      Avatar: uiza.String("https://exemple.com/avatar1.jpeg"),
      Fullname: uiza.String("User Test"),
      Dob: uiza.String("02/28/2011"),
      Gender: uiza.Int64(1),
      IsAdmin: uiza.Int64(0),
    }
    response, err := user.Update(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.User.Update(new UpdateUserParameter()
      {
        Id = "your-user-id",
        Status = UserStatus.Active,
        UserName = Guid.NewGuid().ToString(),
        Email = string.Format("{0}@gmail.com", Guid.NewGuid().ToString()),
        PassWord = Guid.NewGuid().ToString()
      });
    
      Console.WriteLine(string.Format("Update User Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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 (1 = Yes, 0 = No)

    Response Parameters

    Parameter Type Description
    id string Identifier of user has been updated

    Delete an user

    Permanently deletes an user. It cannot be undone. Also immediately cancels all token & information of this 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"
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      user = Uiza::User.delete "your-user-id"
      puts user.id
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.user import User
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = User().delete("your-user-id")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\User::delete("your-user-id");
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.User;
    import io.uiza.model.User.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = User.delete("<user-id>");
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.user.delete('your-user-id')
      .then((res) => {
        //  Result of user has been deleted
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/user"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.UserIDParams{ID:uiza.String("your-user-id")}
    response, err := user.Delete(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.User.Delete("your-user-id");
    
      Console.WriteLine(string.Format("Delete User Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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

    Update password allows Admin or User update their current password.

    Example Request

    curl -X PUT \
      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$"
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      id: "your-user-id",
      oldPassword: "FMpsr<4[dGPu?B#u",
      newPassword: "S57Eb{:aMZhW=)G$"
    }
    
    begin
      response = Uiza::User.change_password params
      puts response.result
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.user import User
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = User().change_password(
        id="your-user-id",
        old_password="S57Eb{:aMZhW=)G$",
        new_password="FMpsr<4[dGPu?B#u"
      )
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain('your-workspace-api-domain.uiza.co');
    Uiza\Base::setApiKey('your-api-key');
    
    $params = [
      "id" => "your-user-id",
      "oldPassword" => "FMpsr<4[dGPu?B#u",
      "newPassword" => "S57Eb{:aMZhW=)G$"
    ];
    
    try {
      Uiza\User::changePassword($params);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.User;
    import io.uiza.model.User.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        Map<String, Object> params = new HashMap<>();
        params.put("oldPassword", "FMpsr<4[dGPu?B#u");
        params.put("newPassword", "S57Eb{:aMZhW=)G$");
    
        try {
          JsonObject response = User.changePassword("<user-id>", params);
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    const params = {
      'id': 'your-user-id',
      'oldPassword': 'FMpsr<4[dGPu?B#u',
      'newPassword': 'S57Eb{:aMZhW=)G$'
    };
    
    uiza.user.change_password(params)
      .then((res) => {
        // Identifier of user has been reset password
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/user"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.UserChangePasswordParams{
      ID: uiza.String("your-user-id"),
      OldPassword: uiza.String("FMpsr<4[dGPu?B#u"),
      NewPassword: uiza.String("S57Eb{:aMZhW=)G$"),
    }
    response, err := user.ChangePassword(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.User.ChangePassword(new ChangePasswordParameter()
      {
        Id = "your-user-id",
        NewPassword = Guid.NewGuid().ToString(),
        OldPassWord = "curent password",
      });
    
      Console.WriteLine(string.Format("Change Password User Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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

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

    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' \
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      response = Uiza::User.logout
      puts response.message
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.user import User
    from uiza.authorization import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.api_key = "your-authorization"
    
    try:
      res, status_code = User().logout()
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\User::logOut();
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.User;
    import io.uiza.model.User.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = User.logout();
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.user.log_out()
      .then((res) => {
        // Identifier of task publish
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/user"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.UserIDParams{}
    response, err := user.LogOut(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.User.Logout();
      Console.WriteLine("Logout Success");
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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"]
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      name: "Sample Video",
      url: "https://example.com/video.mp4",
      inputType: "http",
      description: "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
      shortDescription: "Lorem Ipsum is simply dummy text.",
      poster: "https://example.com/picture001.jpeg",
      thumbnail: "https://example.com/picture002.jpeg"
    }
    
    begin
      entity = Uiza::Entity.create params
      puts entity.id
      puts entity.name
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.entity import Entity
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    entity_data = {
      "name": "Sample Video Python1",
      "url": "https://example.com/video.mp4",
      "inputType": "http",
      "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry."
    }
    
    try:
      res, status_code = Entity().create(**entity_data)
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    $params = [
      "name" => "Name entity",
      "url" => "http://google.com",
      "inputType" => "http"
    ];
    
    try {
      $entity = Uiza\Entity::create($params);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
     ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Entity;
    import io.uiza.model.Entity.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        Map<String, Object> params = new HashMap<>();
        params.put("name", "Sample Video");
        params.put("url", "https://example.com/video.mp4");
        params.put("inputType", InputType.HTTP.toString());
        params.put("description",
            "Lorem Ipsum is simply dummy text of the printing and typesetting industry");
        params.put("shortDescription", "Lorem Ipsum is simply dummy text.");
        params.put("poster", "https://example.com/picture001.jpeg");
        params.put("thumbnail", "https://example.com/picture002.jpeg");
    
        try {
          JsonObject response = Entity.create(params);
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    const params = {
      'name': 'Sample Video',
      'url': 'https://example.com/video.mp4',
      'inputType': 'http',
      'description': 'test'
    };
    
    uiza.entity.create(params)
      .then((res) => {
        //Identifier of entity has been created
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/entity"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    var typeHTTP = uiza.InputTypeHTTP
    params :=  &uiza.EntityCreateParams{
      Name: uiza.String("Sample Video"),
      URL: uiza.String("https://example.com/video.mp4"),
      InputType: &typeHTTP,
      Description: uiza.String("Lorem Ipsum is simply dummy text of the printing and typesetting industry"),
    }
    
    response, err := entity.Create(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Entity.Create(new CreateEntityParameter()
      {
        Name = "Sample Video",
        InputType = EntityInputTypes.S3Uiza,
        URL = ""
      });
    
      Console.WriteLine(string.Format("Create New Entity Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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",
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      entity = Uiza::Entity.retrieve "your-entity-id"
      puts entity.id
      puts entity.name
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.entity import Entity
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Entity().retrieve("your-entity-id")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\Entity::retrieve("your-entity-id");
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
     ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Entity;
    import io.uiza.model.Entity.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = Entity.retrieve("<entity-id>");
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.entity.retrieve('your-entity-id')
      .then((res) => {
        //Identifier of entity
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/entity"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.EntityRetrieveParams{ID: uiza.String("your-entity-id")}
    response, err := entity.Retrieve(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Entity.Retrieve("your-entity-id");
    
      Console.WriteLine(string.Format("Get Entity Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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' \
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      publishToCdn: "not-ready",
      metadataId: "your-folder/playlist-id"
    }
    
    begin
      entities = Uiza::Entity.list params
      # params is optional
      # or entities = Uiza::Entity.list
      puts entities.first.id
      puts entities.first.name
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.entity import Entity
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Entity().list(name="Title")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      $listEntity = Uiza\Entity::list();
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Entity;
    import io.uiza.model.Entity.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        Map<String, Object> params = new HashMap<>();
        params.put("publishToCdn", PublishStatus.NOT_READY.toString());
        params.put("metadataId", "<your-folder/playlist-id>");
    
        try {
          JsonArray response = Entity.list(params);
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.entity.list()
      .then((res) => {
        //Get list of entities including all detail.
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/entity"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.EntityListParams{}
    listEntity, err := entity.List(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result =  UizaServices.Entity.List(new RetrieveListEntitiesParameter()
      {
        publishToCdn = EntityPublishStatus.Success
      });
    
      Console.WriteLine(string.Format("Get Entity List Success, total record {0}", result.MetaData.result));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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"
        }
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      id: "your-entity-id",
      name: "Name edited"
    }
    
    begin
      entity = Uiza::Entity.update params
      puts entity.id
      puts entity.name
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.entity import Entity
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Entity().update(id="your-entity-id", name="Update title")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\Entity::update("your-enity-id", ["name" => "Name change"]);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Entity;
    import io.uiza.model.Entity.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        Map<String, Object> params = new HashMap<>();
        params.put("name", "Name edited");
        params.put("description", "Description edited");
    
        try {
          JsonObject response = Entity.update("<entity-id>", params);
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.entity.update('your-entity-id')
      .then((res) => {
        // Identifier of entity has been updated
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/entity"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.EntityUpdateParams{
      ID: uiza.String("your-entity-id"),
      Name: uiza.String("Update entity name"),
    }
    response, err := entity.Update(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result =uizaServices.Entity.Update(new UpdateEntityParameter()
      {
        Id = "your-entity-id",
        Name = "Sample update",
        Description = "Description update",
        ShortDescription = "ShortDescription update",
        Poster = "/example.com/updatePoster",
        Thumbnail = "/example.com/updateThumbnail"
      });
    
      Console.WriteLine(string.Format("Update Entity Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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",
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      entity = Uiza::Entity.delete "your-entity-id"
      puts entity.id
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.entity import Entity
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Entity().delete("your-entity-id")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\Entity::delete("your-entity-id");
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Entity;
    import io.uiza.model.Entity.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = Entity.delete("<entity-id>");
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.entity.delete('your-entity-id')
      .then((res) => {
        // Identifier of entity has been deleted
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/entity"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.EntityDeleteParams{ID: uiza.String("your-entity-id")}
    response, err := entity.Delete(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Entity.Delete("your-entity-id");
    
      Console.WriteLine(string.Format("Delete Entity Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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' \
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      entities = Uiza::Entity.search "your-keyword"
      puts entities.first.id
      puts entities.first.name
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.entity import Entity
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Entity().search(keyword="Title")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      $entity = Uiza\Entity::search(["keyword" => "sample"]);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Entity;
    import io.uiza.model.Entity.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonArray response = Entity.search("keyword");
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    const params = {
      'keyword': 'sample'
    };
    
    uiza.entity.search(params)
      .then((res) => {
        // Response search entity base on keyword entered
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/entity"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.EntitySearchParams{Keyword: uiza.String("Sample")}
    listEntity, err := entity.Search(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Entity.Search("Sample");
    
      Console.WriteLine(string.Format("Search Success, total record {0}", result.Data.Count));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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"
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      response = Uiza::Entity.publish "your-entity-id"
      puts response.message
      puts response.entityId
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.entity import Entity
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Entity().publish("your-entity-id")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      $entity = Uiza\Entity::publish(["id" => "your-entity-id"]);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Entity;
    import io.uiza.model.Entity.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = Entity.publish("<entity-id>");
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.entity.publish('your-entity-id')
      .then((res) => {
        // Identifier of task publish
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/entity"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.EntityPublishParams{ID: uiza.String("your-entity-id")}
    response, err := entity.Publish(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Entity.Publish("your-entity-id");
    
      Console.WriteLine(string.Format("Publish Entity Success : entityId = {0} ", result.Data.entityId));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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' \
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      response = Uiza::Entity.get_status_publish "your-entity-id"
      puts response.progress
      puts response.status
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.entity import Entity
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Entity().get_status_publish("your-entity-id")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\Entity::getStatusPublish("your-entity-id");
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Entity;
    import io.uiza.model.Entity.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = Entity.getStatusPublish("<entity-id>");
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.entity.get_status_publish('your-entity-id')
      .then((res) => {
        //Progress of task publish, will be success when reach 100
        // Status of task publish (processing, success, error)
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/entity"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.EntityPublishParams{ID: uiza.String("your-entity-id")}
    response, err := entity.GetStatusPublish(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result =  UizaServices.Entity.GetStatusPublish("your-entity-id");
    
      Console.WriteLine(string.Format("Get Status Publish Success : temp_access_id = {0} ", result.Data.status));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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/status

    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
    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' \
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      response = Uiza::Entity.get_aws_upload_key
      puts response.bucket_name
      puts response.region_name
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.entity import Entity
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Entity().get_aws_upload_key()
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\Entity::getAWSUploadKey();
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Entity;
    import io.uiza.model.Entity.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = Entity.getAwsUploadKey();
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.entity.get_aws_upload_key()
      .then((res) => {
        // The response body will return you the paramaters that used for input to aws sdk , then upload your files to Uiza’s storage
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/entity"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    response, err := entity.GetAWSUploadKey()
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result =  UizaServices.Entity.GetAWSUploadKey();
    
      Console.WriteLine(string.Format("Get AWS Upload Key Success : temp_access_id = {0} ", result.Data.temp_access_id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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"
    }
    

    HTTP Request

    GET https://#{workspace_api_domain}/api/public/v3/admin/app/config/aws

    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"
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      name: "Folder sample",
      type: "folder",
      description: "Folder description"
    }
    
    begin
      category = Uiza::Category.create params
      puts category.id
      puts category.name
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.category import Category
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    category_data = {
      "name": "Test name 1",
      "type": "folder"
    }
    
    try:
      res, status_code = Category().create(**category_data)
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    $params = [
      "name" => "Folder sample",
      "type" => "folder",
      "description" => "Folder description"
    ];
    
    try {
      Uiza\Category::create($params);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Category;
    import io.uiza.model.Category.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        Map<String, Object> params = new HashMap<>();
        params.put("name", "Playlist Sample");
        params.put("type", Type.PLAYLIST.toString());
    
        try {
          JsonObject response = Category.create(params);
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    const params = {
      'name': 'Folder sample 2',
      'type': 'folder',
      'orderNumber': 1,
      'description': 'Folder description',
      'icon': 'https://exemple.com/icon.png'
    };
    
    uiza.category.create(params)
      .then((res) => {
        //Identifier of category has been created
      }).catch((err) => {
        //Error
      });
    
    import (
      "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/category"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    var typeCategory = uiza.CategoryFolderType
    params := &uiza.CategoryCreateParams{
      Name: uiza.String("Category name example"),
      Type: &typeCategory,
      Description: uiza.String("Category description"),
      Icon: uiza.String("https:///example.com/image002.png"),
      OrderNumber:uiza.Int64(1),
    }
    
    response, err := category.Create(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Category.Create(new CreateCategoryParameter()
      {
        Name = string.Format("Category name {0}", Guid.NewGuid().ToString()),
        Type = CategoryTypes.Folder
      });
    
      Console.WriteLine(string.Format("Create New Category Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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' \
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      category = Uiza::Category.retrieve "your-category-id"
      puts category.id
      puts category.name
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.category import Category
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Category().retrieve("your-category-id")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\Category::retrieve("your-category-id");
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Category;
    import io.uiza.model.Category.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = Category.retrieve("<category-id>");
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.category.retrieve('your-category-id')
      .then((res) => {
        //Identifier of category
      }).catch((err) => {
        //Error
      });
    
    import (
      "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/category"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.CategoryIDParams{ID :uiza.String("your-category-id")}
    response, err := category.Retrieve(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Category.Retrieve("your-category-id");
    
      Console.WriteLine(string.Format("Get Category Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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' \
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      categories = Uiza::Category.list
      puts categories.first.id
      puts categories.first.name
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.category import Category
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Category().list()
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      $listCategory = Uiza\Category::list();
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Category;
    import io.uiza.model.Category.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonArray response = Category.list();
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.category.list()
      .then((res) => {
        //Identifier of category list
      }).catch((err) => {
        //Error
      });
    
    import (
      "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/category"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.CategoryListParams{
      Page:uiza.Int64(2),
      Limit:uiza.Int64(10),
    }
    
    listData, err := category.List(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var listResult = UizaServices.Category.List();
    
      Console.WriteLine(string.Format("Get List Category Success, total record {0}", listResult.MetaData.result));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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"
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      id: "your-category-id",
      name: "Folder edited",
      type: "folder"
    }
    
    begin
      category = Uiza::Category.update params
      puts category.id
      puts category.name
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.category import Category
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Category().update(id="your-category-id", name="Update title")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    $params = [
      "name" => "Folder edited",
      "type" => "folder"
    ];
    
    try {
      Uiza\Category::update("your-category-id", $params);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Category;
    import io.uiza.model.Category.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        Map<String, Object> params = new HashMap<>();
        params.put("name", "Playlist Sample");
        params.put("type", Type.PLAYLIST.toString());
    
        try {
          JsonObject response = Category.update("<category-id>", params);
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    const params = {
      'id': 'your-category-id',
      'name': 'Folder sample 312',
      'type': 'folder',
      'orderNumber': 1,
      'description': 'Folder description',
      'icon': 'https://exemple.com/icon.png'
    }
    
    uiza.category.update(params)
      .then((res) => {
        //Identifier of category has been updated
      }).catch((err) => {
        //Error
      });
    
    import (
      "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/category"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    var typeCategory = uiza.CategoryFolderType
    params := &uiza.CategoryUpdateParams{
      ID: uiza.String("your-category-id"),
      Name: uiza.String(""),
      Type: &typeCategory,
      Description:uiza.String(""),
      Icon:uiza.String(""),
      OrderNumber:uiza.Int64(2),
    }
    
    response, err := category.Update(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Category.Update(new UpdateCategoryParameter()
      {
        Id = "your-category-id",
        Name = string.Format("Category name {0}", Guid.NewGuid().ToString()),
        Type = CategoryTypes.PlayList
      });
    
      Console.WriteLine(string.Format("Update Category Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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"
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      category = Uiza::Category.delete "your-category-id"
      puts category.id
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.category import Category
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Category().delete("your-category-id")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\Category::delete("your-category-id");
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Category;
    import io.uiza.model.Category.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = Category.delete("<category-id>");
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.category.delete('your-category-id')
      .then((res) => {
        //Identifier of category has been deleted
      }).catch((err) => {
        //Error
      });
    
    import (
      "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/category"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.CategoryIDParams{ID: uiza.String("your-category-id")}
    response, err := category.Delete(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Category.Delete("your-category-id");
      Console.WriteLine(string.Format("Delete Category Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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"]
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      entityId: "your-entity-id",
      metadataIds: ["your-category-id-1", "your-category-id-2"]
    }
    
    begin
      relations = Uiza::Category.create_relation params
      puts relations.first.id
      puts relations.first.entityId
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.category import Category
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Category().create_relation(
        entity_id="your-entity-id",
        metadata_ids=["your-category-id-1","your-category-id-2"]
      )
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    $params = [
      "entityId" => "your-entity-id",
      "metadataIds" => ["your-category-id-1","your-category-id-2"]
    ];
    
    try {
      Uiza\Category::createRelation($params);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Category;
    import io.uiza.model.Category.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        Map<String, Object> params = new HashMap<>();
        params.put("entityId", "<entity-id>");
        params.put("metadataIds", new String[] {"<category-id-1>", "<category-id-2>"});
    
        try {
          JsonArray response = Category.createRelation(params);
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    const params = {
      'entityId': 'your-entity-id',
      'metadataIds': ['your-category-id-1','your-category-id-2']
    };
    
    uiza.category.create_relation(params)
      .then((res) => {
        //Identifier of relation between entity and category has been created
      }).catch((err) => {
        //Error
      });
    
    import (
      "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/category"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.CategoryRelationParams{
      EntityId: uiza.String("your-entity-id"),
      MetadataIds: []*string{
      uiza.String("your-category-id-1"),
      uiza.String("your-category-id-2"),
    }}
    response, err := category.CreateRelation(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var listMetadata = new List<string>()
      {
        "your-category-id-1",
        "your-category-id-2"
      };
    
      var result = UizaServices.Category.CreateRelation(new CategoryRelationParameter()
      {
        EntityId = "your-entity-id",
        MetadataIds = listMetadata
      });
      Console.WriteLine(string.Format("Create Category Relation Success, total record {0}", result.MetaData.result));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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 Yes
    metadataIds string Identifier of category Yes

    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"]
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      entityId: "your-entity-id",
      metadataIds: ["your-category-id-1", "your-category-id-2"]
    }
    
    begin
      relations = Uiza::Category.delete_relation params
      puts relations.first.id
      puts relations.first.entityId
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.category import Category
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Category().delete_relation(
        entity_id="your-entity-id",
        metadata_ids=["your-category-id-1","your-category-id-2"]
      )
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    $params = [
      "entityId" => "your-entity-id",
      "metadataIds" => ["your-category-id-1","your-category-id-2"]
    ];
    
    try {
      Uiza\Category::deleteRelation($params);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Category;
    import io.uiza.model.Category.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        Map<String, Object> params = new HashMap<>();
        params.put("entityId", "<entity-id>");
        params.put("metadataIds", new String[] {"<category-id-1>", "<category-id-2>"});
    
        try {
          JsonArray response = Category.deleteRelation(params);
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    const params = {
      'entityId': 'your-entity-id',
      'metadataIds': ['your-category-id-1','your-category-id-2']
    };
    
    uiza.category.delete_relation(params)
      .then((res) => {
        //Identifier of relation between entity and category has been deleted
      }).catch((err) => {
        //Error
      });
    
    import (
      "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/category"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.CategoryRelationParams{
      EntityId: uiza.String("your-entity-id"),
      MetadataIds: []*string{
      uiza.String("your-category-id-1"),
      uiza.String("your-category-id-2"),
    }}
    response, err := category.DeleteRelation(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var listMetadata = new List<string>()
      {
        "your-category-id-1",
        "your-category-id-2"
      };
    
      var result = UizaServices.Category.DeleteRelation(new CategoryRelationParameter()
      {
        EntityId = "your-entity-id",
        MetadataIds = listMetadata
      });
      Console.WriteLine(string.Format("Delete Category Relation Success, total record {0}", result.MetaData.result));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      name: "FTP Uiza",
      description: "FTP of Uiza, use for transcode",
      storageType: "ftp",
      host: "ftp-example.uiza.io"
    }
    
    begin
      storage = Uiza::Storage.add params
      puts storage.id
      puts storage.name
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.storage import Storage
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    storage_data = {
      "name":"FTP Uiza Test",
      "description":"FTP of Uiza, use for transcode",
      "storageType":"ftp",
      "host":"ftp-example.uiza.io"
    }
    
    try:
      res, status_code = Storage().add(**storage_data)
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    $params = [
      "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
    ];
    
    try {
      Uiza\Storage::add($params);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Storage;
    import io.uiza.model.Storage.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        Map<String, Object> params = new HashMap<>();
        params.put("name", "FTP Uiza");
        params.put("host", "ftp-example.uiza.io");
        params.put("port", 21);
        params.put("storageType", StorageType.FTP.toString());
    
        try {
          JsonObject response = Storage.add(params);
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    const params = {
      'name': 'axon',
      'description': 'axon of Uiza, use for transcode',
      'storageType': 'ftp',
      'host': 'axon-example.uiza.io',
      'username': 'uiza',
      'password': '=59x@LPsd+w7qW',
      'port': 21
    }
    
    uiza.storage.add(params)
      .then((res) => {
        //Identifier of storage has been add
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/storage"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params :=  &uiza.StorageAddParams{
      Name: uiza.String("FTP Uiza"),
      Host: uiza.String("ftp-example.uiza.io"),
      Port: uiza.Int64(21),
      StorageType: uiza.String("ftp"),
      Username: uiza.String("uiza"),
      Password: uiza.String("=59x@LPsd+w7qW"),
      Description: uiza.String("FTP of Uiza, use for transcode"),
    }
    
    response, err := storage.Add(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Storage.Add(new AddStorageParameter()
      {
        Name = "FTP Uiza",
        Host = "ftp-example.uiza.io",
        Description = "FTP of Uiza, use for transcode",
        StorageType = StorageInputTypes.Ftp,
        UserName = "uiza",
        Password = "=59x@LPsd+w7qW",
        Port = 21
      });
    
      Console.WriteLine(string.Format("Add New Storage Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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' \
    
    require "json"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      storage = Uiza::Storage.retrieve "your-storage-id"
      puts storage.id
      puts storage.name
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.storage import Storage
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Storage().retrieve("your-storage-id")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\Storage::retrieve("your-storage-id");
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Storage;
    import io.uiza.model.Storage.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = Storage.retrieve("<storage-id>");
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.storage.retrieve('your-storage-id')
      .then((res) => {
        //Identifier of storage has been retrive
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/storage"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.StorageRetrieveParams{ID: uiza.String("your-storage-id")}
    response, err := storage.Retrieve(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Storage.Retrieve("your-storage-id");
    
      Console.WriteLine(string.Format("Get Storage Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      id: "your-storage-id",
      name: "FTP Uiza edited",
      host: "ftp-example.uiza.io",
      port: 21,
      storageType: "ftp"
    }
    
    begin
      storage = Uiza::Storage.update params
      puts storage.id
      puts storage.name
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.storage import Storage
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Storage().update(id="your-storage-id", name="Update title")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    $params = [
      "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
    ];
    
    try {
      Uiza\Storage::update("your-storage-id", $params);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Storage;
    import io.uiza.model.Storage.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        Map<String, Object> params = new HashMap<>();
        params.put("name", "FTP Uiza");
        params.put("host", "ftp-example.uiza.io");
        params.put("port", 21);
        params.put("storageType", StorageType.FTP.toString());
    
        try {
          JsonObject response = Storage.update("<storage-id>", params);
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    const params = {
      'id': 'your-storage-id',
      '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
    };
    
    uiza.storage.update(params)
      .then((res) => {
        //Identifier of storage has been update
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/storage"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params :=  &uiza.StorageUpdateParams{
      ID: uiza.String("your-storage-id"),
      Name: uiza.String("FTP Uiza Edit"),
      Host: uiza.String("ftp-example.uiza.io"),
      Port: uiza.Int64(21),
      StorageType: uiza.String("ftp"),
      Username: uiza.String("uiza"),
      Password: uiza.String("=59x@LPsd+w7qW"),
      Description: uiza.String("FTP of Uiza, use for transcode"),
    }
    
    response, err := storage.Update(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = uizaServices.Storage.Update(new UpdateStorageParameter()
      {
        Id = "your-storage-id",
        Name = "FTP Uiza Update",
        Host = "ftp-example.uiza.io",
        Description = "FTP of Uiza, use for transcode Update",
        StorageType = StorageInputTypes.S3,
        AwsAccessKey = "ASIAV*******GPHO2DTZ",
        AwsSecretKey = "dp****cx2mE2lZxsSq7kV++vWSL6RNatAhbqc",
        Port = 22
      });
      Console.WriteLine(string.Format("Update Storage Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
        var result = ex.UizaInnerException.Error;
    }
    

    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"
      }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      storage = Uiza::Storage.remove "your-storage-id"
      puts storage.id
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.storage import Storage
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Storage().remove("your-storage-id")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\Storage::remove("your-storage-id");
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Storage;
    import io.uiza.model.Storage.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = Storage.remove("<storage-id>");
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.storage.remove('your-storage-id')
      .then((res) => {
        //Identifier of storage has been removed
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/storage"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.StorageRemoveParams{ID: uiza.String("your-storage-id")}
    response, err := storage.Remove(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Storage.Remove("your-storage-id");
    
      Console.WriteLine(string.Format("Remove Storage Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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,
        "dvr":1,
        "description":"This is for test event",
        "poster":"//image1.jpeg",
        "thumbnail":"//image1.jpeg",
        "linkStream":[
                  "https://playlist.m3u8"
                ],
        "resourceMode":"single"
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      name: "test event",
      mode: "push",
      encode: 1,
      dvr: 1,
      description: "This is for test event",
      poster: "https://example.com/poster.jpeg",
      thumbnail: "https://example.com/poster.jpeg",
      linkStream: [
        "https://playlist.m3u8"
      ],
      resourceMode: "single"
    }
    
    begin
      live = Uiza::Live.create params
      puts live.id
      puts live.name
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.live import Live
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    live_data = {
      "name":"test event python 1",
      "mode":"push",
      "encode":1,
      "dvr":1,
      "linkStream":[
        "https://playlist.m3u8"
      ],
      "resourceMode":"single"
    }
    
    try:
      res, status_code = Live().create(**live_data)
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    $params = [
      "name" => "test event",
      "mode" => "push",
      "encode" => 1,
      "dvr" => 1,
      "description" => "This is for test event",
      "poster" => "//image1.jpeg",
      "thumbnail" => "//image1.jpeg",
      "linkStream" => [
        "https://playlist.m3u8"
      ],
      "resourceMode" => "single"
    ];
    
    try {
      Uiza\Live::create($params);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Live;
    import io.uiza.model.Live.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        Map<String, Object> params = new HashMap<>();
        params.put("name", "<your-live-event-name>");
        params.put("mode", Mode.PULL.toString());
        params.put("encode", Encode.ENCODE.getVal());
        params.put("dvr", Dvr.ACTIVE_RECORD.getVal());
        params.put("linkStream", new String[] {"stream-url1.com", "stream-url2.com"});
        params.put("resourceMode", ResourceMode.SINGLE.toString());
    
        try {
          JsonObject response = Live.create(params);
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    const params = {
      'name': 'test event',
      'mode': 'push',
      'encode': 1,
      'dvr': 1,
      'description': 'This is for test event',
      'poster': '//image1.jpeg',
      'thumbnail': '//image1.jpeg',
      'linkStream': [
        'https://playlist.m3u8'
      ],
      'resourceMode': 'single'
    };
    
    uiza.live.create(params)
      .then((res) => {
          //Identifier of event has been created
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/live"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    dvrType := uiza.DvrTypeOne
    resourceMode := uiza.ResourceModeSingle
    
    params := &uiza.LiveCreateParams{
      Name: uiza.String("test event Go"),
      Mode: uiza.String("push"),
      Encode: uiza.Int64(1),
      Dvr: &dvrType,
      Description: uiza.String("This is for test event"),
      Thumbnail: uiza.String("//image1.jpeg"),
      LinkStream: &[]string{*uiza.String("https://playlist.m3u8")},
      ResourceMode: &resourceMode,
    }
    response, err := live.Create(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Live.Create(new CreateLiveStreamingParameter()
      {
        Name = Guid.NewGuid().ToString(),
        Mode = "push",
        Encode = EncodeTypes.Encode,
        Drv = DvrTypes.ActiveFeatureRecord,
        LinkStream = new List<string>() { "https://playlist.m3u8" },
        Poster = "//image1.jpeg",
        Thumbnail = "//image1.jpeg",
        ResourceMode = ResourceModes.Single
      });
    
      Console.WriteLine(string.Format("Create Live Streaming Success New Id = {0}", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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 = encode) Yes
    dvr enum Feed after streamed will be recorded as a mp4 file
    0: No record

    1: Active Feature record
    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/entity \
      -H 'Authorization: uap-7442d4b99eb349b1bb678614e64cf064-1405ee51' \
      -H 'Content-Type: application/json' \
      -d '{
        "id":"8b83886e-9cc3-4eab-9258-ebb16c0c73de"
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      live = Uiza::Live.retrieve "your-live-id"
      puts live.id
      puts live.name
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.live import Live
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Live().retrieve("your-live-id")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\Live::retrieve("your-live-id");
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Live;
    import io.uiza.model.Live.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = Live.retrieve("<live-event-id>");
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.live.retrieve('your-live-id')
      .then((res) => {
        //Identifier of live event has been retrieved
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/live"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.LiveRetrieveParams{ID: uiza.String("your-live-id")}
    response, err := live.Retrieve(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Live.Retrieve("your-live-id");
    
      Console.WriteLine(string.Format("Retrieve Live Streaming Success, Id = {0}", retrieveResult.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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,
        "dvr":1
        "resourceMode":"single"
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      id: "your-live-id",
      name: "live test",
      mode: "pull",
      encode: 0,
      dvr: 1,
      resourceMode: "single"
    }
    
    begin
      live = Uiza::Live.update params
      puts live.id
      puts live.name
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.live import Live
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Live().update(id="your-live-id", name="Update title")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    $params = [
      "name" => "live test",
      "mode" => "pull",
      "encode" => 0,
      "dvr" => 1,
      "resourceMode" => "single"
    ];
    
    try {
      Uiza\Live::update("your-live-id", $params);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Live;
    import io.uiza.model.Live.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        Map<String, Object> params = new HashMap<>();
        params.put("name", "<your-live-event-name>");
        params.put("mode", Mode.PULL.toString());
        params.put("encode", Encode.ENCODE.getVal());
        params.put("dvr", Dvr.ACTIVE_RECORD.getVal());
        params.put("linkStream", new String[] {"stream-url1.com", "stream-url2.com"});
        params.put("resourceMode", ResourceMode.SINGLE.toString());
    
        try {
          JsonObject response = Live.update("<live-event-id>", params);
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    const params = {
      'id': 'your-live-id',
      'name': 'live test',
      'mode': 'pull',
      'encode': 0,
      'dvr': 1,
      'resourceMode': 'single'
    };
    
    uiza.live.update(params)
      .then((res) => {
        //Identifier of event has been updated
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/live"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    dvrType := uiza.DvrTypeOne
    resourceMode := uiza.ResourceModeSingle
    params := &uiza.LiveUpdateParams{
      ID: uiza.String("your-live-id"),
      Name: uiza.String("Live streaming Update name"),
      Dvr: &dvrType,
      ResourceMode: &resourceMode,
    }
    response, err := live.Update(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Live.Update(new UpdateLiveStreamingParameter()
      {
        Id = "your-live-id",
        Name = Guid.NewGuid().ToString(),
        Mode = "pull",
        Encode = EncodeTypes.Encode,
        Drv = DvrTypes.ActiveFeatureRecord,
        ResourceMode = ResourceModes.Single
      });
    
      Console.WriteLine(string.Format("Update Live Streaming Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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
    dvr enum Feed after streamed will be recorded as a mp4 file
    0: No record

    1: Active Feature record
    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"
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      live = Uiza::Live.start_feed "your-live-id"
      puts live.id
      puts live.name
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.live import Live
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Live().start_feed("your-live-id")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\Live::startFeed(["id" => "your-live-id"]);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Live;
    import io.uiza.model.Live.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = Live.startFeed("<live-event-id>");
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.live.start_feed('your-live-id')
      .then((res) => {
        // Identifier of event
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/live"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.LiveIDParams{ID: uiza.String("your-live-id")}
    response, err := live.StartFeed(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Live.StartFeed("your-live-id");
    
      Console.WriteLine(string.Format("Start Live Feed Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      response = Uiza::Live.get_view "your-live-id"
      puts response.stream_name
      puts response.watchnow
      puts response.day
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.live import Live
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Live().get_view("your-live-id")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\Live::getView(["id" => "your-live-id"]);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Live;
    import io.uiza.model.Live.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = Live.getView("<live-event-id>");
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.live.get_view('your-live-id')
      .then((res) => {
        // Identifier of record (get from list record)
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/live"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.LiveIDParams{ID: uiza.String("your-live-id")}
    response, err := live.GetView(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Live.GetView("your-live-id");
    
      Console.WriteLine(string.Format("Get View Live Feed Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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

    Get view for list of live feeds

    Example Request

    curl -X GET \
      https://#{workspace_api_domain}/api/public/v3/live/entity/tracking/list-current-view?streamNames=f79cd626-bd60-4ef9-9790-c2066bcbdae9,cbc8999a-f018-4197-8944-52aff4c27932 \
      -H 'Authorization: uap-a9ad1b44c05747e8870917e5ae9e956b-05a4fd49' \
      -H 'Cache-Control: no-cache'
    

    This API use to get number of views for a list of live events.

    Example Response

    {
        "data": [
          {
            "stream_name": "cbc8999a-f018-4197-8944-52aff4c27932",
            "watchnow": 1,
            "day": 1558341120000
          },
          {
            "stream_name": "f79cd626-bd60-4ef9-9790-c2066bcbdae9",
            "watchnow": 1,
            "day": 1558341120000
          }
        ],
        "metadata": {
          "total": 1,
          "result": 1,
          "page": 1,
          "limit": 20
        },
        "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?streamNames=f79cd626-bd60-4ef9-9790-c2066bcbdae9,cbc8999a-f018-4197-8944-52aff4c27932

    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"
    }'
    
    require "uiza"
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      live = Uiza::Live.stop_feed "your-live-id"
      puts live.id
      puts live.name
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.live import Live
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Live().stop_feed("your-live-id")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\Live::stopFeed(["id" => "your-live-id"]);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Live;
    import io.uiza.model.Live.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = Live.stopFeed("<live-event-id>");
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.live.stop_feed('your-live-id')
      .then((res) => {
        // Identifier of event
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/live"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.LiveIDParams{ID: uiza.String("your-live-id")}
    response, err := live.StopFeed(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Live.StopFeed("your-live-id");
    
      Console.WriteLine(string.Format("Stop A Live Feed Success", result.Data.entityId));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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

    List all recorded files

    Example Request

    curl -X GET \
      https://#{workspace_api_domain}/api/public/v3/live/entity/dvr \
      -H 'Authorization: uap-bfd2314eac8d463395a304d3141d172b-6a641000' \
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      live = Uiza::Live.list_recorded
      puts live.first.id
      puts live.first.entityId
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.live import Live
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Live().list_recorded()
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\Live::listRecorded();
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Live;
    import io.uiza.model.Live.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonArray response = Live.listRecorded();
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.live.list_recorded()
      .then((res) => {
        // Identifier of record
      }).catch((err) => {
        //Error
      });
    
    
    import (
      "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/live"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.LiveListRecordedParams{
      Page:uiza.Int64(1),
      Limit:uiza.Int64(2),
    }
    
    response, err := live.ListRecorded(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Live.ListRecorded();
    
      Console.WriteLine(string.Format("Success Get List All Recorded Files, total record {0}", result.MetaData != null ? result.MetaData.total : 0));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    Retrieves list of recorded file after streamed (only available when your live event has turned on Record feature)

    Example Response

    {
         "data": [
             {
                 "id": "040df935-61c4-46f7-a41f-0a899ebaa2cc",
                 "entityId": "ee122e85-553f-4621-bc77-1396191d5846",
                 "channelName": "dcb8686f-d0f8-4a0f-8b92-22db339eb315",
                 "feedId": "3e3b75df-e6fa-471c-b386-8f44b8a34b6c",
                 "eventType": "pull",
                 "startTime": "2018-12-13T16:28:29.000Z",
                 "endTime": "2018-12-13T18:28:29.000Z",
                 "length": "7200",
                 "fileSize": "9276182",
                 "extraInfo": null,
                 "endpointConfig": "s3-uiza-dvr",
                 "createdAt": "2018-12-13T19:28:43.000Z",
                 "updatedAt": "2018-12-13T19:28:43.000Z",
                 "entityName": "Christmas 2018 Holidays Special | Best Christmas Songs & Cartoons for Kids & Babies on Baby First TV"
             },
             {
                 "id": "3fec45e9-932b-4efe-b97f-dc3053acaa05",
                 "entityId": "47e804bc-d4e5-4442-8f1f-20341a156a70",
                 "channelName": "e9034eac-4905-4f9a-8e79-c0bd67e49dd5",
                 "feedId": "12830696-87e3-4209-a877-954f8f008964",
                 "eventType": "pull",
                 "startTime": "2018-12-13T14:14:14.000Z",
                 "endTime": "2018-12-13T16:14:14.000Z",
                 "length": "7200",
                 "fileSize": "439858038",
                 "extraInfo": null,
                 "endpointConfig": "s3-uiza-dvr",
                 "createdAt": "2018-12-13T17:30:42.000Z",
                 "updatedAt": "2018-12-13T17:30:42.000Z",
                 "entityName": "WATCH: SpaceX to Launch Falcon 9 Rocket #Spaceflight CRS16 @1:16pm EST"
             }
         ],
         "metadata": {
             "total": 2,
             "result": 2,
             "page": 1,
             "limit": 20
         },
         "version": 3,
         "datetime": "2018-12-20T04:16:52.893Z",
         "policy": "public",
         "requestId": "f3f1b857-e6ca-4419-b610-947e62583481",
         "serviceName": "api",
         "message": "OK",
         "code": 200,
         "type": "SUCCESS"
     }
    

    HTTP Request

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

    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 record
    entityId string Entity's ID correspond to record
    channelName string Name of channel
    eventType string Event type can be pull or push
    startTime string Time start record
    endTime string Time end record
    length string Length of record
    entityName string Name of live event

    Delete a record file

    Example Request

    curl -X DELETE \
      https://#{workspace_api_domain}/api/public/v3/live/entity/dvr \
      -H 'Authorization: uap-bfd2314eac8d463395a304d3141d172b-6a641000' \
      -d '{
        "id":"009596b1-f751-4102-86f7-7290a9f3f0cf"
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      live = Uiza::Live.delete "your-record-id" # Identifier of record (get from list record)
      puts live.id
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.live import Live
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Live().delete("your-record-id") # Identifier of record (get from list record)
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\Live::delete("your-record-id"); // Identifier of record (get from list record)
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Live;
    import io.uiza.model.Live.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = Live.delete("<record-id>"); // Identifier of record (get from list record)
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.live.delete('your-record-id') // Identifier of record (get from list record)
      .then((res) => {
        // Identifier of deleting a record
      }).catch((err) => {
        //Error
      });
    
    import (
      "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/live"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    param := &uiza.LiveIDParams{ID: uiza.String("your-record-id")} // Identifier of record (get from list record)
    response, err := live.Delete(param)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.LiveStreaming.Delete("your-live-id");
    
      Console.WriteLine(string.Format("Delete Live Feed Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    Delete a recorded file

    Example Response

    {
         "data": {
             "id": "009596b1-f751-4102-86f7-7290a9f3f0cf"
         },
         "version": 3,
         "datetime": "2018-12-20T04:16:52.893Z",
         "policy": "public",
         "requestId": "f3f1b857-e6ca-4419-b610-947e62583481",
         "serviceName": "api",
         "message": "OK",
         "code": 200,
         "type": "SUCCESS"
     }
    

    HTTP Request

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

    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 record (get from list record)

    Response Parameters

    Parameter Type Description
    id string Identifier of record has been deleted

    Convert into VOD

    Example Request

    curl -X POST \
      https://#{workspace_api_domain}/api/public/v3/live/entity/dvr/convert-to-vod \
      -H 'Authorization: uap-bfd2314eac8d463395a304d3141d172b-6a641000' \
      -H 'Content-Type: application/json' \
      -d '{
        "id":"3fec45e9-932b-4efe-b97f-dc3053acaa05"
    }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      live = Uiza::Live.convert_to_vod "your-record-id" # Identifier of record (get from list record)
      puts live.id
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.live import Live
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Live().convert_into_vod("your-record-id") # Identifier of record (get from list record)
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\Live::convertToVOD(["id" => "your-record-id"]); // Identifier of record (get from list record)
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Live;
    import io.uiza.model.Live.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = Live.convertToVod("<record-id>");
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.live.convert_to_vod('your-record-id') // Identifier of record (get from list record)
      .then((res) => {
        // Identifier of record (get from list record)
      }).catch((err) => {
        //Error
      });
    
    import (
      "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/live"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    param := &uiza.LiveIDParams{ID: uiza.String("your-recorded-id")} // Identifier of record (get from list record)
    response, err := live.ConvertToVOD(param)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Live.ConvertToVOD("your-live-id");
    
      Console.WriteLine(string.Format("Convert VOD Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    Convert recorded file into VOD entity. After converted, your file can be stream via Uiza's CDN.

    Example Response

    {
        "data": {
            "id": "03739912-d781-4d5a-aaf8-7262691a5d0c"
        },
        "version": 3,
        "datetime": "2018-12-20T05:14:02.488Z",
        "policy": "public",
        "requestId": "438daa50-696f-4152-8e6d-36f0ba7ed66f",
        "serviceName": "api",
        "message": "OK",
        "code": 200,
        "type": "SUCCESS"
    }
    

    HTTP Request

    POST https://#{workspace_api_domain}/api/public/v3/live/entity/dvr/convert-to-vod

    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 record (get from list record)

    Response Parameters

    Parameter Type Description
    id string Identifier of entity has been converted

    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"
      }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      url: "https://callback-url.uiza.co",
      method: "POST"
    }
    
    begin
      callback = Uiza::Callback.create params
      puts callback.id
      puts callback.url
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.callback import Callback
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    callback_data = {
      "url":"https://callback-url-python.uiza.co",
      "method":"GET"
    }
    
    try:
      res, status_code = Callback().create(**callback_data)
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    $params = [
      "url" => "https://callback-url.uiza.co",
      "method" => "POST"
    ];
    
    try {
      Uiza\Callback::create($params);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Callback;
    import io.uiza.model.Callback.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        Map<String, Object> params = new HashMap<>();
        params.put("url", "<your-server-callback>");
        params.put("method", Method.POST);
    
        try {
          JsonObject response = Callback.create(params);
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    const params = {
      'url': 'https://callback-url.uiza.co',
      'method': 'POST'
    };
    
    uiza.callback.create(params)
      .then((res) => {
        //Identifier of callback has been created
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/callback"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    callbackMethodPOST := uiza.HTTPMethodPost
    params := &uiza.CallbackCreateParams{
      Url:    uiza.String("https://callback-url.uiza.co"),
      Method: &callbackMethodPOST,
    }
    
    response, err := callback.Create(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var createResult = UizaServices.Callback.Create(new CreateCallbackParameter()
      {
        Url = "https://callback-url.uiza.co",
        Method = CallbackMethodTypes.Post,
      });
    
      Console.WriteLine(string.Format("Create New Callback Id = {0} Success", createResult.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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' \
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      callback = Uiza::Callback.retrieve "your-callback-id"
      puts callback.id
      puts callback.url
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.callback import Callback
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Callback().retrieve("your-callback-id")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\Callback::retrieve("your-callback-id");
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Callback;
    import io.uiza.model.Callback.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = Callback.retrieve("<callback-id>");
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.callback.retrieve('your-callback-id')
      .then((res) => {
        //Identifier of callback has been retrieved
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/callback"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.CallbackIDParams{ID: uiza.String("your-callback-id")}
    response, err := callback.Retrieve(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Callback.Retrieve("your-callback-id");
    
      Console.WriteLine(string.Format("Get Callback Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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"
      }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      id: "your-callback-id",
      url: "https://callback-url.uiza.co",
      method: "GET"
    }
    
    begin
      callback = Uiza::Callback.update params
      puts callback.id
      puts callback.url
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.callback import Callback
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Callback().update(id="your-callback-id", method="POST")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    $params = [
      "url" => "https://callback-url.uiza.co",
      "method" => "POST"
    ];
    
    try {
      Uiza\Callback::update("your-callback-id", $params);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Callback;
    import io.uiza.model.Callback.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        Map<String, Object> params = new HashMap<>();
        params.put("url", "<your-server-callback>");
        params.put("method", Method.POST);
    
        try {
          JsonObject response = Callback.update("<callback-id>", params);
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    const params = {
      'id': 'your-callback-id',
      'url': 'https://callback-url.uiza.co',
      'method': 'GET'
    };
    
    uiza.callback.update(params)
      .then((res) => {
        //Identifier of callback has been updated
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/callback"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    callbackMethodPOST := uiza.HTTPMethodPost
    params := &uiza.CallbackUpdateParams{
        ID:    uiza.String("your-callback-id"),
        Url:    uiza.String("https://callback-url.uiza.commm"),
        Method: &callbackMethodPOST,
    }
    
    response, err := callback.Update(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Callback.Update(new UpdateCallbackParameter()
      {
        Id = "your-callback-id",
        Url = "https://callback-url.uiza.co/update",
        Method = CallbackMethodTypes.Post
      });
    
      Console.WriteLine(string.Format("Update Callback Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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"
      }'
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    begin
      callback = Uiza::Callback.delete "your-callback-id"
      puts callback.id
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.callback import Callback
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Callback().delete("your-callback-id")
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?php
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    try {
      Uiza\Callback::delete("your-callback-id");
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Callback;
    import io.uiza.model.Callback.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        try {
          JsonObject response = Callback.delete("<callback-id>");
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    uiza.callback.delete('your-callback-id')
      .then((res) => {
        //Identifier of callback has been deleted
      }).catch((err) => {
        //Error
      });
    
    import (
      uiza "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/callback"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    params := &uiza.CallbackIDParams{ID: uiza.String("your-callback-id")}
    response, err := callback.Delete(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var result = UizaServices.Callback.Delete("your-callback-id");
    
      Console.WriteLine(string.Format("Delete Callback Id = {0} Success", result.Data.id));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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' \
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      start_date: "YYYY-MM-DD hh:mm",
      end_date: "YYYY-MM-DD hh:mm",
      metric: "rebuffer_count"
    }
    
    begin
      response = Uiza::Analytic.get_total_line params
      puts response.first.rebuffer_count
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.analytic import Analytic
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Analytic().get_total_line(
        start_date="2018-11-01 20:00",
        end_date="2019-11-02 20:00",
        metric="rebuffer_count"
      )
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    $params = [
      "start_date" => "YYYY-MM-DD hh:mm",
      "end_date" => "YYYY-MM-DD hh:mm",
      "metric" => "rebuffer_count"
    ];
    
    try {
      Uiza\Analytic::getTotalLine($params);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Analytic;
    import io.uiza.model.Analytic.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        Map<String, Object> params = new HashMap<>();
        params.put("start_date", "2019-01-01 07:00");
        params.put("end_date", "2019-03-01 07:00");
        params.put("metric", Metric.REBUFFER_PERCENTAGE.toString());
    
        try {
          JsonArray response = Analytic.getTotalLine(params);
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    const params = {
      'start_date': '2019-02-28 00:00',
      'end_date': '2019-03-01 23:00',
      'metric': 'rebuffer_count'
    };
    
    uiza.analytic.get_total_line(params)
      .then((res) => {
        //Identifier of get_total_line
      }).catch((err) => {
        //Error
      });
    
    import (
      "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/analytic"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    metric := uiza.AnalyticMetricRebufferCount
    params := &uiza.AnalyticTotalLineParams{
      StartDate: uiza.String("2018-11-01 08:00"),
      EndDate: uiza.String("2019-11-19 14:00"),
      Metric: &metric,
    }
    
    response, err := analytic.GetTotalLine(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var getTotalLine = UizaServices.Analytic.GetTotalLine(new AnalyticTotalLineParameter()
      {
        StartDate = @"2019-02-28 20:00",
        EndDate = @"2019-03-01 20:00",
        Metric = MetricType.RebufferCount
      });
    
      Console.WriteLine(string.Format("Get Total Line Success, total record {0}", getTotalLine.Data.Count));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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' \
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      start_date: "YYYY-MM-DD hh:mm",
      end_date: "YYYY-MM-DD hh:mm",
      type_filter: "country"
    }
    
    begin
      response = Uiza::Analytic.get_type params
      puts response.first.name
      puts response.first.total_view
      puts response.first.percentage_of_view
    rescue Uiza::Error::UizaError => e
      puts "description_link: #{e.description_link}"
      puts "code: #{e.code}"
      puts "message: #{e.message}"
    rescue StandardError => e
      puts "message: #{e.message}"
    end
    
    import uiza
    
    from uiza.api_resources.analytic import Analytic
    from uiza.exceptions import ServerException
    
    uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    uiza.authorization = "your-authorization"
    
    try:
      res, status_code = Analytic().get_type(
        start_date="2018-11-01 20:00",
        end_date="2019-11-02 20:00",
        type_filter="country"
      )
    
      print("res ", res)
    except ServerException as e:
      raise e
    except Exception as e:
      raise e
    
    <?
    require __DIR__."/../vendor/autoload.php";
    
    Uiza\Base::setWorkspaceApiDomain("your-workspace-api-domain.uiza.co");
    Uiza\Base::setAuthorization("your-authorization");
    
    $params = [
      "start_date" => "YYYY-MM-DD",
      "end_date" => "YYYY-MM-DD",
      "type_filter" => "country"
    ];
    
    try {
      Uiza\Analytic::getType($params);
    } catch(\Uiza\Exception\ErrorResponse $e) {
      print($e);
    }
    ?>
    
    import java.util.*;
    import com.google.gson.*;
    
    import io.uiza.Uiza;
    import io.uiza.exception.*;
    import io.uiza.model.Analytic;
    import io.uiza.model.Analytic.*;
    
    public class Main {
    
      public static void main(String[] args) {
        Uiza.workspaceApiDomain = "your-workspace-api-domain.uiza.co";
        Uiza.authorization = "your-authorization";
    
        Map<String, Object> params = new HashMap<>();
        params.put("start_date", "2019-01-01");
        params.put("end_date", "2019-03-01");
        params.put("type_filter", TypeFilter.COUNTRY.toString());
    
        try {
          JsonArray response = Analytic.getType(params);
          System.out.println(response);
        } catch (UizaException e) {
          System.out.println("Status is: " + e.getStatusCode());
          System.out.println("Message is: " + e.getMessage());
          System.out.println("Description link is: " + e.getDescriptionLink());
        } catch (Exception e) {
          System.out.println(e);
        }
      }
    }
    
    const uiza = require('uiza');
    uiza.workspace_api_domain('your-workspace-api-domain.uiza.co');
    uiza.authorization('your-authorization-key');
    
    const params = {
      'start_date': '2019-01-01',
      'end_date': '2019-03-01',
      'type_filter': 'country'
    };
    
    uiza.analytic.get_type(params)
      .then((res) => {
        //Identifier of get_total_line
      }).catch((err) => {
        //Error
      });
    
    import (
      "github.com/uizaio/api-wrapper-go"
      "github.com/uizaio/api-wrapper-go/analytic"
    )
    
    func init() {
      Uiza.WorkspaceAPIDomain = "your-workspace-api-domain.uiza.co"
      Uiza.Authorization = "your-authorization"
    }
    
    analyticTypeFilter := uiza.AnalyticTypeFilterCountry
    params := &uiza.AnalyticTypeParams{
      StartDate: uiza.String("2019-01-01"),
      EndDate: uiza.String("2019-02-28"),
      TypeFilter: &analyticTypeFilter,
    }
    response, err := analytic.GetType(params)
    if err != nil {
      log.Printf("%v\n", err)
    } else {
      log.Printf("%v\n", response)
    }
    
    using System;
    using Uiza.Net.Configuration;
    using Uiza.Net.Enums;
    using Uiza.Net.Parameters;
    using Uiza.Net.Services;
    
    UizaConfiguration.SetupUiza(new UizaConfigOptions
    {
      WorkspaceApiDomain = "your-workspace-api-domain.uiza.co",
      Authorization = "your-authorization"
    });
    
    try
    {
      var getType = UizaServices.Analytic.GetType(new AnalyticTypeParameter()
      {
        StartDate = @"2019-01-01",
        EndDate = @"2019-03-01",
        TypeFilter = TypeFilter.Country
      });
    
      Console.WriteLine(string.Format("Get Type Success, total record {0}", getType.Data.Count));
      Console.ReadLine();
    }
    catch (UizaException ex)
    {
      Console.WriteLine(ex.Message);
      Console.ReadLine();
    }
    

    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 5 type of filter: country, device, title, player, os

    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, os ] Yes

    Response Parameters

    Parameter Type Description
    name string name of filter (can be country, device name, title, player name or os)
    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' \
    
    require "uiza"
    
    Uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
    Uiza.authorization = "your-authorization"
    
    params = {
      start_date: "YYYY-MM-DD hh:mm",
      end_date: "YYYY-MM-DD hh:mm",
      type: "your-metric-type"
    }
    
    begin
      response = Uiza::Analytic.get_line params
      puts response.first.day_time
      puts response.first.value
    rescue Uiza::Error::UizaError => e
      puts "description_