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.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 lists
element with an HTTP Status code of 200.
KEY | TYPE | DESCRIPTION |
---|---|---|
id | number | The unique id of the list |
name | string | The name of the list (it must be unique under a user) |
items | array | List of group names |
Example of a success response:
{"lists": [{"id": 1,"name": "list 1","items": ["a","b"]
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR VALUE | 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 |
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:
PARAMETER | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
name | string | REQUIRED | List name |
items | array | REQUIRED | List 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.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950Content-Type: application/x-www-form-urlencodedname=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 CreatedLocation: /users/123456/access-control/lists/54321.json[]
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR VALUE | ERROR CONDITIONS |
---|---|---|
400 Bad Request | We couldn’t create a new list with the provided parameters (eg.: duplicate list name) | |
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
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.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 list
element with an HTTP Status code of 200.
KEY | TYPE | DESCRIPTION |
---|---|---|
id | number | The unique id of the list |
name | string | The name of the list (it must be unique under a user) |
items | array | List of group names |
Example of a success response:
{"lists": [{"id": 54321,"name": "list 1","items": ["a","b"]
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR VALUE | 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 | The provided id does not exist | |
503 Service Unavailable | There 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:
PARAMETER | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
name | string | REQUIRED | List name |
items | array | REQUIRED | List 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.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950Content-Type: application/x-www-form-urlencodedname=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 CODE | ERROR VALUE | 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 | The provided id does not exist | |
503 Service Unavailable | There 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.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 VALUE | 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 | The provided id does not exist | |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |