cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2909
Views
0
Helpful
1
Replies

http error 405

zulfikhar_a
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

Claudia de Luna
Spotlight
Spotlight

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.

 

community-objstore-2019-11-26_16-53-55.jpg

 

 

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.

 

community-objstore-url-2019-11-26_16-53-55.jpg

View solution in original post

1 Reply 1

Claudia de Luna
Spotlight
Spotlight

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.

 

community-objstore-2019-11-26_16-53-55.jpg

 

 

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.

 

community-objstore-url-2019-11-26_16-53-55.jpg

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