Customer Sign In

upLynk

Integration APIs: Subowners

Overview

In the upLynk system, a subowner is a limited-use account login attached to your upLynk account. By using the subowner integration APIs, you can create additional login credentials for accessing your account, and you can assign different levels of permissions to those credentials. For example, the slicer, which is used for preparing assets, requires a username and API key. You may need to allow some people in your organization to slice content but do not wish to give them access to call APIs. With the subowner APIs, you can create a seperate username/API key for them and grant them just enough permission to slice content.

Unlike normal accounts, the username for a subowner must not be an email address. Instead, a convention is used that consists of a short prefix for your account, followed by a dot, followed by a single word username. For example, "ptvn.dbrueck" and "ptvn.tbye" might be two subowners created for a particular account. The system does not enforce the convention, but it may in the future. Currently the prefixes are not registered with the system, so you are free to choose any prefix you want.

Permissions

The following permissions are available for use with subowners:

sliceAccess to use the slicers for preparing content (live and VOD)
apiAccess the integration APIs

More permissions will be added as needed. Note that if you grant a subowner the 'api' permission, that subowner could in turn create additional subowners attached to your account.

/api2/subowners/create

Creates a new subowner attached to your account.

Request parameters
usernamestringNew subowner username
passwordstringNew subowner password

Do not use this password to authenticate a Live Slicer to your Uplynk account. Please use an API key instead. Leverage this endpoint to generate an API key that only authorizes slicer-related actions by creating a sub-owner that has only been granted the "slice" permission.

permissionslist(optional) permissions to grant
Response parameters
(See subowners/get API)
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
Call('/api2/subowners/create', username='ibm.dave',
                              password='lamepass', permissions=['slice'])

{
  "username": "ibm.dave",
  "permissions": [
    "slice"
  ],
  "api_key": "dyWViZwTqm/etPT4SB0sTdfz2msh3D9u+iihl4dG",
  "all_api_keys": {
    "dyWViZwTqm/etPT4SB0sTdfz2msh3D9u+iihl4dG": {
      "enabled": True
    }
    "a735c56ea4014685bc74c0a375236cc5": {
      "enabled": False
    }
  }
  "id": "f534c6e0ebba4d70b2b4c31659e50952",
  "error": 0
}

/api2/subowners/get

Retrieves details for a subowner.

Request parameters
idstringSubowner ID
Response parameters
idstringSubowner ID
usernamestringLogin username
permissionslistPermissions granted to this subowner
api_keystringSecret key for making API calls
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
Call('/api2/subowners/get', id='f534c6e0ebba4d70b2b4c31659e50952')

{
  "username": "ibm.dave",
  "permissions": [
    "slice"
  ],
  "api_key": "dyWViZwTqm/etPT4SB0sTdfz2msh3D9u+iihl4dG",
  "all_api_keys": {
    "dyWViZwTqm/etPT4SB0sTdfz2msh3D9u+iihl4dG": {
      "enabled": True
    }
    "a735c56ea4014685bc74c0a375236cc5": {
      "enabled": False
    }
  }
  "id": "f534c6e0ebba4d70b2b4c31659e50952",
  "error": 0
}

Note that subowners are always assigned a secret API key even if the subowner cannot use it due to the lack of permissions.

/api2/subowners/list

Lists all subowners for your account.

Request parameters
(none)
Response parameters
subownerslistSubowner objects (each is like subowners/get response)
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Call('/api2/subowners/list')

{
  "subowners": [
    {
      "username": "ibm.dave",
      "api_key": "dyWViZwTqm/etPT4SB0sTdfz2msh3D9u+iihl4dG",
      "all_api_keys": {
        "dyWViZwTqm/etPT4SB0sTdfz2msh3D9u+iihl4dG": {
          "enabled": True
        }
        "a735c56ea4014685bc74c0a375236cc5": {
          "enabled": False
        }
      }
      "id": "f534c6e0ebba4d70b2b4c31659e50952",
      "permissions": [
        "slice"
      ]
    }
  ],
  "error": 0
}

/api2/subowners/update

Modifies an existing subowner.

Request parameters
idstringSubowner ID
passwordstring(optional) New password to set

Do not use this password to authenticate a Live Slicer to your Uplynk account. Please use an API key instead. Leverage this endpoint to only authorize this sub-owner to perform slicer-related actions by only granting the "slice" permission to a sub-owner.

permissionslist(optional) Permissions granted to this subowner
newkeyinteger(optional) Pass 1 to have the system generate a new secret API key.
Response parameters
(See subowners/get API)
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
Call('/api2/subowners/update', id='f534c6e0ebba4d70b2b4c31659e50952',
                               permissions=['slice'], newkey=1)

{
  "username": "ibm.dave",
  "permissions": [
    "slice"
  ],
  "api_key": "dDd3IAo63+IrP5TqRYRnH03gtdcsRpap5lpnlQ7G",
  "all_api_keys": {
    "dyWViZwTqm/etPT4SB0sTdfz2msh3D9u+iihl4dG": {
      "enabled": True
    }
    "a735c56ea4014685bc74c0a375236cc5": {
      "enabled": False
    }
  }
  "id": "f534c6e0ebba4d70b2b4c31659e50952",
  "error": 0
}

/api2/subowners/delete

Erases a subowner.

Request parameters
idstringSubowner ID
Response parameters
msgstringConfirmation that the subowner was erased
Example
1
2
3
4
5
6
Call('/api2/subowners/delete', id='f534c6e0ebba4d70b2b4c31659e50952')

{
  "msg": "Deleted",
  "error": 0
}