Using The Apstra API Docs

Estimated Time: 40 minutes.

Objective

Sometimes we know what to do, but we just need to be pointed in the right direction! This lab is here to show you how to use the documentation and generate an API token.

The Lab Journey

The goal of this lab is to familiarize users with the Apstra API and the Swagger UI, enabling you to explore different API endpoints and ultimately enabling you to build your own scripts / programs. This lab covers: . The Apstra API . Apstra API Documentation . Generating an API token . Adding your API token to Swagger . Sending some basic API GET requests through the Swagger UI . Creating a new user via the API

If you are unfamiliar with APIs and would like a refresher please take a look at the previous two labs, API Fundamentals and API Authentication.
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 Apstra API

The role of a network engineer is changing and there is an increasing focus on using automation and orchestration tools to deploy and manage networks. Apstra can simplify operations and deployment, but it can also be integrated with third-party systems such as IPAM or ticketing systems using its API (Application Programming Interface).

The API allows for programmatic interaction with the Apstra system and enables integration with other tools and the creation of complex workflows across multiple systems. The purpose of the API is to provide a structured framework for communication and information exchange between different systems.