Use the API key
Now that you've obtained the API key, you can continue as described in this section.
Query the VidyoGateway status
Use the API key to query the status of the VidyoGateway via http. The following example uses Curl.
Curl
curl --location --request GET 'http://GATEWAYIP/config/api/v1/status' \
--header 'apikey: APIKEY' \
--header 'Cookie: GATEWAYSID=6768AEC0A722417BAB3687281FE67264' \
--data-raw ''
- Replace the GATEWAYIP with the local IP of your active VidyoGateway.
- Replace the APIKEY with the key you have generated.
Sample output
{"version":"20.1.0.017","nodes":[{"id":"192.168.1.2:50611","version":"20.1.0.017","lastPing":"2020-04-03T17:46:28.372","status":"maintenance","role":"master"},{"id":"192.168.1.3:50611","version":"20.1.0.017","lastPing":"2020-04-03T17:46:26.723","status":"online","role":"master"}],"response":"getStatus","meminfo":{"ordblks":1364,"fordblks":3912848,"spaceinuse":2399088,"hblkhd":0,"hblks":0,"arena":6311936,"smblks":3811,"fsmblks":192848,"usmblks":0,"uordblks":2399088,"keepcost":101456},"balancers":[{"type":"SIP","name":"main","status":"online"},{"type":"H323","name":"main","status":"online"},{"type":"Portal","name":"main","status":"online"}]}
Use Postman
Add the API key to the request authorization
Use Postman to add the API key into the authorization for the request.
Configure the GET request
Next, configure the GET request with the local IP of the active VidyoGateway and the API call.
The following example uses "http(s)//ACTIVEGWIP/config/api/v1/status".
Query the nodes on a cluster and the calls on each node
Request
Example: http(s)://ACTIVEGWIP/config/api/v1/nodes
Response
{"nodes":[{"id":"10.51.35.155:50611","status":"maintenance","calls":[]},{"id":"10.51.35.156:50611","status":"online","calls":["aab63123-7e53-4ff3-ba8a-2651e87f3ae610a33239cc5b3"]}]}
Query only the nodes in maintenance mode
Request
Example http(s)//ACTIVEGWIP/config/api/v1/maintenance
Response
[{"id":"10.51.35.155:50611"}]