Web API

The INETAPP server provides API access to a given set of functions. Users must have the Web API access permission to use it. Furthermore, users may be required to have permissions for specific functions as well.

The following list of API end-points is available to the current user:

WEB-API-EXTENSIONS-LIST

Request Area

Requests can be customized to some extent: users can set the HTTP method (POST, GET, HEAD ...), update dynamic parts of the URL, e.g. IDs that address specific webAPI contexts, request headers as well as the request JSON.

The URL path is usually not editable, except for the parts that accept IDs for example. When editing ID parts and navigating further in the side navigation, these ID parts will be stored remembered for the current browsing page so that users can seamlessly jump forward and backward. Re-sending a request can be done using the Send button.

Using the options menu besides the Send button allows enabling the Preview Mode, show the JSON data input area and the area for additional Request Headers.

Custom Request Header

Additional Custom Request Header can be sent along a request if required by a WebAPI endpoint. These can be, e.g. Bearer Token.

Send JSON Request Data

The JSON Post Data area allows sending along a JSON request required for a specific WebAPI endpoint. Hints about the required JSON are usually given in the help page below the response area.

Note: Some HTTP methods do not support posting JSON data. The area is deactivated then.

Preview Mode

The preview mode is an option at the response panel of the Web API Remote GUI. If enabled, it will send additional information to the server which can decide to not actually execute a given command.

If a command is executed with actual data in preview mode heavily depends on the command. Usually, the preview mode makes sense for potentially destructive commands like delete.

Response Area

The response area of the Web API remote GUI consists of the request URL, the response status code and -message. An option panel allows toggling the preview mode (on by default).

If the response status message wasn't set, it will display a generic message (three points: ...). This usually happens when an API points sends back binary data.

Note: Binary data responses can result in a Download button being display instead of a JSON (or other available formats) response. The request is performed again when clicking the Download button. That means that the command will be executed on the server twice.

Authentication

Request to the Web API require proper authentication. Many of the pre-installed authentication provider support the BASIC authentication scheme.

# REQUEST
POST /api HTTP/1.1
Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u
Content-Type: application/json

Authenticated Sessions

Each session consumes memory and slows down the server.

When using the BASIC authentication scheme, a session is created, and it is important to reuse this session for subsequent requests. Otherwise, unnecessary sessions may accumulate, which can slow down the server. To prevent this from happening, an additional defender plugin is available, which limits the number of sessions created within a certain timeframe and blocks the user and IP from logging in if exceeded.

Solution: To avoid creating unnecessary sessions, either reuse the session by sending the Session Cookie with each request, or use the Token Authentication plugin. With the Token Authentication plugin, each request logs in the user without creating a session, making the requests stateless.