WebAPI¶
WebAPI is a feature to have a STRIX server perform a certain STRIX processing by sending a JSON message to it in https. It is not a communication between game clients and STRIX servers, and you can use it primarily for your external servers to interact with STRIX servers.
Settings¶
To use WebAPI on Strix Cloud, you need to check WebAPI checkbox on Options Page on Applications Dashboard.
Endpoints¶
In WebAPI, each of master servers and room servers has its own endpoint. Even if a single server instance runs both as a master server and as a room server, there are two separate URLs, one for the master server and another for the room server, are allocated for WebAPI endpoints.
Server endpoint URL is of the form:
<baseurl>/strix/handler
and you can check <baseurl> on the Servers Address on the second part of Information Page on Applications Dashboard. For example, if <baseurl> is
https://rp.strixcloud.net/00112233-4455-6677-8899-AABBCCDDEEFF/master/
the endpoint URL is
https://rp.strixcloud.net/00112233-4455-6677-8899-AABBCCDDEEFF/master/strix/handler
If you send a JSON message to a WebAPI endpoint URL with POST scheme, the server performs a processing, and the result is sent back as a JSON response.
API Key¶
A STRIX server uses an API key to verify whether a WebAPI request is sent from an appropriate sender.
When using Strix Cloud, an API key is automatically generated for an application, and you can check it on Information Page on Applications Dashboard. This single API key is used by all servers belonging to the same application. The API key should be shared to the external servers to interact with the STRIX servers.
Note
An API Key is like a password. Third parties can access to your server if they know the endpoint URL and the API key of that server.
Please be very careful to manage your API key to prevent it from leakage.