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

unable to retrieve UC certificate info using API

cxu21
Level 1
Level 1

I am trying to retrieve certficate information against the Cisco sandbox collaboration 14.0.

Here is my python code

def getTomcat(hostname, username, password):
body = {"service": "CAPF"},
response = requests.get(
url=''.join(('https://', hostname, '/platformcom/api/v1/certmgr/config/csr')),
headers= {"Content-Type": "application/json"},
auth= (username, password),
json= body,
verify=False
)
print(response)
print(response.json())
#
if __name__=="__main__":
getTomcat("10.10.20.1", "admin","pw")

Here is the reference I used https://developer.cisco.com/docs/certificate-management/#!api-reference

It returned error code 400 as below

<Response [400]>
{'key': 400, 'messages': ['Invalid Service Name!'], 'trackingID': 'UC_5680397f-0fa9-4271-bcc2-0e194de0b5a6'}

Is there anything else I am missing?

 

1 Reply 1

As this is in relation with a API it is advisable to ask this question over at DevNet as that’s where questions related to APIs are handled.



Response Signature