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 extend: 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 allow to enable 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 to send 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 to toggle 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 send 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

Authentication using the BASIC authentication scheme creates a session. It is recommended to reuse this session for subsequent requests. Otherwise the server will potentially create a huge amount of sessions that are not really required. Each session takes up memory, slowing down the server.

To prevent this issue from happening accidentally or by DOS, there is an additional defender plugin which allows only a certain amount of sessions being created within a given time. It will then block the user and IP from logging in.

Solution: You should either reuse the session for a large amount of subsequent requests _or_ use the Token Authentication plugin. This plugin does not create sessions even though it does log in the user for each request.