On e3.8.0 we’ll put back APIs, the official documentation (videos, etc) will be made public in a month or so when we complete the new documentation portal, in the meantime this will be used as documentation.
Authentication:
We use basic authentication, the account you use must have the API flag enabled and of course the permissions the user has will limit which sections you can work on with APIs.
You also will need to create a group (system / settings / groups) called “API Documentation” (or whatever you want) and enable the “API Documentation” item on the section you plan using APIs. This will make Swagger available to you.
Swagger:
When enabled on the ACLs you will see swagger is available on the menu of the section, if you click there you will see the swagger interface.
This will open on a new tab a swagger interface which contains:
- methods available
- endpoints available (if you miss some, let us know and we’ll add it to the backlog)
- simulation (only get requests)
- schema definitions for all endpoints
Pagination, Limit:
You can pass ?page=$pageNumber&limit=$itemsPerPage to control pagination, this is explained in swagger. 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)
Status, Comments & Attachments
If you want to pull an item status, comments/attachments you need to call a separate endpoint where the item/section you are interested in querying is passed as a paramenter.
If you want to see the (for example) status values of a risk you need to hit:
Postman
As we built APIs we tested them using Postman, we have made public our account so you can download our test points. You just need to define the ENV variaables (host, username, password) and it should work just fine.
Eramba APIs collection:
https://www.postman.com/eramba/workspace/eramba/overview
Our demo environment (https://demo-e.eramba.org) has a special API user you can use:
Username: api
Password: alphanumeric1