Skip to main contentIBM Video Streaming Developers

Q&A Moderators

List Q&A moderators of a channel

GET https://api.video.ibm.com/channels/{channelId}/qna/moderators.json

Parameters

The query parameters for the GET request:

PARAMETERTYPEIMPORTANCEDESCRIPTION
afterstringOPTIONALPage start ID
pagesizeintegerOPTIONALRequested page size

Success response

Upon success, a response with HTTP status “200 OK” is returned with the following key-value pairs inside the moderators root array.

KEYTYPEDESCRIPTION
idstringModerator user id
identifierstringOriginal identifier. E.g. email address, SSO id

Additionally there is a paging element in the response with the following values:

KEYTYPEDESCRIPTION
previousstringLink to the previous page (if exists)
nextstringLink to the next page (if exists)
page_countnumberBecause of the infinite pager its value will be always -1
item_countnumberBecause of the infinite pager its value will be always -1

Example of a success response:

{
"moderators": [
{
"id": "aaf8cf45ceca54735af57cc80faa0220",
"identifier": "moderator@company.com"
}
],
"paging": {
"previous": "https://api.video.ibm.com/channels/{channelId}/qna/moderators.json?after=2c52ceaa1730520454ef0fadcc6d2e83",

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
401 Unauthorizedinvalid_tokenThe provided access token is missing, revoked, expired or malformed
402 Payment Requiredinvalid_requestThe user does not have the streamqna benefit
403 Forbiddenlack_of_ownershipThe API user is not allowed to manage the given channel
404 Not Foundnot_foundChannel not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Add moderators

POST https://api.video.ibm.com/channels/{channelId}/qna/moderators.json

Parameters

KEYTYPEIMPORTANCEDESCRIPTION
identifiersstring[]REQUIREDList of identifiers (email addresses, SSO ids) to promote as moderator

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

Example of the request:

POST /channels/1234/qna/moderators.json HTTP/1.1
Host: api.video.ibm.com
Authorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950
Content-Type: application/x-www-form-urlencoded
identifiers[]=moderator%40company.com&identifiers[]=alreadymoderator%40company.com

Success response

Upon success, a response with HTTP status “200 OK” is returned with the following key-value pairs inside the moderators_added root object.

KEYTYPEDESCRIPTION
idstringModerator user id
identifierstringOriginal identifier. E.g. email address, SSO id

Additionally there might be an errors element if some identifiers could not be added for some reason:

KEYTYPEDESCRIPTION
identifierstringIdentifier of the moderator to be added
reasonstringReason response code. Possible value: already_moderator

Example of a success response:

{
"moderators_added": [
{
"id": "aaf8cf45ceca54735af57cc80faa0220",
"identifier": "moderator@company.com"
}
],
"errors": [
{

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
400 Bad Requestbad_requestInvalid value was supplied
401 Unauthorizedinvalid_tokenThe provided access token is missing, revoked, expired or malformed
402 Payment Requiredinvalid_requestThe user does not have the streamqna benefit
403 Forbiddenlack_of_ownershipThe API user is not allowed to manage the given channel
404 Not Foundnot_foundChannel not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Delete a moderator

DELETE https://api.video.ibm.com/channels/{channelId}/qna/moderators/{moderatorId}.json

Success response

Upon success, a response with HTTP status ““204” No content” is returned.

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
401 Unauthorizedinvalid_tokenThe provided access token is missing, revoked, expired or malformed
402 Payment Requiredinvalid_requestThe user does not have the streamqna benefit
403 Forbiddenlack_of_ownershipThe API user is not allowed to manage the given channel
404 Not Foundnot_foundChannel not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Moderator count

GET https://api.video.ibm.com/channels/{channelId}/qna/moderators/count.json

Success response

Upon success, a response with HTTP status “200 OK” is returned.

KEYTYPEDESCRIPTION
countnumberModerator count on the channel

Example of a success response:

{
"count": 23
}

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
401 Unauthorizedinvalid_tokenThe provided access token is missing, revoked, expired or malformed
402 Payment Requiredinvalid_requestThe user does not have the streamqna benefit
403 Forbiddenlack_of_ownershipThe API user is not allowed to manage the given channel
404 Not Foundnot_foundChannel not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request