11-25-2019 02:58 AM
I am using http method GET to get the AEP details by using the below API:
/api/node/mo/uni/infra/attentp-<AEP_NAME>-aep/fltCnts.json?subscription=yes
Here, very rare I get a response & most of the time I get error 405.
{
"totalCount": "1",
"imdata": [
{
"error": {
"attributes": {
"code": "405",
"text": "Subscription request failed, unable to locate opened web socket. Please re-login to the application"
}
}
}
]
}
APIC version: 3.2(1m)
Note: AEP_NAME is the name of AEP
Solved! Go to Solution.
11-26-2019 05:02 PM - edited 11-26-2019 09:47 PM
Hi @zulfikhar_a,
That often means the APIC does not like the format of the query (HTTP 405 is "client side error" and can be tricky).
Try this:
/api/node/mo/uni/infra/attentp-AEP_NAME.json?query-target=self
I tried that and got the following result:
{ "infraAttEntityP": { "attributes": { "annotation": "", "childAction": "", "configIssues": "", "descr": "Testing AEP GET", "dn": "uni/infra/attentp-AEP_NAME", "extMngdBy": "", "lcOwn": "local", "modTs": "2019-11-27T01:12:35.915+00:00", "monPolDn": "uni/fabric/monfab-default", "name": "AEP_NAME", "nameAlias": "", "ownerKey": "", "ownerTag": "", "status": "", "uid": "15374" } } }
A good way to check for the right query string is to use the Object Store Browser option. It should be one of the options on a particular object.
Once you open up the Object Store browser, click on the "Show URL and response of last query" and it will show you just that.
I took that URL and used it in the Ansible ACI REST module to get back the output above which as you can see from the screen shot below is the same.
11-26-2019 05:02 PM - edited 11-26-2019 09:47 PM
Hi @zulfikhar_a,
That often means the APIC does not like the format of the query (HTTP 405 is "client side error" and can be tricky).
Try this:
/api/node/mo/uni/infra/attentp-AEP_NAME.json?query-target=self
I tried that and got the following result:
{ "infraAttEntityP": { "attributes": { "annotation": "", "childAction": "", "configIssues": "", "descr": "Testing AEP GET", "dn": "uni/infra/attentp-AEP_NAME", "extMngdBy": "", "lcOwn": "local", "modTs": "2019-11-27T01:12:35.915+00:00", "monPolDn": "uni/fabric/monfab-default", "name": "AEP_NAME", "nameAlias": "", "ownerKey": "", "ownerTag": "", "status": "", "uid": "15374" } } }
A good way to check for the right query string is to use the Object Store Browser option. It should be one of the options on a particular object.
Once you open up the Object Store browser, click on the "Show URL and response of last query" and it will show you just that.
I took that URL and used it in the Ansible ACI REST module to get back the output above which as you can see from the screen shot below is the same.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide