cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7394
Views
0
Helpful
26
Comments
kesimmon
Cisco Employee
Cisco Employee

Task Name

APIC API Command

Description

Send XML/JSON to Application Policy Infrastructure Controller

Prerequisites

Validated on UCSD 5.3.1.1

Category

Workflow Task

Components

Application Centric Infrastructure

User Inputs

  1. APIC IP
  2. APIC User
  3. APIC User Password
  4. Method (POST/GET)
  5. XML/JSON

Output

Result of operation

Date 05-SEP-2017: New Custom task uploaded which works both on HTTP and HTTPS. Tested and validated on UCSD 6.0.1.2 - by Phani Penmethsa

Summary

Provides custom task to send/retrieve information from an Application Centric Infrastructure Controller using XML or JSON.

Installation

  1. Download the attached .ZIP file below to your computer. *Remember the location of the saved file on your computer.
  2. Unzip the file on your computer. Should end up with a .WFDX file.
  3. Log in to UCS Director as a user that has "system-admin" privileges.
  4. Navigate to "Policies-->Orchestration" and click on "Import".
  5. Click "Browse" and navigate to the location on your computer where the .WFD file resides. Choose the .WFD file and click "Open".
  6. Click "Upload" and then "OK" once the file upload is completed. Then click "Next".
  7. Click the "Select" button next to "Import Workflows". Click the "Check All" button to check all checkboxes and then the "Select" button.
  8. Click "Submit".
  9. A new folder should appear in "Policies-->Orchestration" that contains the imported workflow. You will now need to update the included tasks with information about the specific environment.

Usage

See attached document “UCS Director – APIC API Command”

The workflow also includes a sample Unit Test script that can be used to validate the custom task against different releases of UCS Director.

Also contains tips on finding APIC API calls.

Example

Use Post/Get operations to send/query the Application Policy Infrastructure Controller.

APIC API Example.png

Comments

It seems to work only with HTTP.

Is there a way to send API Commands via HTTPS ?

Orf Gelbrich
Cisco Employee
Cisco Employee

https://communities.cisco.com/docs/DOC-56419

[cid:image002.png@01D2D9D2.3687BA70][cid:image003.png@01D2D9D2.3687BA70]

Orf Gelbrich

Check out UCS Director Workflow INDEX<https://communities.cisco.com/docs/DOC-56419> on Cisco Communities Site (Twitter @UCSDGURU)

sandeepthumu
Level 1
Level 1

HI Orf,

I have created a configuration in the CISCO ACI using the post method and it is successful, I would like to know if we can map the rollback to this post method.

Thanks,

Sandeep.

Orf Gelbrich
Cisco Employee
Cisco Employee

Roll back works in conjunction with workflows and workflow task. You would be better off creating a workflow vs just calling an API call.

sandeepthumu
Level 1
Level 1

hi Orf, I do have a workflow created with the only task of API call. To this workflow I want to create a Rollback.

Orf Gelbrich
Cisco Employee
Cisco Employee

Take a look at these 4 examples cucsd_patch_6_5_0_3_65941.zip

sandeepthumu
Level 1
Level 1

thanks for the response, but can you provide me a link to access 'cucsd_patch_6_5_0_3_65941.zip'.


Orf Gelbrich
Cisco Employee
Cisco Employee

I would need your CCO ID

ogelbric@cisco.com<mailto:ogelbric@cisco.com>

sandeepthumu
Level 1
Level 1

Here is my CCO ID: 'sandeepthumu'

Also shared this through my personal mail ID.

Orf Gelbrich
Cisco Employee
Cisco Employee

I thought I had already published this to you?

sandeepthumu
Level 1
Level 1

Thanks for the file Orf,

I got the access this seems like some sort of package. I could not find the example scripts, is there any specific procedure to see the examples?

Orf Gelbrich
Cisco Employee
Cisco Employee

I published the patch file for you. What else are you looking for?

harishap.24
Level 1
Level 1

Hi Orf,

 

I am Using APIC API command using get method.

Let us take an sample example

if i used APIC URI /api/mo/uni/${value}.json it is working fine 

but when i am trying to use the URI which is like /api/mo/uni/[${value}].json i am facing issue like Invalid URI

Could you please update me that any specific format we need to follow if there are any square brackets in uri.

 

Thanks

Harish

Orf Gelbrich
Cisco Employee
Cisco Employee
Variables in this case start with an @ - that is also in the help text in task.

harishap.24
Level 1
Level 1

issue1.png

I Have provided the input which is provided as above but failing i have missed anything? 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links