Skip to main content
Skip table of contents

Using External API Endpoints

External API Endpoints allow you to both send and retrieve data from Documill Leap. This gives you the possibilities to use Documill Leap, from checking the status of your projects, to retrieving log data, without using Documill Leap’s user interface.

Before calling an External API Endpoint

To call an External API Endpoint, you need to prepare below information:

1. Your External API Key. If you don’t have one yet, you can generate one: Managing External API Keys

2. Choose which External API endpoints you would like to call. You can find the list of External API Endpoints from the Swagger UI: https://api.leap.documill.com/api/swagger-ui.html#/external

3. Take note the details of API Endpoint that you would like to call, including:

Method

GET / POST / PUT / PATCH / DELETE

API endpoint path

https://api.leap.documill.com/api/ + <API_ENDPOINT_PATH>

Content-Type

header

application/json

Accept

header

application/json

Authorization

header

Your External API Key, which should have such form:
Documill-API-Key xxxxxxxxxxxxxxxxxxxxx

request

body / path

You may need to send the request in the body or in the endpoint path.

Calling an External API Endpoint

Once you have the information ready, you can call the External API endpoint with any tools of your choice. As an example, let’s call an External API Endpoint that returns the Organization Log data using below tools:

  • curl

  • Swagger UI

curl

This is an example of retrieving Organization Log between 1st April 2024 to 31st May 2024 using curl:

1. Make sure to have curl installed in your computer.

2. Open a terminal or command prompt to run the curl command:

CODE
curl -X POST 'https://api.leap.documill.com/api/v1/external/logs/organization-admin' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'Authorization: Documill-API-Key xxxxxxxxxxxxxxxxxxxxx' \
  -d '{ "end": "2024-31-05", "start": "2024-04-01" }' 

You can also store the data into a JSON file by adding the following command:

CODE
curl -X ... > EventLog.json

Your Organization Log should now be available inside the JSON file.

Documill Leap’s Swagger UI

Swagger offers UI to call an API and it is sufficient to retrieve smaller amount of data. Similar to the example above, these are steps to use Swagger UI to retrieve Organization Log data between 1st April 2024 to 31st May 2024:

1. Open the External API Endpoint to retrieve Organization Log data:

https://api.leap.documill.com/api/swagger-ui.html#!/external/listOrganizationAdminEvents

2. If needed, scroll down to see the following screen:

Organization Log - Swagger UI.jpg

3. Add your External API Key and your request to the corresponding text fields.

4. Click [Try it out!] button

Organization Log - Swagger UI - parameters.jpg

5. If needed, scroll down to see the Response Body section where you could retrieve the Organization Log.

Organization Log - Swagger UI - response body.jpg

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.