Owners

Use the Owners API to perform account management. The Owners API supports the following methods:

Method Description

/owners/api-key/add

Adds an API key.

/owners/api-key/toggle

Toggles the status of an existing API key.

/owners/api-key/delete

Deletes an API key.

/owners/api-key/add

Generates an API key.

An API key generated by this method is immediately available for use.

Response parameters are described below.

Response Parameter

Type

Description

new_api_key

string

Indicates the value assigned to the new API key.

new_key_id

string

Indicates the ID assigned to the new API key.

error

int

Indicates either an error code or 0 to indicate that the API key was created.

Sample request/response:

The Call() function, which is imported from uplynk_api2_auth module, prepares the message body and digital signature.

from uplynk_api2_auth import Call

print(Call('/api2/owners/api-key/add'))

{
	"new_api_key": "a735c56ea4014685bc74c0a375236cc5",
	"new_key_id": "af54986547374c36a64776bec97d6ac2",
	"error": 0
}

/owners/api-key/toggle

Updates the status of an API key.

Status changes take place immediately. Disabing a key will also invalidate any tokenized playback URLs generated by that key.

Request parameters are described below.

Request Parameter

Type

Description

key_to_toggle

string

Identifies the API key whose status will be toggled.

is_enabled

Boolean

Defines the status of the API key.

Valid values are:

  • True: Sets the API key's status to enabled.
  • False: Sets the API key's status to disabled.

Passing an invalid value for this parameter will disable the specified API key.

Response parameters are described below.

Request Parameter

Type

Description

key_toggled

string

Indicates the API key whose status was changed.

is_enabled

Boolean

Indicates the status applied to the API key.

Valid values are:

  • True: Indicates that the API key was enabled.
  • False: Indicates that the API key was disabled.

error

int

Indicates either an error code or 0 to indicate the API key's status was updated.

Sample request/response:

The Call() function, which is imported from uplynk_api2_auth module, prepares the message body and digital signature.

from uplynk_api2_auth import Call

print(Call('/api2/owners/api-key/toggle', key_to_toggle='a735c56ea4014685bc74c0a375236cc5', is_enabled=False))

{
    "key_toggled" : "a735c56ea4014685bc74c0a375236cc5",
    "is_enabled" : False,
    "error" : 0
}

/owners/api-key/delete

Deletes an API key.

Deleting an API key takes effect immediately. Any tokenized playback URLs generated with this key will be immediately invalidated.

A request parameter is described below.

Request Parameter

Type

Description

key_to_delete

string

Identifies the API key to be deleted.

A response parameter is described below.

Response Parameter

Type

Description

error

int

Indicates either an error code or 0 to indicate the API key's status was deleted.

Sample request/response:

The Call() function, which is imported from uplynk_api2_auth module, prepares the message body and digital signature.

from uplynk_api2_auth import Call

print(Call('/api2/owners/api-key/delete', key_to_delete='b846d67fb5125796cd85d1b486347dd6'))

{
    "error" : 0
}