/owners/api-key/toggle
Updates the status of an API key.
Status changes take place immediately. Disabling 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 API Auth
(see below), prepares the message body and digital signature.
🔓
API Auth
Open Recipe
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
}