# Generate a FortiOS API Token

{% hint style="warning" %}
This feature is in Early Release/BETA. Please contact your Epiphany Systems support or sales contact to learn more.
{% endhint %}

#### **Step 1:**

* Determine your source address. The source address is needed to ensure the API token can only be used from trusted hosts. You can skip this step if you already know the trusted host IP address.

#### Step 2:

* In the FortiGate GUI, select the **Status** dashboard and locate the **Administrators** widget.
* Select **your-userid** > **Show active administrator sessions**.

#### Step 3:

Create an Administrator profile:

* Select **System** > **Admin Profiles** > **Create New**.
* Populate the fields as shown in the image:

![](https://4132260347-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftkp3obVDMu3n9ZTUpfEP%2Fuploads%2FljDBN4QZss42ZDwrXcGk%2FPastedGraphic-1.png?alt=media\&token=80822a81-d393-43d9-b223-59391508a9ce)

* Select **OK.**

#### Step 4:

Create the REST API Admin:

* Select **System** > **Administrators** > **Create New** > **REST API Admin**.
* Populate the fields as shown in the image:

![](https://4132260347-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftkp3obVDMu3n9ZTUpfEP%2Fuploads%2FNh2GMqVe8tZ8XrLzVteY%2FPastedGraphic-2.png?alt=media\&token=c327da2e-b904-4da0-8a91-0a2afef43637)

* Select **OK**. An API token will be generated.

![](https://4132260347-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftkp3obVDMu3n9ZTUpfEP%2Fuploads%2Fbk8fhEcZ6ZNEF7nyMw03%2FPastedGraphic-3.png?alt=media\&token=376c8ca0-6015-41ea-94ea-8788c91616ec)

* Select **Close** to complete creation of the REST API Admin.

{% hint style="warning" %}
Make note of the API token as it is only shown once and cannot be retrieved. It will be needed for the remaining instructions.
{% endhint %}

## FortiOS Manual Collection

In In the event that local API collection is not possible, data can be manually collected for the network modeling process. A command line interface (CLI) connection to the devices is needed, as well as a terminal emulator such as Putty or SecureCRT, capable of logging data presented via the **show** commands used.

#### Step 1:

* Authenticate to the device.
* Enter the following commands into the command line interface:

```
Get Configuration
show
get router info routing-table all
```
