1. Home
  2. Docs
  3. UniREST Solution 3.5
  4. UniREST Server
  5. API Manager

API Manager

The API Manager is the UniREST Server area where you can manage your REST APIs. Basically, here you can:

  • create new APIs;
  • configure and manage APIs;

HOW A REST API WORKS

The UniREST communication system is based on API calls (HTTP requests) developed in a REST architecture. REST (Representational state transfer) is not a technology or a communication protocol, but a “style” to send data, receive data and perform various operations as updating, deleting and so on.

Since the REST communication is based on HTTP, it consists of a set of predefined HTTP URLs (the APIs) with the following characteristics:

  • a REST API has a specific form, with a fixed part (your web site URL + the string “UNIREST/api/v1/” of the UniREST API engine) and a custom part that describes what the API does. For example, if WordPress is installed in http://mysite.com/mygame and your API manages the player data, it might be something like http://mysite.com/mygame/UNIREST/api/v1/player/data:

    http://mysite.com/mygame/UNIREST/api/v2/player/data
    | WordPress installation | REST string …. | API ………..|

  • an API can perform one or more of this operation on a Database table: read one or more records, write a new record, update and delete existing records.
  • depending on the operation, an API can request to be called “attaching” data and/or can reply sending data to your Unity game.
Starting from UniREST 2.0, the REST API engine has changed with a new, high efficient one. This new engine use a different ''fixed part'' in the URL. In the old version was''wp-json/api/v2/''.

HOW YOUR GAME USES THOSE APIS

Once an API is created and correctly configured, it can be called and used by your Unity game. The API calls are performed by your game through the UniREST Client asset.

Basically, every time you’re going to use an API you have to:

  • call the API (the HTTP URL) you want to use;
  • specify the kind of operation: read, write, update or delete;
  • perform the call providing data if it’s requested by the API;
  • wait for the API reply, which can be a confirmation of the operation or a group of data.

Articles