openapi: 3.1.0 info: title: Juniper Networks Juniper Apstra Allowlists and Blocklists Authentication API description: Juniper Apstra is an intent-based networking platform for data center automation. The Apstra API provides RESTful access to manage blueprints, design elements, devices, connectivity templates, virtual networks, and intent-based analytics. It supports multivendor environments and enables closed-loop automation from design through deployment and operations. version: 4.2.0 contact: name: Juniper Support url: https://www.juniper.net/us/en/products/network-automation/apstra.html email: support@juniper.net license: name: Proprietary url: https://www.juniper.net/us/en/legal-notices.html termsOfService: https://www.juniper.net/us/en/legal-notices.html servers: - url: https://{apstra_server}/api description: Apstra Server variables: apstra_server: default: apstra.example.com description: Hostname or IP of the Apstra server security: - authToken: [] tags: - name: Authentication description: Login and token management paths: /aaa/login: post: operationId: login summary: Juniper Networks Authenticate user description: Authenticates a user and returns an authentication token. The token must be included in subsequent requests as an AuthToken header. tags: - Authentication security: [] requestBody: required: true content: application/json: schema: type: object required: - username - password properties: username: type: string password: type: string responses: '201': description: Authentication successful content: application/json: schema: type: object properties: token: type: string description: Authentication token id: type: string format: uuid '401': description: Invalid credentials /auth/login: post: operationId: login summary: Juniper Networks Authenticate description: Authenticates a user and returns an API session token. tags: - Authentication security: [] requestBody: required: true content: application/json: schema: type: object required: - username - password properties: username: type: string password: type: string realm: type: string description: Authentication realm responses: '200': description: Authentication successful content: application/json: schema: type: object properties: token: type: string expires: type: string format: date-time '401': description: Authentication failed components: securitySchemes: authToken: type: apiKey in: header name: AuthToken description: Authentication token obtained from the /aaa/login endpoint. Include as AuthToken header in all requests. externalDocs: description: Apstra API Documentation url: https://www.juniper.net/documentation/us/en/software/apstra/