Postman Collection

One of the easiest ways to start exploring a new API is by importing the OpenAPI spec into Postman. To import the Detection on Demand API into Postman, follow these steps.

Import a new collection

Open the Postman app and click the Import button in the top left.

Import API

Select the Link tab and paste the URL to the Detection on Demand API yaml file. Click Continue, and the collection will be created for you.

Import Link

You can find the link to the yaml file by navigating to the DoD API and copying the URL to the yaml file.

Copy API URL

Configuring a request

In order to make a request, you will need to insert your API key and review the parameters that will be sent along with the request. Let's see an example of how to submit a file.

Start by right clicking the Detection on Demand collection and selecting Edit from the dropdown.

Edit collection

Click on the Authorization tab and paste your API key into the Value field. Click Update to finish.

Add auth key

Next, click on the Detection on Demand collection and then clicking on the first POST request, Submit a single file for analysis.

POST File

Next, navigate to the Body tab. The file parameter is required. You can change the type of file from string to file by clicking on the file key, clicking on the Text dropdown, and clicking the File option.

Set file type

Now you can select a file from your computer to submit to DoD. Click on the Select Files button in the Value field, and select a file from your computer.

Select file

The rest of the parameters are optional. For this demonstration, you will uncheck all of the other parameters so they aren't sent to DoD.

Uncheck parameters

Click the Send button, and you should be greeted with a successfull response in the pane below. Now you can start exploring the other endpoints!

Submit request