FortiEDR
FortiEDR automates the protection against advanced threats, pre and post-execution, with real time orchestrated incident response functionality.
dmeeker
Staff
Staff
Article Id 263249
Description This article describes where to find the API documentation and simple tricks on how to utilize Postman.
Scope FortiEDR 5.X.
Solution

Where To find the official REST API guide?

https://fndn.fortinet.net/index.php?/documents/file/303-fortiedr-api-guide-v50/

 

Where to find more information on UI API calls via the FortiEDR Manager?

To find the API documentation, go to the FortiEDR URL and add '/rest-ui' at the end of it.

Eg: https://foobar.console.ensilo.com/rest-ui.

 

Ability to Leverage Postman:

It is possible to use Postman to make API Calls.

Download Postman and open up the program.

Select 'Authorization' and change the type to 'Basic Auth'.

Enter the Username and Password that has the role of 'Rest API'.

 

dmeeker_0-1689008318325.png

 

 

Select the Params tab and enter the URL (eg https://foobar.console.ensilo.com/) and the desired parameters.

Once the parameters are entered, Postman will automatically populate the URL field. Select send.

 

It should send an HTTP status code of 200 (OK). It may also be possible to see the output on the bottom half of the screen in Postman.

 

Towards the right side of the URL, the save icon will appear, and towards the right of it, the icon for the code snippet (</>) will be visible.

Select this icon and it will be possible to copy the code snippet for different programming/scripting languages such as Python, cURL, and PowerShell.

This is good if wanting to run the API as part of a script.

 

Ability to import collections to Postman:

Go to the rest-ui page of the environment (eg https://foobar.console.ensilo.com/rest-ui).

Select Download:

 

dmeeker_1-1689008318326.png

 

Go To Postman, select Collections, and then Import.

 

dmeeker_2-1689008318326.png

 

Upload the api-docs.json file in the popup window.

 

dmeeker_3-1689008318327.png

 

Select Import, now the API calls will be loaded into Postman.

 

Rest API is not working:

  1. The two most often issues of API failing are due to: the user never logging into the manager after the account was created to change the password. Log into the manager and itshould prompted to change the password. Once the password is changed, try the API call again.

  2. The user does not have the Rest API role enabled. Log into the FortiEDR Manager. Go to Administration -> Users and select 'Edit' on the user who wanted to add the role.
    Select the 'Roles' box and a selection box with 'Rest API' should pop up. Select 'Rest API’ and then save.

 

dmeeker_4-1689008318327.png