11-03-2017 06:57 AM
I’m writing a Spark Bot to look up contract numbers by serial number, using the Serial Number to Information API. Does the API require the application creator OR the resource owner to have that contract number associated to their CCO ID in order to see the contract number in the look up? Is there an API or access method that will allow my bot to see all contracts associated with hardware directly sold by my company?
11-03-2017 07:14 AM
Hi,
The "requester" - whoever is making the request at the time the API is called with a serial number - needs to be associated with the contract the device is covered under for entitled data like contract number or installed at info to be returned by SN2Info.
Who the requester is will depend on the OAuth grant type used to generate the token. If you use client credentials, it will be the developer, since the developer's CCO ID available in the two-legged flow. If you use one of the three-legged flows (implicit, auth code, or resource owner) it will be whoever's CCO ID is used to log in. Make sense?
I am unaware of an API that would provide all contracts for a company - sorry.
Keith
11-03-2017 07:24 AM
Totally makes sense Keith. Disappointing, but it makes sense. I know, when we do contract downloads through CCW-R or CSCC, as long as the person has access to the BID the contract was purchased under (from the partner) they can download the contract info. It would be great if the Serial Number to Info API worked the same way.
11-03-2017 07:42 AM
If the BID is associated with the requester's CCO ID, the entitlement should work. (I was being a bit loose with "...associated with the contract..." above - BIDs are expanded to get their contracts then the check for the requester<->contract<->device link is made.) So if you are having a problem with a specific CCO ID/contract/SN, reach out to me directly and I'll take a look.
Keith
11-03-2017 01:24 PM
Ok, so, theoretically, if I'm the developer, using client_credentials as my auth type, and my CCO ID is associated with the correct BIDs, I should see the smartnet contract information for any hardware sold under those BIDs when I run my API call. Is that correct?
11-06-2017 09:12 AM
If you see the contract or BID associated with your CCO ID in your Account Profile (https://rpfa.cloudapps.cisco.com/rpfa/profile/edit_entitlement.do?Tab=3), then yes, you should see the contract data through the API.
Keith
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide