zapodeanu / dnacentersdk

Cisco DNA Center Python SDK
MIT License
6 stars 4 forks source link

sites.get_membership() method return HTTP 500 #1

Open cunningr opened 4 years ago

cunningr commented 4 years ago

https://github.com/zapodeanu/dnacentersdk/blob/d136ab89ce6360ec72c21f8eaab1703e09381727/dnacentersdk/api/v1_3_0/sites.py#L693

According to the Intent API docs, the URI should be;

dna/intent/api/v1/membership/{siteId}

However the SDK seems to be putting this positional arg as a parameter;

DEBUG:dnacentersdk.restsession: Request URL: https://10.201.14.12/dna/intent/api/v1/membership Method: GET Headers: User-Agent: python-requests/2.22.0 Accept-Encoding: gzip, deflate Accept: / Connection: keep-alive X-Auth-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1Y2Q0OTBjOGY5M2YwNjAwYzkwYjZhYTgiLCJhdXRoU291cmNlIjoiaW50ZXJuYWwiLCJ0ZW5hbnROYW1lIjoiVE5UMCIsInJvbGVzIjpbIjVjZDQ5MGM3ZjkzZjA2MDBjOTBiNmFhNyJdLCJ0ZW5hbnRJZCI6IjVjZDQ5MGM2ZjkzZjA2MDBjOTBiNmFhNSIsImV4cCI6MTU3ODc2ODgwNSwiaWF0IjoxNTc4NzY1MjA1LCJqdGkiOiI5NmM3Mjc1MC0xYjQxLTRmYjYtOWE5Zi0yNGE3NjJhMTdmMjEiLCJ1c2VybmFtZSI6ImFkbWluIn0.WuxTeFPZMqJMLxzIAwbbva7-BWiEoEEP-Y3vW-LzdMOjynGBaA7VhVUUJpKG-N22MxFBXRvYOMYeRdAohBftjqrOs8r1tpRMKA8vXmXOzvpIzEzYw53U9i0lsW3TUBws2FeR5mQg-53N16Glg_0tAqxTm8WVysjGQ8-2xBEIVN9MdaBJcycAqNzOWAKG395t_9JBdtO-112GPsbt-MtGHyzc_6ruu4IjzjMyC9eKtS6lqwY-QnhDfcc5rTSYyQw68Eb_oZjT7vb2aFEWB7XBGVSb-PMCYJt-RY8JUDijr4jkpiijaJ-WkMeinfYNo4m2udPmA3NHPohdpxJ2MfYXwg Content-type: application/json;charset=utf-8 Params: { "siteId": "37d90044-3330-4842-b15f-af64ea9981d0" } Body: {} DEBUG:dnacentersdk.restsession: Response Status: 500 - Internal Server Error Headers: Content-Type: text/plain; charset=UTF-8 Content-Length: 42 Connection: keep-alive bapiexecutionid: 47892a67-30b3-44ed-965f-bc1913b45afc Server: webserver Date: Sat, 11 Jan 2020 17:53:26 GMT Via: api-gateway Cache-Control: no-store Pragma: no-cache Content-Security-Policy: default-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: X-Content-Type-Options: nosniff X-XSS-Protection: 1 Strict-Transport-Security: max-age=31536000; includeSubDomains X-Frame-Options: SAMEORIGIN Body: {"message":"Site id should not be empty."}

I can use this intent URI successfully with curl and the customer;

dna/intent/api/v1/membership/37d90044-3330-4842-b15f-af64ea9981d0

chaispaquichui commented 4 years ago

I've the same problem