Hey,
I'm fairly new to automation, and definitely new to Cisco automation. I'm not clear on the difference between the APIs that are available through the DevNet portal (https://developer.cisco.com/docs/service-apis) and the APIs available through the Cisco API Console (https://apiconsole.cisco.com/apps/myapps). I've gone through the on-boarding steps for the service APIs, created an application and successfully authenticated with an API call, but something still seems amiss. I'm trying to grab the customerId but I'm just getting back a dict with an empty list:
import requests
response = requests.post('https://cloudsso.cisco.com/as/token.oauth2',
params={'grant_type': 'client_credentials',
'client_id': 'xxx',
'client_secret': 'xxx'})
print(response.status_code)
token = response.json()
headers = {'Authorization': f"Bearer {token['access_token']}"}
customer_info = requests.get('https://apx.cisco.com/cs/api/v1/customer-info/customer-details', headers=headers)
print(customer_info.status_code)
print(customer_info.json())
#output
200
200
{'data': []}
The end goal is to pull license info (contracts, coverage, etc..) and link it together with our source of truth (Netbox). From the API documentation this should be possible, I'm just a little lost on how to get started.
tldr;
- What's the difference between the DevNet service APIs and the Cisco API console?
- What did I miss when setting up my account for API access? (pulling no customer data).
- is https://services.cisco.com/ related to the API calls in anyway?
Thanks,
EDIT:
It looks like the Cisco API Console is intended to be used by partners, or at least the Cisco Xpress Connect suite of APIs part of it.
Cisco Commerce Xpress Connect API’s are your one stop shop for self-guided, self-paced, automation with our commerce processes through API’s related to our pricelists, configuration, quoting, order status, software subscription and customer registry ...
The other half of the APIs available have no documentation or support available so who knows.