API starting guide
Last updated
Last updated
The Raptor API is a RESTful API which allows to use or integrate your Document Warehouse in any application. It is available at https://raptor.adultimagroup.com/apigateway .
The Swagger is a useful tool to test and build your API requests.
There are two ways of authenticating with Raptor:
- Using Azure AD + Tenant ID (interactive authentication)
- Using an external system
This type of authentication is generally only used by the Raptor web application (https://raptor.adultimagroup.com) . When loading the website, the user will be asked to login with their Microsoft account. Afterwards they are able to switch between the available tenants using the dropdown on the top right.
You can use this type of authentication too to try out the Swagger endpoints. This can be done by clicking Authorize and checking the Azure AD scope. Then click Authorize again to login with your Microsoft account.
Below the Azure AD settings, you can specify the tenant ID you want to to connect with in the membership-selector. The ID of a Raptor tenant can be found in the About section.
You can integrate with the Raptor API in your own application by creating an External system in the Configuration panel. This will represent your application and will generate a unique ID and 2 secrets. Users can be assigned to that external system, allowing them to authenticate through the combination of that ID and one of the secrets.
Once you created an external system, you will be able to request an authentication token using the endpoint /api/user/getusertoken .
externalSystemID: the ID of the external system
secret: the primary or secondary secret of the external system
externalUserName: the name of the Raptor user in the external system (see External systems tab in the Configuration panel)
ttlDays: token expiration time in days (optional)
ttlHours: token expiration time in hours (optional)
ttlMinutes: token expiration time in minutes (optional)
validate: if set to true, validates if the resulting token is valid (optional)
The resulting token of this request can be placed in the exa-auth-plugin header of any request to the Raptor API.
Below a description of a few commonly used endpoints:
Uploading a document
POST /api/meta/document/content
Downloading a document
GET /api/meta/document/content
Adding a tag
POST /api/meta/document/{documentId}/tag/{tagId}
Removing a tag
DELETE /api/meta/document/{documentId}/tag/{tagId}
Adding a field
POST /api/meta/document/{documentId}/field
Removing a field
DELETE /api/meta/document/{documentId}/field/{fieldId}
Searching documents
Tip : use the Advanced search in Raptor to quickly build a query
POST /api/meta/document/query/v2
Get a tag by ID
GET /api/taxonomy/tags/{tagId}
Get a tag by code
GET /api/taxonomy/tags/tag?code={code}
Resolve a tag from context
This will use the Entity configuration to create a tag, for more info see Entity configuration.
POST api/integration/resolvecontext
Below you can find a Postman collection and environment with some sample requests to the Raptor API.