Using The Apstra API Docs

Apstra API Documentation

The key to understanding the API is understanding the documentation. Apstra’s API documentation is comprehensive and can be viewed once logged into the Apstra server.

The Apstra API is documented according to the OpenAPI standard, and Swagger is simply a tool to prettify the documentation.

API documentation is the information that is required to successfully consume and integrate with an API. Swagger UI shows you the API endpoints available, how they are expected to be consumed, and the data model needed.

Accessing the Apstra API Docs

This section will show you how to access the documentation located in the Apstra server.

Apstra Login

You can log in by going to your instance of Apstra and entering your username and password. Then click login.

Login

Navigating To The Documentation

Once logged in the documentation can be accessed by going to Platform >> Developer and then clicking REST API Documentation.

Doc Nav _1

Doc Nav _2

Swagger Documentation

The documentation should open up in a new tab and from here you can explore all the different API calls that are available.

Swagger Doc

Task

Try it yourself!

  1. Login to the Apstra interface and navigate to the API documentation shown above.

  2. Expand the section aaa and look at the different API endpoints available.

To try this yourself you will have access to an Apstra instance. This could be via Apstra Cloud Labs (https://cloudlabs.apstra.com/) or your own Apstra installation. If you would like access to Apstra for this lab please contact your Juniper account team.
For this lab, any topology in Cloud Labs will be suitable.

The next section will look at generating an API token.