1. Home
  2. Docs
  3. UniREST Solution 3.5
  4. UniREST Server
  5. API Manager
  6. Creating a new API

Creating a new API

In the UniREST Server application, APIs are organized in groups, where each group should represent a kind of API category. For example, you could create a group named player and develop inside it all the APIs which, in some way, are related to the player’s data.

To create a new APIs group, click the [ADD NEW] button. This will create a new group temporarily named <New API Group>. This name has an invalid form and must be changed in order to unlock the [ADD NEW API] button.

To add a new API to this group, click the [ADD NEW API] button. This will show a box in which you must provide:

  • a valid API name;
  • the Database table this API will operate with;
  • optionally, a brief API description. The description will be shown in the “Apis Index” and can be included in the Client Config script.

Naming conventions

The validity of Groups and APIs name is controlled by the UniREST Server application during the saving process. If one name is not valid, the saving is interrupted.

You are free to choose the name you prefer, but it must respect those conventions:

  • it must contain alphanumeric characters and only the underscore symbol is allowed;
  • the first name letter must be a lower case character;
  • the Group name must be unique; you can’t have Groups with the same name;
  • a Group’s API must have a unique name; you can’t have APIs of a Group with the same name;
  • for avoiding system problems, the word unirest is not allowed.

Examples:

playerValid
playerDataValid
player_dataValid
PlayerNot valid: the first letter is uppercase and not allowed.
player dataNot valid: space is not a permitted character.
player/data
weapons/data
Valid
APIs with the same name are allowed if they belong to different Groups.
player/data
player/data
Not valid
Inside a Group, APIs can’t have the same name.