REST APIs

Receive and Send REST APIs and build your own integrations - long

  • Episodes5
  • Duration9m 36s
  • LanguagesEN
Episode 3

Receiving REST APIs

How data schemas and end-points work

Introduction

In this episode we will explain the key concepts on the types of REST calls eramba can receive from remote end-points.

Authentication

You must create an account in eramba and enable the "REST APIs" toggle, groups and visualization settings applied to this account will limit the type of data you can see and the type of queries you will be allowed to make. Please review the "Access Management" course for details.

REST calls that come to eramba must use basic authentication and run over TLS.

image

You also will need to create a group (system / settings / groups) called “API Documentation” (or whatever name you want) and enable the “API Documentation” item on the section you plan using APIs. This will make Swagger documentation available to your account.

All the API documentation is managed over swagger and you will find it on every section where APIs are enabled on the top menu bar under the name "API".

image

Swagger

Accessing Swagger will open on a new tab with the swagger interface which contains:

  • methods available
  • endpoints available
  • simulation (only get requests)
  • schema definitions for all endpoints

image

Any developer will be able to understand the schema and calls based on this documentation, you can also test requests (only GET) using the interface. Is likely your developers will need assistance from someone that understand how eramba works and its modules interact with each other.

You can pass to your request the following arguments to control pagination and limits:

?page=$pageNumber&limit=$itemsPerPage

There is no sorting available at this point.

Edit (patch)

If you want to edit an item, the JSON must contain all fields of the item, not just the one you want to edit. For that reason you need to do a view of the item first (and get all fields) and then use that to do the patch (by changing only the field that you want to update and leave the rest as it is)

image

Status, Comments & Attachments

If you want to pull an item status or comments/attachments you need to call a separate endpoint where the item/section you are interested in querying is passed as a parameter.

image

If you want to see the (for example) status values of a risk you need to hit:

image