HomeGuidesAPI Reference
GuidesAPI ReferenceGitHubAirheads Developer Community
Guides

Getting Started with REST APIs

Introduction

In this section, we'll take you from understanding the basics of APIs to making your first API call & exploring advanced tools like Postman to streamline your workflow.

The REST API allows you to interact with your HPE Aruba Networking Central account programmatically.It provides a set of endpoints that enable you to configure devices, retrieve network data, and integrate New Central with external systems. APIs are designed to help you:

  1. Configure devices across your network
  2. Retrieve real-time monitoring data across the devices & clients in your network for improved visibility & reporting.
  3. Build integrations from Central with other tools.

If you're new to APIs, don't worry - we'll guide you through basics step-by step in this guide.

📘

What is REST API ?

A REST API (REpresentational State Transfer) is a way for applications to communicate over the internet.

Think of it as a set of rules that allows you to:

  1. Send requests to a server or API Request ( like asking New Central about sites in your account)
  2. Receive responses or API Response (like getting a list of sites from New Central)

In simple terms, REST APIs are how you can interact with New Central without needing to login and click buttons.

API Request Methods

Each API has a request method associated to it which indicates the desired action you would like to perform by making that API call. With New Central's REST APIs, you'll mainly work with these HTTP Request methods:

HTTP Request MethodsDescription
GETRetrieves target resource
POSTCauses change in state, creates an entity
PATCHApplies partial modification to a target resource
PUTReplaces the target resource with data in the HTTP Request payload
DELETEDeletes a resource

For example:

  • A GET request can retrieve a list of devices in your account
  • A POST request can create a new configuration profile in your account

Base URLs

New Central's APIs require a Base URL which is determined based on the location of your HPE Aruba Networking Central account. You can find the exact geographical cluster of your account on HPE GreenLake platform.

API Gateway Base URLs

ClusterBase URL
EU-1 (eu)ge1.api.central.arubanetworks.com
EU-Central2 (eucentral2)ge2.api.central.arubanetworks.com
EU-Central3 (eucentral3)ge3.api.central.arubanetworks.com
US-1 (prod)us1.api.central.arubanetworks.com
US-2 (central-prod2)us2.api.central.arubanetworks.com
US-WEST-4 (uswest4)us4.api.central.arubanetworks.com
US-WEST-5 (uswest5)us5.api.central.arubanetworks.com
US-East1 (us-east-1)us6.api.central.arubanetworks.com
Canada-1 (starman)cn1.api.central.arubanetworks.com
APAC-1 (apac)in.api.central.arubanetworks.com
APAC-EAST1 (apaceast)jp1.api.central.arubanetworks.com
APAC-SOUTH1 (apacsouth)au1.api.central.arubanetworks.com
Internal (internal)internal.api.central.arubanetworks.com

Ensure you use the correct Base URL in your API calls. Using the wrong Base URL will result in failed requests.

Authentication

All New Central API requests require an access token for authentication. Without a valid token, your API requests won't be authorized & will fail.

What is an access token ?

Access Token is a string that identifies a user, app, or web page and is used to access an API. The access token provides a temporary and secure access to the APIs. This token is a "bearer token", which means the bearer of this token is granted access into the system.

Every New Central API request must include this token in the Authorization header.

We'll cover token generation in new Central in the next guide .

API Status Codes

When you make an API request, the server responds with a status code that indicates whether your request was successful or if there was an issue. In New Central, API call responses contain standard HTTP status codes.

Status CodeDescription
200Success
400Bad Request (Check your API input)
401Unauthorized (Missing/Expired Token)
403Forbidden(Permissions Issue)
500Internal Server Error

To know about a New Central API call's response status codes and its description, refer the "Response" dropdown text box for an API endpoint in API Reference Page.

Recap: What is required to make an API call using New Central?

  1. Base URL - Make sure you're using the correct Base URL for your region.
  2. Access Token - Generate an access token & include it in the Authorization header of your API Request
  3. API Reference Guide - Use the API Reference Guide to explore & test all available API endpoints on New Central

In the next guide, we'll walk you through how to generate your first access token, a key step in authenticating your API requests.


What’s Next

Head over to the below page for a step-by-step walkthrough on how to generate your access token