cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2763
Views
0
Helpful
2
Replies

ACI REST API request

compterds
Level 1
Level 1

Hello there,

 

I'm currently building an ACI dashboard using dashing framework and ruby file for requesting by rest API my ACI fabric.

We've a lot of virtual machines at the moment, but there are many constraint when using fvCEp. Let's assume we have floating ip on virtual machines, it will count at twice for the same VM. one Ep with private ip address and the second one with floating (public) ip address.

I'd like to count by api rest only fvCEp.ip attributes which contains 192.168. 

I don't know and I don't think it is possible to set a filter "contains " on my api request for the specific attribute. 

 

I've spent times reading this guidelines:

https://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/2-x/rest_cfg/2_1_x/b_Cisco_APIC_REST_API_Configuration_Guide/b_Cisco_APIC_REST_API_Configuration_Guide_chapter_01.html

 

With moquery it's really easy because of using regex.

I'm just wondering if there's a specific way (like regex) but for api rest on ACI.

 

Thanks for your help

 

Yoann

1 Accepted Solution

Accepted Solutions

Marcel Zehnder
Spotlight
Spotlight

Hi Yoann

 

Because the wcard-Filter is not working with the fvCEp.ip attribute you can use ge and le filters:

GET https://APIC/api/class/fvCEp.json?query-target-filter=and(ge(fvCEp.ip,"192.168.0.0"),le(fvCEp.ip,"192.168.255.255"))

HTH

Marcel

View solution in original post

2 Replies 2

Marcel Zehnder
Spotlight
Spotlight

Hi Yoann

 

Because the wcard-Filter is not working with the fvCEp.ip attribute you can use ge and le filters:

GET https://APIC/api/class/fvCEp.json?query-target-filter=and(ge(fvCEp.ip,"192.168.0.0"),le(fvCEp.ip,"192.168.255.255"))

HTH

Marcel

Hello there,

 

Well, it was quite easy finally.

I feel a bit dumb at the moment. But I've learnt something by the way.

 

Just wondering, it is something that could be "improved" for the future, do you have any information about the roadmap?  

 

Thanks for your help, my dashboard is now "fully fit" :) 

 

Yoann

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:

Save 25% on Day-2 Operations Add-On License