Web API Pages

Web elements specify externally facing REST API or HTML pages. This way you can easily expose any data or functionality, or your ORIGAM applications in a simple way.

If you need a WebService (SOAP) interface you can find a description under Web Services (SOAP) API

Use Cases

The typical use cases for Web API/Pages are:

  • HTML pages for extranet access.
  • JSON API for modern JavaScript (AJAX) applications.
  • JSON API for mobile applications.
  • XML API for integration with other enterprise systems.

Common attributes

Each web API/page has the following common attributes.

Url

Specifies under which URL the API will be available. The URL may contain placeholders within curly brackets that denote parameters. The URL has to comit the initial '/'. See more below.

Naming recommendation

It is a good practice to put all public facing API's under /public or /api/public URL. It is then easier to configure the web server for access to all public API's with a single setting.

MimeType

Specifies which MIME Type the API will return. These will be mainly

  • text/html
  • text/xml
  • application/json

Dynamic MIME type

You can also use a special question mark value "?" in case of File Download Page. In that case the MIME Type will be set automatically by the downloaded file extension (e.g. in case the downloaded file will have an extension .PDF the mime type will be set automatically to application/pdf).

JSON Conversion

In te case of a Data Page you can easily return JSON data by simply specifying a MIME Type application/json. The data will automatically be converted to JSON format.

Roles Enter an application role name for controlling which users have access to this API. Enter a star (*) to allow a public access.
Features Enter a feature name which needs to be turned on in order to access this API. If nothing is entered the API is always available.

Input Parameters

You can pass parameters to the internal handler in the following ways:

  • Parameters defined inside the URL
  • Query parameters
  • In the request body using POST request