Skip to main contentIBM Video Streaming Developers

Advanced Access Control Lists

This API allows you to manage Advanced Access Control Lists. Currently only 2 lists are allowed per user. If there is at least one list for the given user it allows to set Advanced Access Rules on the Dashboard for videos/channels.

Get Lists

This call allows to get the currently uploaded lists for a user.

GET https://api.video.ibm.com/users/{userId}/access-control/lists.json

Example of the request:

GET /users/123456/access-control/lists.json HTTP/1.1
Host: api.video.ibm.com
Authorization: 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 lists element with an HTTP Status code of 200.

KEYTYPEDESCRIPTION
idnumberThe unique id of the list
namestringThe name of the list (it must be unique under a user)
itemsarrayList of group names

Example of a success response:

{
"lists": [
{
"id": 1,
"name": "list 1",
"items": [
"a",
"b"
]

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
401 UnauthorizedThe provided access token is missing, revoked, expired or malformed
403 ForbiddenThe provided access token has no access to the user
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Create a new List

This call allows to create a new list for a user.

POST https://api.video.ibm.com/users/{userId}/access-control/lists.json

Parameters

The parameters for the POST request:

PARAMETERTYPEIMPORTANCEDESCRIPTION
namestringREQUIREDList name
itemsarrayREQUIREDList items

The Content-Type of the request should be application/x-www-form-urlencoded.

Example of the request:

POST users/123456/access-control/lists.json HTTP/1.1
Host: api.video.ibm.com
Authorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950
Content-Type: application/x-www-form-urlencoded
name=test+1&items[]=sales&items[]=marketing

Note that the token in the above call is only an example.

Success response

Upon success, there is a Location header in the response where you can access the newly created list. Success HTTP Status code is 201.

Example of the response:

HTTP/1.1 201 Created
Location: /users/123456/access-control/lists/54321.json
[]

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
400 Bad RequestWe couldn’t create a new list with the provided parameters (eg.: duplicate list name)
401 UnauthorizedThe provided access token is missing, revoked, expired or malformed
403 ForbiddenThe provided access token has no access to the user
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Get a List

This call allows to get a list.

GET https://api.video.ibm.com/users/{userId}/access-control/lists/{id}.json

Example of the request:

GET /users/123456/access-control/lists/54321.json HTTP/1.1
Host: api.video.ibm.com
Authorization: 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 list element with an HTTP Status code of 200.

KEYTYPEDESCRIPTION
idnumberThe unique id of the list
namestringThe name of the list (it must be unique under a user)
itemsarrayList of group names

Example of a success response:

{
"lists": [
{
"id": 54321,
"name": "list 1",
"items": [
"a",
"b"
]

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
401 UnauthorizedThe provided access token is missing, revoked, expired or malformed
403 ForbiddenThe provided access token has no access to the user
404 Not FoundThe provided id does not exist
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Update a List

This call allows to update a list.

PUT https://api.video.ibm.com/users/{userId}/access-control/lists/{id}.json

Parameters

The parameters for the POST request:

PARAMETERTYPEIMPORTANCEDESCRIPTION
namestringREQUIREDList name
itemsarrayREQUIREDList items

The Content-Type of the request should be application/x-www-form-urlencoded.

Example of the request:

PUT /users/123456/access-control/lists/54321.json HTTP/1.1
Host: api.video.ibm.com
Authorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950
Content-Type: application/x-www-form-urlencoded
name=test+1&items[]=sales&items[]=marketing

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 CODEERROR VALUEERROR CONDITIONS
401 UnauthorizedThe provided access token is missing, revoked, expired or malformed
403 ForbiddenThe provided access token has no access to the user
404 Not FoundThe provided id does not exist
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Delete a List

This call allows to delete a list.

DELETE https://api.video.ibm.com/users/{userId}/access-control/lists/{id}.json

Example of the request:

DELETE /users/123456/access-control/lists/54321.json HTTP/1.1
Host: api.video.ibm.com
Authorization: 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 CODEERROR VALUEERROR CONDITIONS
401 UnauthorizedThe provided access token is missing, revoked, expired or malformed
403 ForbiddenThe provided access token has no access to the user
404 Not FoundThe provided id does not exist
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request