cisco aci Api postman

Short overview about Cisco Aci Api Postman and what's good to know about.

If you’re a network engineer who is looking to get started with the Cisco ACI API, this article is for you. We’ll show you how to use the Postman tool to make API calls to a Cisco ACI controller.

Read more related to Cisco ACI: Cisco aci overview
What is Postman?

Postman is a tool that allows you to make HTTP requests to a server. It’s a popular tool for developers who are working with APIs.

What is an API?

An API is a way for two computer systems to communicate with each other. When you make an API call, you’re essentially asking a computer system to do something for you.

In the context of Cisco ACI, the API allows you to manage your ACI environment from a central location. You can use the API to create and delete objects, such as tenants, application profiles, and contracts.

How do I get started with the Cisco ACI API?

The first thing you need to do is download the Postman tool. Once you have Postman installed, you’ll need to configure it to work with your Cisco ACI controller.

To do this, you’ll need to create a new environment in Postman. An environment is a collection of variables that you can use in your requests.

In the environment, you’ll need to define the following variables:

• aci_url: This is the URL of your Cisco ACI controller.

• aci_username: This is the username that you use to login to the Cisco ACI controller.

• aci_password: This is the password that you use to login to the Cisco ACI controller.

Once you have these variables defined, you’ll need to create a new request in Postman. In the request, you’ll need to specify the URL of the Cisco ACI API.

The Cisco ACI API is a REST API, which means that you can use any HTTP method in your request. For this example, we’ll use the GET method.

In the Headers tab, you’ll need to specify the Content-Type as application/json.

In the Body tab, you’ll need to specify the following JSON:

{

“auth”: {

“aci_url”: “{{aci_url}}”,

“aci_username”: “{{aci_username}}”,

“aci_password”: “{{aci_password}}”

}

}

This JSON body will be used to authenticate your request to the Cisco ACI controller.

Once you have the request configured, you can send it to the Cisco ACI controller. If the authentication is successful, you should see a response similar to the following:

{

“imdata”: [

{

“aaaLoginDomain”: {

“attributes”: {

“descr”: “default”,

“dn”: “uni/aaaLoginDomain-default”,

“name”: “default”,

“ownerKey”: “”,

“ownerTag”: “”,

“status”: “created”

}

}

}

],

“totalCount”: “1”

}

The response contains information about the default AAA login domain. This domain is used for authentication when you login to the Cisco ACI controller.

Now that you’ve authenticated to the Cisco ACI controller, you can start making API calls. In the next section, we’ll show you how to create a new tenant using the API.

How do I create a new tenant using the API?

To create a new tenant, you’ll need to use the POST method. In the Body tab, you’ll need to specify the following JSON:

{

“fvTenant”: {

“attributes”: {

“descr”: “My tenant”,

“name”: “my-tenant”

},

“children”: []

}

}

This JSON body will create a new tenant with the name “my-tenant”.

Once you have the request configured, you can send it to the Cisco ACI controller. If the tenant is created successfully, you should see a response similar to the following:

{

“imdata”: [

{

“fvTenant”: {

“attributes”: {

“descr”: “My tenant”,

“dn”: “uni/tn-my-tenant”,

“name”: “my-tenant

Related content