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?