Skip to content

Web API & REST Clients

The REST API of SESAM can be accessed and used interactively from the web and via tools like Insomnia or RapidAPI. Users can choose between a web-based interface or a dedicated API client to make requests to the SESAM API and retrieve data or perform operations on our platform.

Web API

All endpoints of the SESAM API can be accessed via a web browser - without the need for a dedicated API client. The browsable API provides a user-friendly interface for interacting with the API, including input forms for submitting requests and responses that are displayed in a readable format.

To use the web API interactively, users need to login successfully. After logging in, they can use the API to interact with the application in real-time, making requests and receiving responses through the web interface. As an example, the following screenshot shows the user interface of the workspace/scenarios endpoint, which can be reached at /api/v1/workspace/scenarios.

Web API

Swagger UI

Using DRF Spectacular, we are able to provide an interactive part on our website that allows users to interact with SESAM's REST API directly. DRF Spectacular can be accessed here and has also been integrated into the documentation.

After a user successfully logged in, they can click on the Authorize button to provide an access token for all subsequent operations. It is important to note that the token must be prefixed with the word Token. For example: Token abdcd....

REST Clients

Insomnia or RapidAPI are popular examples of dedicated REST API clients that simplify the process of interacting with REST APIs. Both have the ability to import the OpenAPI v3 specification of SESAM by pointing at the endpoint /api/v1/schema/ to retrieve the specification in the YAML format. Once the YAML specification is loaded, they can automatically create a list of the available endpoints, making it easy for users to explore and interact with the API. This feature allows for a more streamlined and efficient API testing process.

Example: Insomnia Endpoints

It's important to keep in mind that the access token needs to be added to the HTTP headers for all operations. To do this, users should navigate to the headers tab and add a new entry with the key Authorization and the value Token <token_here>. This step is necessary to authenticate requests and ensure that the API can properly authorize and process them.

Example: Insomnia Authentification