NeDi Community

Networking => Management => Topic started by: SchmuFoo on March 19, 2018, 02:55:48 PM

Title: Integration of Cisco Support API? (get-coverage-summary-by-serial-numbers)
Post by: SchmuFoo on March 19, 2018, 02:55:48 PM
Hello,

just wondering if maybe someone already is using the following Cisco Suppport API in an NeDi Plugin/"Hack" etc ;) ?

https://developer.cisco.com/docs/support-apis/#serial-number-to-information/get-coverage-summary-by-serial-numbers

Cheers,
Jan
Title: Re: Integration of Cisco Support API? (get-coverage-summary-by-serial-numbers)
Post by: rickli on March 25, 2018, 12:07:24 PM
I know, some have looked into it. I'll certainly do it, if a customer pays (some of) my time...
Title: Re: Integration of Cisco Support API? (get-coverage-summary-by-serial-numbers)
Post by: SchmuFoo on May 15, 2018, 03:35:25 PM
I know, some have looked into it. I'll certainly do it, if a customer pays (some of) my time...

Thanks Remo, I will forward this info to my specific customer .. ;)
Title: Re: Integration of Cisco Support API? (get-coverage-summary-by-serial-numbers)
Post by: SchmuFoo on August 27, 2018, 03:26:43 PM
.. until then I have to figure out, how I can extract the "Devices-List.php?in[]=vendor&op[]=~&st[]=Cisco" List (Serial Number only) from the NeDi Database via the Bash  8) .. and Integrate this query command in my Alpha script  :P

Code: [Select]
# Script Alpha

## Lookup against Cisco API to get Service Coverage Status

json=$( curl -s -k -H "Content-Type: application/x-www-form-urlencoded" -X POST -d "client_id=..." -d "client_secret=..." -d "grant_type=client_credentials" https://cloudsso.cisco.com/as/token.oauth2 )
token=$( jq -r ".access_token" <<<"$json" )

# Use received Token now for an individual Request
curl -X GET -s -k -H "Accept: application/json" -H "Authorization: Bearer $token" https://api.cisco.com/sn2info/v2/coverage/status/serial_numbers/JMX...