Use the Owners API to perform account management. The Owners API supports the following methods:
Method | Description |
---|---|
Adds an API key. |
|
Toggles the status of an existing API key. |
|
Deletes an API key. |
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 }
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:
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:
|
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 }
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 }