Administrators
Common parameters and their type in URLs:
NAME | TYPE | DESCRIPTION |
---|---|---|
organizationId | string | You can get your Organizations’ ID with the Get a list of accessible Organizations API call |
accountId | string | You can get your Account’s ID with the Get a list of Accounts under Organization API call |
email | string | As email addresses can contain characters with special meaning in URLs, you have to base64 encode email addresses in API calls |
Get a list of accounts under Organization
This API call is used to get all the Organizations accessible to the user represented by the token.
GET https://api.video.ibm.com/organizations/{organizationId}/accounts.json
Example of the request:
GET /organizations/ZzzqXZ/accounts.json HTTP/1.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950
Note that the token in the above call is only an example.
Success response
Upon success, a set of key-value pairs is returned under an accounts
element with an HTTP Status code of 200.
KEY | TYPE | DESCRIPTION |
---|---|---|
id | string | ID |
title | string | Display name |
user_name | string | Account name |
name | string | product_name with portal_title |
product_name | string | Type of the Account |
portal_title | string | Portal title |
is_enterprise | boolean | True if the account is an EVS account |
is_auth_api | boolean | True if the account is an EVS account with Auth API |
channel_count | integer | Number of channels under the Account |
video_count | integer | Number of videos under the Account |
Example of a success response:
{"accounts": [{"id": "12345678","title": "Video Portal","user_name": "abcde8ddeb3","name": "Streaming Manager for Enterprise - Video Portal","product_name": "Enterprise Video Streaming","portal_title": "Video Portal",
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR CONDITIONS |
---|---|
401 Unauthorized | The provided access token is missing, revoked, expired or malformed |
403 Forbidden | The provided access token has no access to the user |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Get a list of Channels under account
This API call is used to get all the Channels under an account that accessible to theuser represented by the token.
GET https://api.video.ibm.com/users/{accountId}/channels.json
See the Get list of the user’s channels endpoint.
Get a list of Organization administrators
This API call is used to list all the administrators that belong to an Organization.
GET https://api.video.ibm.com/organizations/{organizationId}/administrators.json
Query Parameters
PARAMETER | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
email | string | OPTIONAL | Filter administrators by email. Minimum 3 characters |
order | string | OPTIONAL | Order administrators. Allowed values: email , email-desc |
page | number | OPTIONAL | Page number. The first page’s index is 1 |
pagesize | number | OPTIONAL | Size of a page. 1 <= pagesize <= 50 |
Example of the request:
GET /organizations/ZzzqXZ/administrators.json HTTP/1.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950
Note that the token in the above call is only an example.
Success response
Upon success, a set of key-value pairs is returned under a administrators
element with an HTTP Status code of 200.
KEY | TYPE | DESCRIPTION |
---|---|---|
email | string | administrator’s email address |
access_level | string | Access level: org_admin , limited |
Additionally there is a paging
element in the response with the following values:
KEY | TYPE | DESCRIPTION |
---|---|---|
previous | string | Link to the previous page (if exists) |
next | string | Link to the next page (if exists) |
page_count | number | Number of available pages |
item_count | number | Total number of items |
Example of a success response:
{"administrators": [{"email": "jen@example.com","access_level": "org_admin"},{"email": "bob@example.com","access_level": "limited"
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR CONDITIONS |
---|---|
401 Unauthorized | The provided access token is missing, revoked, expired or malformed |
403 Forbidden | The provided access token has no access to the user |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Add a new administrator
This API call is used to add an administrator to an Organization.
POST https://api.video.ibm.com/organizations/{organizationId}/administrators.json
Parameters
KEY | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
email | string | REQUIRED | administrator’s email address |
access_level | string | REQUIRED | Access level: org_admin , limited |
Users added with limited
access can’t access the Organization, you must add account/Channel level access right(s) to them. (Update an administrator’s account level access, Update an administrator’s channel level accesses, Set all Channel access levels)
The Content-Type of the request should be application/x-www-form-urlencoded.
Example of the request:
POST /organizations/ZzzqXZ/administrators.json HTTP/1.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950Content-Type: application/x-www-form-urlencodedemail=bill%40example.com&access_level=limited
Note that the token in the above call is only an example.
Success response
Upon success the response body is empty with an HTTP Status code of 204.
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR CONDITIONS |
---|---|
400 Bad Request | We couldn’t add the new administrator to your Organization with the provided parameters |
401 Unauthorized | The provided access token is missing, revoked, expired or malformed |
403 Forbidden | The provided access token has no access to the user |
409 Conflict | User already added |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Get an administrator
This API call is used to check the administrator statusof someone based on their email address.
GET https://api.video.ibm.com/organizations/{organizationId}/administrators/{email}.json
Make sure the email
parameter is base64 encoded in the URL.
Example of the request:
GET /organizations/ZzzqXZ/administrators/amlsbEBleGFtcGxlLmNvbQ==.json HTTP/1.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950
Note that the token in the above call is only an example.
Success response
Upon success, a set of key-value pairs is returned with an HTTP Status code of 200.
KEY | TYPE | DESCRIPTION |
---|---|---|
email | string | administrator’s email address |
access_level | string | Access level: org_admin , limited |
Example of a success response:
{"email": "jill@example.com","access_level": "org_admin"}
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR CONDITIONS |
---|---|
401 Unauthorized | The provided access token is missing, revoked, expired or malformed |
403 Forbidden | The provided access token has no access to the user |
404 Not Found | administrator doesn’t exist under the Organization |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Update an administrator
This API call is used to change the role of an administrator inside an organization.
PUT https://api.video.ibm.com/organizations/{organizationId}/administrators/{email}.json
Make sure the email
parameter is base64 encoded in the URL.
Parameters
KEY | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
email | string | REQUIRED | administrator’s email address |
access_level | string | REQUIRED | Access level: org_admin , limited |
If you update a user’s access level they will lose any previously set permission setting under the Organization.
Users modified to limited
access can’t access the Organization, you must add account/Channel level access right(s) to them. (Update an administrator’s Account level access, Update an administrator’s channel level accesses, Set all Channel access levels)
The Content-Type of the request should be application/x-www-form-urlencoded.
Example of the request:
PUT /organizations/ZzzqXZ/administrators/amlsbEBleGFtcGxlLmNvbQ==.json HTTP/1.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950Content-Type: application/x-www-form-urlencodedemail=jill%40example.com&access_level=limited
Note that the token in the above call is only an example.
Success response
Upon success the response body is empty with an HTTP Status code of 204.
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR CONDITIONS |
---|---|
400 Bad Request | We couldn’t update the administrator in your Organization with the provided parameters (eg.: invalid access_level ) |
401 Unauthorized | The provided access token is missing, revoked, expired or malformed |
403 Forbidden | The provided access token has no access to the user |
404 Not Found | administrator doesn’t exist under the Organization |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Delete an administrator
This API call is used to remove an administrator from an organization.
DELETE https://api.video.ibm.com/organizations/{organizationId}/administrators/{email}.json
Make sure the email
parameter is base64 encoded in the URL.
Example of the request:
DELETE /organizations/ZzzqXZ/administrators/amlsbEBleGFtcGxlLmNvbQ==.json HTTP/1.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950
Note that the token in the above call is only an example.
Success response
Upon success the response body is empty with an HTTP Status code of 204.
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR CONDITIONS |
---|---|
400 Bad Request | Occurs if the administrator is the last Organization administrator |
401 Unauthorized | The provided access token is missing, revoked, expired or malformed |
403 Forbidden | The provided access token has no access to the user |
404 Not Found | administrator doesn’t exist under the Organization |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Check if an administrator is the last Organization administrator in the Organization
There must always be at least one Organization administrator in an Organization. This call is used to check if a particular useris the only administrator within an Organization.
GET https://api.video.ibm.com/organizations/{organizationId}/administrators/{email}/islastadmin.json
Make sure the email
parameter is base64 encoded in the URL.
Example of the request:
GET /organizations/ZzzqXZ/administrators/amlsbEBleGFtcGxlLmNvbQ==/islastadmin.json HTTP/1.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950
Note that the token in the above call is only an example.
Success response
Upon success, a set of key-value pairs is returned with an HTTP Status code of 200.
KEY | TYPE | DESCRIPTION |
---|---|---|
is_last_admin | boolean | True if the administrator is the last Organization administrator in the Organization |
Example of a success response:
{"is_last_admin": true}
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR CONDITIONS |
---|---|
401 Unauthorized | The provided access token is missing, revoked, expired or malformed |
403 Forbidden | The provided access token has no access to the user |
404 Not Found | administrator doesn’t exist under the Organization |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Get an administrator’s account level accesses
This call is used to get an administrator’s access levels to accounts under the Organization.
GET https://api.video.ibm.com/organizations/{organizationId}/administrators/{email}/accounts.json
Make sure the email
parameter is base64 encoded in the URL.
Example of the request:
GET /organizations/ZzzqXZ/administrators/amlsbEBleGFtcGxlLmNvbQ==/accounts.json HTTP/1.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950
The token in the above call is only an example.
Success response
Upon success, a set of key-value pairs is returned under an accounts
element with an HTTP Status code of 200.
KEY | TYPE | DESCRIPTION |
---|---|---|
id | string | Account ID |
access_level | string | Possible values: account_admin , limited , no_access |
limited_access
means that the administrator has Channel level access at least one of the Channels under the account.
Example of a success response:
{"accounts": [{"id": "12345678","access_level": "no_access"}]}
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR CONDITIONS |
---|---|
401 Unauthorized | The provided access token is missing, revoked, expired or malformed |
403 Forbidden | The provided access token has no access to the user |
404 Not Found | administrator doesn’t exist under the Organization |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Get an administrator’s Account access level
This call allows to get an Account under the Organization with the access level of the administrator.
GET https://api.video.ibm.com/organizations/{organizationId}/administrators/{email}/accounts/{accountId}.json
Make sure the email
parameter is base64 encoded in the URL.
Example of the request:
GET /organizations/ZzzqXZ/administrators/amlsbEBleGFtcGxlLmNvbQ==/accounts/12345678.json HTTP/1.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950
The token in the above call is only an example.
Success response
Upon success, a set of key-value pairs is returned with an HTTP Status code of 200.
KEY | TYPE | DESCRIPTION |
---|---|---|
id | string | Account ID |
access_level | string | Possible values: account_admin , limited , no_access |
limited_access
means that the administrator has Channel level access at least one of the Channels under the Account.
Example of a success response:
{"id": "12345678","access_level": "limited"}
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR CONDITIONS |
---|---|
401 Unauthorized | The provided access token is missing, revoked, expired or malformed |
403 Forbidden | The provided access token has no access to the user |
404 Not Found | administrator doesn’t exist under the Organization |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Update an administrator’s Account level access
This call allows to get an Account under the Organization with the access level of the administrator.
PUT https://api.video.ibm.com/organizations/{organizationId}/administrators/{email}/accounts/{accountId}.json
Make sure the email
parameter is base64 encoded in the URL.
Parameters
KEY | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
access_level | string | REQUIRED | Access level: account_admin , limited , no_access |
If you update a user’s access level they will lose any previously set permission settings under the Organization.
Users modified to limited
access can’t access the Account, you have to add Channel level access right(s) to them. (Update an administrator’s channel level accesses, Set all Channel access levels)
The Content-Type of the request should be application/x-www-form-urlencoded.
Example of the request:
PUT /organizations/ZzzqXZ/administrators/amlsbEBleGFtcGxlLmNvbQ==/accounts/12345678.json HTTP/1.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950Content-Type: application/x-www-form-urlencodedaccess_level=limited
Note that the token in the above call is only an example.
Success response
Upon success the response body is empty with an HTTP Status code of 204.
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR CONDITIONS |
---|---|
400 Bad Request | We couldn’t update the administrator’s access level with the provided parameters (eg.: administrator is an Organization administrator) |
401 Unauthorized | The provided access token is missing, revoked, expired or malformed |
403 Forbidden | The provided access token has no access to the user |
404 Not Found | administrator doesn’t exist under the Organization |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
List of channels with access levels
This call is used to get the Channels which the administrator has specific access to. It also returns the access level.
GET https://api.video.ibm.com/organizations/{organizationId}/administrators/{email}/accounts/{accountId}/channelAccess.json
Make sure the email
parameter is base64 encoded in the URL.
Query Parameters
PARAMETER | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
channel | number | OPTIONAL | Filter channels by name. Minimum 2 characters |
page | number | OPTIONAL | Page number. The first page’s index is 1 |
pagesize | number | OPTIONAL | Size of a page. 1 <= pagesize <= 50 |
Example of the request:
GET /organizations/ZzzqXZ/administrators/amlsbEBleGFtcGxlLmNvbQ==/accounts/12345678/channelAccess.json HTTP/1.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950
Note that the token in the above call is only an example.
Success response
Upon success, a set of key-value pairs is returned under a channels
element with an HTTP Status code of 200.
KEY | TYPE | DESCRIPTION |
---|---|---|
id | string | Channel ID |
title | string | Channel’s name |
access_level | string | Access level |
The access_level
value is one of the followings:
channel.admin
- a permission field (hash) from one of the Organization’s Custom Role
Additionally, there is a paging
element in the response with the following values:
KEY | TYPE | DESCRIPTION |
---|---|---|
previous | string | Link to the previous page (if exists) |
next | string | Link to the next page (if exists) |
page_count | number | Number of available pages |
item_count | number | Total number of items |
Example of a success response:
{"channels": [{"id": "123456789","title": "test channel 1","access_level": "channel.admin"},{"id": "123456799",
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR CONDITIONS |
---|---|
401 Unauthorized | The provided access token is missing, revoked, expired or malformed |
403 Forbidden | The provided access token has no access to the user |
404 Not Found | administrator doesn’t exist under the Organization |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Update an administrator’s Channel level accesses
This call is used to update an administrator’s Channel access levels inside an account under the Organization.
PUT https://api.video.ibm.com/organizations/{organizationId}/administrators/{email}/accounts/{accountId}/channelAccess.json
Make sure the email
parameter is base64 encoded in the URL.
Parameters
KEY | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
set | array | OPTIONAL | An array of key-value pairs of Channel IDs (id ) and access levels (role ). Access level: channel.admin or a permission field (hash) from one of the Organization’s Custom Role |
delete | array | OPTIONAL | List of Channel IDs which you want to revoke access from the administrator |
The Content-Type of the request should be application/x-www-form-urlencoded.
Example of the request:
PUT /organizations/ZzzqXZ/administrators/amlsbEBleGFtcGxlLmNvbQ==/accounts/12345678/channelAccess.json HTTP/1.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950Content-Type: application/x-www-form-urlencodedset[0][id]=12348765&set[0][role]=channel.admin&set[1][id]=12348764&set[1][role]=channel.admin&delete[]=123454&delete[]=123456
Note that the token in the above call is only an example.
Success response
Upon success the response body is empty with an HTTP Status code of 204.
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR CONDITIONS |
---|---|
400 Bad Request | We couldn’t update the administrator’s access level with the provided parameters (eg.: invalid Channel ID) |
401 Unauthorized | The provided access token is missing, revoked, expired or malformed |
403 Forbidden | The provided access token has no access to the user |
404 Not Found | administrator doesn’t exist under the Organization |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Get all Channel access levels
This API call lists the previously set access levels to all Channels under an account.
GET https://api.video.ibm.com/organizations/{organizationId}/administrators/{email}/accounts/{accountId}/allChannelAccess.json
Make sure the email
parameter is base64 encoded in the URL.
Example of the request:
GET /organizations/ZzzqXZ/administrators/amlsbEBleGFtcGxlLmNvbQ==/accounts/12345678/allChannelAccess.json HTTP/1.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950
Note that the token in the above call is only an example.
Success response
Upon success, a set of key-value pairs is returned under a channels
element with an HTTP Status code of 200.
KEY | TYPE | DESCRIPTION |
---|---|---|
all_channel_access | string | Access level |
The all_channel_access
value is one of the followings:
channel.admin
- a permission field (hash) from one of the Organization’s Custom Role
Example of a success response:
{"all_channel_access": "channel.admin"}
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR CONDITIONS |
---|---|
401 Unauthorized | The provided access token is missing, revoked, expired or malformed |
403 Forbidden | The provided access token has no access to the user |
404 Not Found | administrator doesn’t exist under the Organization or she/he does not have an all channel access level |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Set all Channel access levels
This API call is used to set access levels to all Channels under an account.
PUT https://api.video.ibm.com/organizations/{organizationId}/administrators/{email}/accounts/{accountId}/allChannelAccess.json
Make sure the email
parameter is base64 encoded in the URL.
Parameters
KEY | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
all_channel_access | string | REQUIRED | Access level |
The all_channel_access
value must be one of the followings:
channel.admin
- a permission field (hash) from one of the Organization’s Custom Role
The Content-Type of the request should be application/x-www-form-urlencoded.
Example of the request:
PUT /organizations/ZzzqXZ/administrators/amlsbEBleGFtcGxlLmNvbQ==/accounts/12345678/allChannelAccess.json HTTP/1.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950Content-Type: application/x-www-form-urlencodedall_channel_access=channel.admin
The token in the above call is only an example.
Success response
Upon success the response body is empty with an HTTP Status code of 204.
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR CONDITIONS |
---|---|
401 Unauthorized | The provided access token is missing, revoked, expired or malformed |
403 Forbidden | The provided access token has no access to the user |
404 Not Found | administrator doesn’t exist under the Organization |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |