15. Custom Parameters

API to Get Custom Parameters

URL: /admin/api/v1/tenants/{tenantId}/customParameters

Method: GET

Path Variables
Field Data Type Mandatory Description Validation
tenantD String Y

It accepts:

  1. tenantId of tenant

  2. tenant host name

Provide any of the above two values.

  • If tenantId is provided, then it should be valid tenantId associated with tenant.

  • If tenant host name is provided, then it should be valid tenant host name associated with tenant.

  • If value provided is invalid or not associated with tenant, “401 Unauthorized” will be returned.

Success Response

In case of success, success code 200 HttpStatus.OK is returned with the JSON content shown below.

Success Response

In case of success, success code 200 HttpStatus.OK is returned with the JSON content as shown below.

Response Parameters

Field Data Type Mandatory Description
version String Y Defines the version of the API.
Status String Y Defines the response stauts. For successful response, its value will be “success”
data Object Y This is the element which encapsulates the API response.
key String Y N/A
value String Y N/A

Example JSON response:

 {

  "version": "1",

  "status":"success",

  "data": {

     "registered": [

{

"key": "k1",

"value": "v1"

},

{

"key": "k2",

"value": "v2"

}

 

],

"unregistered": [

{

"key": "k3",

"value": "v3"

},

{

"key": "aaabbb22",

"value": "u2"

}

   ]

 }

Error Responses

If validation of mandatory parameters is failed. In this scenario list of errors will be returned in JSON body. Status code will be 400. HttpStatus.BAD_REQUEST

Error response parameters
Field Data Type Mandatory Description
version String Y Defines the version of the API.
status String Y Defines the response stauts. For error response, its value will be “failure”.
error Object Y This is the element which encapsulates the API error details.
code Integer Y This is the error code for the error.
message Text Y This describes the error.
errors List N
  • This contains the list of errors in case of request validation failure.

  • Its value will be empty list for all the error scenarios other than request validation failure.

JSON error response structure in case of request validation errors:

 {

  "version": "1",

  "status":"failure",

  "error": {

      "id":  1,

      "tenantID": 3,

      "endpointType": "V"

[

"Invalid key aaabbb1 1",

"Invalid key aaabbb 21"

     ]

   }

 }

In case of Bad Request, Forbidden Request and Internal server error scenarios, errors will be returned as empty list.

JSON error response structure in case of Bad request, Forbidden request or internal server errors:

 {

  "version": "1",

  "status":"failure",

  "error": {

      "code":  102003,

      "message": "Bad request",

      "errors": []

   }

 }

HTTP status codes, Error codes, and messages:
HTTP Response Code Error Code Error Message
400 102001 Invalid request parameter(s)
500 102002 Internal server error
400 102003 Bad request
403 102004 Request Forbidden
Validation error messages
HTTP Response Code Error Code
400 Invalid key
400 Invalid value
400 Invalid auth type

System Level - Set JWT Authentication Secret

URL: /admin/api/v1/system/tenants/jwtAuthenticationSecret

Method: PUT

Authentication: Super credentials

Request Body
Field Data Type Mandatory Description Validations
N/A String N

The authentication secret; for example:

2deC;p<V:3#p85?S3T#,4S][qpJ6&7R- 7KT(C"rET(:<HPr3

Validation of authentication secret. It must contain at least one:

  • capital letter

  • special character

  • number

Length of authentication secret is dependent on JWT signing algorithm. For HS384, size minimum 48 characters.

Should be encoded in Base64.

Example: 13gb5Zi3sDzs8oNAUiHlvd2SjBRZnnoAlQ3l1eIbEFlbsciNCglGuFw8sNNLyAEZb (BASE 64)

Response Body
Field Data Type Mandatory Description
version String Y Defines the version of the API.
status String Y Defines the response status. For a successful response, its value will be “success”.
data Object Y This is the element which encapsulates the API response. For this API, its value is null.
secret String Y This is the new authentication secret generated on the change of signing algorithm.
HTTP Status Codes, Error Codes, and Messages
HTTP Response Code Error Code Error Message Scenario
400 101017 Invalid request If signing algorithm name is invalid. Any other request body validation failure.
404 101018 Signing Algorithm not configured If signing algorithm is fetched while it’s not configured at the tenant level.
404 101019 Authentication Secret not configured If authentication secret is fetched while it’s not configured at the tenant level.
403 N/A N/A

Unauthorized user if anybody other than the Super admin tries to access.

Invalid tenant id/FQDN.

500 101020 Internal server error Internal server error.

 {

  "version": "1",

  "status":"failure",

  "error": {

      "code":  101017,

      "message": "Invalid request",

      "errors": []

   }

 }

System Level - Generate JWT Authentication Secret

URL: /admin/api/v1/system/tenants/jwtAuthenticationSecret

Method: PUT

Authentication: Super credentials

Response Body
Field Data Type Mandatory Description
version String Y Defines the version of the API.
status String Y Defines the response stauts. For successful response, its value will be “success”.
data Object Y This is the element which encapsulates the API response.
secret String Y This is the new authentication secret generated on the change of signing algorithm.

 {

  "version": "1",

  "status":"success",

  "data": {

      "authenticationSecret": [{

      "secret": "asdfasdfasfLXZlcnktbG9uZy1zZWNyZXQta2V5LWZvci1zaWduaW5nLWp3dC10b2tlbnM="

      }]

   }

 }

HTTP Status Codes, Error Codes, and Messages
HTTP Response Code Error Code Error Message Scenario
400 101017 Invalid request If signing algorithm name is invalid. Any other request body validation failure.
404 101018 Signing Algorithm not configured If signing algorithm is fetched while it’s not configured at the tenant level.
404 101019 Authentication Secret not configured If authentication secret is fetched while it’s not configured at the tenant level.
403 N/A N/A

Unauthorized user if anybody other than the Super admin tries to access.

Invalid tenant id/FQDN.

500 101020 Internal server error Internal server error.

 {

  "version": "1",

  "status":"failure",

  "error": {

      "code":  101017,

      "message": "Invalid request",

      "errors": []

   }

 }

Tenant Level - Set JWT Authentication Secret

URL: /admin/api/v1/tenants/{tenantId}/jwtAuthenticationSecret

Method: PUT

Authentication: Super credentials

Field Data Type Mandatory Description
tenantId / Tenant FQDN String Y Validate if the tenant id is a valid tenantid or not.
Request Body
Field Data Type Mandatory Description Validations
N/A String N

The authentication secret; for example:

2deC;p<V:3#p85?S3T#,4S][qpJ6&7R- 7KT(C"rET(:<HPr3

Validation of authentication secret. It must contain at least one:

  • capital letter

  • special character

Length of authentication secret is dependent on JWT signing algorithm. For HS384, size minimum 48 characters.

Should be encoded in Base64.

Example: 13gb5Zi3sDzs8oNAUiHlvd2SjBRZnnoAlQ3l1eIbEFlbsciNCglGuFw8sNNLyAEZb (BASE 64)

Response Body
Field Data Type Mandatory Description
version String Y Defines the version of the API.
status String Y Defines the response stauts. For successful response, its value will be “success”.
data Object Y This is the element which encapsulates the API response.
secret String Y This is the new authentication secret generated on the change of signing algorithm.

 {

  "version": "1",

  "status":"success",

  "data": {

      "authenticationSecret": [{

      "secret": "asdfasdfasfLXZlcnktbG9uZy1zZWNyZXQta2V5LWZvci1zaWduaW5nLWp3dC10b2tlbnM="

      }]

   }

 }

HTTP Status Codes, Error Codes, and Messages
HTTP Response Code Error Code Error Message Scenario
400 101017 Invalid request If signing algorithm name is invalid. Any other request body validation failure.
404 101018 Signing Algorithm not configured If signing algorithm is fetched while it’s not configured at the tenant level.
404 101019 Authentication Secret not configured If authentication secret is fetched while it’s not configured at the tenant level.
403 N/A N/A

Unauthorized user if anybody other than the Super admin tries to access.

Invalid tenant id/FQDN.

500 101020 Internal server error Internal server error.

 {

  "version": "1",

  "status":"failure",

  "error": {

      "code":  101017,

      "message": "Invalid request",

      "errors": []

   }

 }

Tenant Level - Generate JWT Authentication Secret

URL: /admin/api/v1/tenants/{tenantId}/jwtAuthenticationSecret

Method: PUT

Authentication: Super credentials

Field Data Type Mandatory Description
tenantId / Tenant FQDN String Y Validate if the tenant ID is a valid tenantId or not.
Response Body
Field Data Type Mandatory Description
version String Y Defines the version of the API.
status String Y Defines the response stauts. For successful response, its value will be “success”.
data Object Y This is the element which encapsulates the API response.
secret String Y This is the new authentication secret generated on the change of signing algorithm.

 {

  "version": "1",

  "status":"success",

  "data": {

      "authenticationSecret": [{

      "secret": "asdfasdfasfLXZlcnktbG9uZy1zZWNyZXQta2V5LWZvci1zaWduaW5nLWp3dC10b2tlbnM="

      }]

   }

 }

HTTP Response Code Error Code Error Message Scenario
400 101017 Invalid request If signing algorithm name is invalid. Any other request body validation failure.
404 101018 Signing Algorithm not configured If signing algorithm is fetched while it’s not configured at the tenant level.
404 101019 Authentication Secret not configured If authentication secret is fetched while it’s not configured at the tenant level.
403 N/A N/A

Unauthorized user if anybody other than the Super admin tries to access.

Invalid tenant id/FQDN.

500 101020 Internal server error Internal server error.

 {

  "version": "1",

  "status":"failure",

  "error": {

      "code":  101017,

      "message": "Invalid request",

      "errors": []

   }

 }

Tenant Level - Get JWT Authentication Secret

URL: /admin/api/v1/tenants/{tenantId}/jwtAuthenticationSecret

Method: GET

Authentication: Super credentials

Field Data Type Mandatory Description Validations
tenantId / Tenant FQDN String Y

The tenant id or tenant FQDN for which endpoint behavior mode will be configured

Validate if the tenant id is a valid tenantid or not.

Response Body
Field Data Type Mandatory Description
version String Y Defines the version of the API.
status String Y Defines the response stauts. For successful response, its value will be “success”.
data Object Y This is the element which encapsulates the API response.
secret String Y This is the new authentication secret generated on the change of signing algorithm.

 {

  "version": "1",

  "status":"success",

  "data": {

      "authenticationSecret": [{

      "secret": "asdfasdfasfLXZlcnktbG9uZy1zZWNyZXQta2V5LWZvci1zaWduaW5nLWp3dC10b2tlbnM="

      }]

   }

 }

HTTP Response Code Error Code Error Message Scenario
400 101017 Invalid request If signing algorithm name is invalid. Any other request body validation failure.
404 101018 Signing Algorithm not configured If signing algorithm is fetched while it’s not configured at the tenant level.
404 101019 Authentication Secret not configured If authentication secret is fetched while it’s not configured at the tenant level.
403 N/A N/A

Unauthorized user if anybody other than the Super admin tries to access.

Invalid tenant id/FQDN.

500 101020 Internal server error Internal server error.

 {

  "version": "1",

  "status":"failure",

  "error": {

      "code":  101017,

      "message": "Invalid request",

      "errors": []

   }

 }

Refresh Token

URL: /api/v1/refreshToken

Method: GET

Authentication: Bearer <refreshToken>

Request Header
Header Data Type Mandatory Description Validations
Authorization String Y Bearer <refreshToken> Check if refreshToken is valid or not or empty.

Response Body

Field Data Type Mandatory Description
version String Y Defines the version of the API.
status String Y Defines the response stauts. For successful response, its value will be “success”
data Object Y This is the element which encapsulates the API response.
jwtToken String Y This is the new jwtToken.

 {

  "version": "1",

  "status":"success",

  "data": {

      "jwtToken":

      "eyJhbGciOiJIUzM4NCJ9.eyJ0ZW5hbnRVcmwiOiJmb3J0ZXN0LnZwMDQudmlkeW8udXMucmQuZWlsYWIuYml6 IiwidGVuYW50SWQiOjgsImVuZHBvaW50R3VpZCI6ImNmYmE0MDI3LTZjYjgtNGIzMi1hNzE5LTJlMmJiMzM3Mm ZkYiIsIm1lbWJlclR5cGUiOiJHVUVTVCIsInRva2VuVHlwZSI6IlJFR1VMQVIiLCJ1c2VySWQiOjEsImlhdCI6 MTYzNTQyNjg4MywiZXhwIjoxNjM1NDI2OTEzfQ.9XPpA8_ocfFImKnYyu3nTyQmvsUc3uqkwmlFhZn5rsn1EvbUn1I4K12UJqtq5LLq"

   }

 }

HTTP Status Codes, Error Codes, and Messages
HTTP Response Code Error Code Error Message Scenario
404 101018 Signing Algorithm not configured If signing algorithm is fetched while it’s not configured at the tenant level.
403 N/A N/A

N/A

 {

  "version": "string",

  "status":"string",

  "error": {

      "code":  0,

      "message": "string",

      "errors": [

"string"

]

   }

 }

Add Server Token API

URL: http://{tenantFQDN}/admin/api/v1/serverTokens

Method: POST

Authentication: Super credentials

Request Body
Field Data Type Mandatory Description Validation
serverToken String Y

Token is in GUID format.

It is validated by GUID 8-3-3-3-12 characters (alpha-numeric).

{

  "token": "c060aea2-5d5c-4792-b162-e7f6bfe5472d"

 }

Response Body
Field Data Type Mandatory Description
version String Y Defines the version of the API.
status String Y Defines the response stauts. For successful response, its value will be “success”
data Object Y This is the element which encapsulates the API response.

 {

  "version": "1",

  "status":"success",

  "data": null

 }

HTTP Status Codes, Error Codes, and Messages
HTTP Response Code Error Code Error Message Scenario
400 N/A Bad request N/A
401 N/A Unauthorized N/A
403 N/A Forbidden N/A
500 N/A Internal server error N/A

 {

  "version": "1",

  "status":"failure",

  "error": {

      "code":  101017,

      "message": "Invalid request",

      "errors": []

   }

 }

Get Server Tokens API

URL: http://{tenantFQDN}/admin/api/v1/serverTokens

Method: GET

Authentication: Super credentials

Response Body
Field Data Type Mandatory Description
version String Y Defines the version of the API.
status String Y Defines the response stauts. For successful response, its value will be “success”.
data Object Y This is the element which encapsulates the API response.
id Integer Y serverToken ID from database.
serverToken String Y N/A

 {

  "version": "1",

  "status":"success",

  "data": {

      "id": 1,

      "serverToken": "c060aea2-5d5c-4792-b162-e7f6bfe5472d"

      }]

   }

 }

HTTP Status Codes, Error Codes, and Messages
HTTP Response Code Error Code Error Message Scenario
401 N/A Unauthorized N/A
403 N/A Forbidden N/A
500 N/A Internal server error N/A

 {

  "version": "1",

  "status":"failure",

  "error": {

      "code":  101033,

      "message": "Bad request",

      "errors": [

"string"

]

   }

 }

Delete Server Token API

URL: http://{tenantFQDN}/admin/api/v1/serverTokens/{serverTokenId}

Method: DELETE

Authentication: Super credentials

Response Body
Field Data Type Mandatory Description
version String Y Defines the version of the API.
status String Y Defines the response stauts. For successful response, its value will be “success”.
data Object Y This is the element which encapsulates the API response.

 {

  "version": "1",

  "status":"success",

  "data": null

 }

HTTP Status Codes, Error Codes, and Messages
HTTP Response Code Error Code Error Message Scenario
401 N/A Unauthorized N/A
403 N/A Forbidden N/A
404 N/A Not found N/A
500 N/A Internal server error N/A

 {

  "version": "1",

  "status":"failure",

  "error": {

      "code":  101033,

      "message": "Bad request",

      "errors": [

"string"

]

   }

 }

VidyoPortal Event Service Configuration

To complete the setup, you will need the following information:

  1. EVENT_SERVICE_URL: This is the Public FQDN of the Vidyo Event Service.

  2. MESSAGING_SERVER_CLUSTER_ID: This should always be set as “vidyo-nats- streaming”.

  3. Messaging Server Username and Password: This is a username and password of your choosing that will be used to authenticate the VidyoPortal and the Vidyo Event Services Messaging communications.

Setting Event Service System Configurations

URL: /admin/service/systemconfig/v1/configuration

Method: PUT

Authentication: Super credentials

Request Body

{

"EVENT_SERVER_URL": "wss://vidyoeventservice.example.com",

"MESSAGING_SERVER_CLUSTER_ID": "vidyo-nats-streaming"

 }

Setting Messaging System Configurations (REST API)

Prerequisites

To complete the setup, you will need the following information:

  1. messagingServerUrl: This is the FQDN of the Vidyo Event Service that the VidyoPortal will use to connect to the internal messaging interface of the Vidyo Event Service (port 4222).

  2. Messaging Server Username and Password: This is a username and password of your choosing that will be used to authenticate the VidyoPortal and the Vidyo Event Services NAS communications (NATS). You will need to enter this in the Vidyo Event Service configuration.

URL: /admin/service/systemconfig/v1/configuration

Method: PUT

Authentication: Super credentials

Request Body

{

"MESSAGING_NODE_CONFIGURATION": [{

"messagingServerUrl":"tls://vidyoeventservice.example.com,

"username":"mymessagingerviceuser",

"password":"mymessagingservicepassword"

 }]

}