DocEvent.io Support Center

Contact Us

The Basics 1

The public-api API endpoint lets you configure services in each region.

This API lets you control configuration for Simple FTP and other services that you already are able to control via the website manually, but it lets you do this programatically using an API key.

This document explains how to use the API and import the documentation into Swagger so you can test and begin building any services that require it.

Creating an API key

Select the region that you wish to generate your API key in, and create a new API key.

j68zek6pWvmaafAOSu4DpMYdX5fknkBx-1.png

The API key will be generated and will appear un-obfuscated only one time. You should copy and record the key in a secure place. This key is only valid for the region you selected.

dQ31xKprHntmdf1vgxzbFuTfnTkld9oW-1.png

Testing the API using cURL

If you have curl installed you can follow the instructions to test a simple curl command to test the API ping command.

fnsThS1DnQPoeBVAG9tXhWjvFYIonZPn-1.png

Following is an example of the result of an actual call

GlA1JXTLalslJM45OiKWdHfMMcKQ9edv-1.png

Importing the swagger.json file into Postman

Swagger and OpenAPI files are available to download, these files explain all API requests and responses currently available. These will update over time as new methods are added.

EPs0NneJWiZpvCwY7AfqgKnwkd0Va8nd-1.png

Download the swagger.json file to your local computer. And startup Postman, you can download Postman from their website.

Once launched, click Import and import the swagger.json (or yaml) file you just downloaded. After importing, click the Collections tab.

SxrkP0t1zmqYXflzZ6R5gRlXPuv8RP3w-1.png

Once you click the Collections tab, you will see the API requests available.

Testing the API in Postman

Expand the production-public-api folder and the ping folder. You will notice a GET /ping request (2). Select the Headers tab (3) and enter your API key (4) then click Send (5). Your output will appear in the Body pane at the bottom.

CthMi1Zk6ZPpGTqpGWYZOxOlSWr7ZEXu-1.png

The Swagger online editor

For more detailed information on the API request / response JSON payloads, we recommend you upload the swagger.yaml file into a service such as Swagger online editor (Please ignore any semantic errors). 

This will provide you with a detailed overview of input payload information, for example

hzPc3psUOFa02yTsfj9oH3hgt1WVjttt-1.png

Just like Postman, the Swagger Editor will also let you send and test the service once you have added the Authentication information by clicking the Authorize button in the UI.