Web API

<< Click to Display Table of Contents >>

  Virola API >

Web API

General

 

At present Virola Web API is quite basic. You can send the following requests with it:

 

server health information

 

curl -k -X GET \

                    -H "Authorization: Bearer TOKEN" \

                    https://HOST:PORT/api/v1/server-health

 

send a text message into the chat-room

 

curl -k -X POST \

                    -H "Authorization: Bearer TOKEN" \

                    https://HOST:PORT/api/v1/rooms/ROOM_ID/text-messages \

                    -d "{\"content\":\"Hello, World\"}"

 

HOST, PORT, TOCKEN and ROOM_ID variables should be replaced by your own ones.

 

All Web API calls on this stage are made with help of the curl command.

 

Web API tocken

 

To get Web API tocken you need to do the following:

 

1.Follow Tools / Web API Access tocken in the Virola menu

 

Web API access tocken

Web API access tocken

 

2.Click 'Renew API tocken' button. Please note! if you have already generated an API tocken, it will stop working

 

chat-room ID

 

ROOM_ID is required to send messages through API. To get the ROOM_ID you need to do the following:

 

1.Right click on the needed chat-room in the chat-rooms list of Virola

2.In the appeared drop-down list get the ROOM_ID

 

Chat room ID

Chat room ID