Overview
Postman Collections can be viewed directly on the IP Fabric Public Workspace and forked to your own workspace.
These collections describe the IP Fabric API and allow you to send requests to your IP Fabric instance.
Easy Installation
-
In Postman, use the search bar to search
All of Postman
forIP Fabric
and filter onCollection
. -
Select the API version that matches your IP Fabric instance.
-
You will then be redirected to the
IP Fabric Public Workspace
where you can fork the collection into your personal workspace in order to add your required environment variables.
Configuration
Setup your environment using Postman Environments
either with the Globals
or create a new Environment
.
The required variables are:
- IPF_URL:
https://<IPFABRIC_HOSTNAME>
- IPF_TOKEN:
<IPFABRIC_TOKEN>
- IPF_SNAPSHOT: Can be
$last
,$prev
,$lastLocked
, or UUID of a Loaded Snapshot.
After adding the variables, click Save
in the top-right corner to save them before testing the API.
The above example shows how you can create Environments with different IPF_SNAPSHOT
variables to easily switch
between $last
and $prev
snapshots.
Usage
This collection provides examples of how to use the IP Fabric API. Most of the tables
endpoints have been included
as well as example returned data. Under the Body
tab, you can view/edit the JSON that is being sent to the API.
If there is an example returned data, it will be below the query (see below the highlighted Success
).
Before sending any request, please see the IP Fabric API Overview section.
IP Fabric API Overview
Filters
There are two types of Filters in IP Fabric:
- Global Attribute Filter.
- Applies to all tables when set in the GUI.
- Simple/Advanced Filter
- Applies to a single table when set.
The easiest way to create these is by using the GUI and then copying the sections found in the Table Description.
Reports & Intent
Reports
- If
reports
is set in the body or parameters, the data returned will be nested JSON"l2": {"data": "up", "severity": 0}
. - Without
reports
set, it will return only the data"l2": "up"
. reports
is required if filtering based on color for any type of request.- CSV export will never return the nested JSON and only the data.
Severity
If reports
is set in the request, severity
will be one of the following:
severity |
Color |
---|---|
-1 |
No Color |
0 |
Green |
10 |
Blue |
20 |
Amber |
30 |
Red |
Editing POST Body
- Required for data to be returned:
- Change/remove
attributeFilters
. - Change/remove
filters
.
- Change/remove
- Optional:
- Change pagination to increase the number of results or the start.
- Currently it is recommended not to request more than 1,000 rows at a time.
- Change/remove
sort
.order
can beasc
ordesc
- Remove
reports
:- If
reports
is set, the data returned will be nested JSON"l2": {"data": "up", "severity": 0}
. - Without
reports
set:"l2": "up"
reports
is required if filtering based on color.
- If
- Change pagination to increase the number of results or the start.
Editing GET Parameters
- Required for data to be returned:
- Unselect or edit
attributeFilters
. - Unselect or edit
filters
.
- Unselect or edit
- Optional:
- Change pagination to increase the number of results or the start.
- Unlike the
POST
method, pagination is handled on the server when requesting usingGET
. - Because of this, you can unselect this box and return all data in a single request.
- Please note pagination is recommended in Postman as tables can contain large amounts of data.
- Unlike the
- Unselect or edit
sort
.order
can beasc
ordesc
- Unselect
reports
:reports
is required if filtering based on color for all requests, but only the data is returned when requesting CSV.
- Change pagination to increase the number of results or the start.
Alternate Install
Import the IPFabricCollection.json
JSON file located under the postman directory into Postman: