API Lab Guide Part 2 - API Authentication
1. What is API Authentication
API authentication is the process of verifying the identity of a client trying to access the resources of an API. This is important because it allows the API to determine what actions the client is allowed to take. In this lab, we will explore some common methods of API authentication, including their benefits and drawbacks.
The Apstra UI is actually a client of the API. |
Apstra treats the API as a first-class citizen, meaning that all actions available through the UI are also available through the API.
3. Apstra Specific Authentication
Apstra uses the bearer token method to authenticate and authorize API users. Once the token is generated it is valid for 24 hours and this value is not customizable.
The generation of the token is shown below - you can see the request is sent to the server that contains the username and password. The server response includes the generated API token.