cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Cisco Community Designated VIP Class of 2020

11521
Views
5
Helpful
8
Replies
Beginner

How to use EoX API

Hello, 

 

I'm new at this subject and I want to make a request for the EoX API, reference - https://developer.cisco.com/docs/support-apis/#!eox/get-eox-by-dates

 

This link shows what do I need to put at the url request, but it doesn't say anything about the headers, the main request url for JSON is - GET https://api.cisco.com/supporttools/eox/rest/5/EOXByDates/1/2011-01-01/2015-12-31?responseencoding=json

 

When I send it, the status shows 403 Forbidden, I thing it's because something is necessary at the headers but I don't know what. 

 

Can anyone help me with this please?

 

Thank you,

Bruna T.

Everyone's tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: How to use EoX API

Hi Bruna,

 

The secret isn't what is used for authorization header. A token, generated using your client id and that secret goes there. The Token Developer Guide linked for the API Console's Platform Documentation page does a good outlining the steps. 

 

Essentially you use the client id/secret you got when creating the app to generate an access token by calling cloudsso.cisco.com. You take the access token from that request and place it on an Authorization header as Bearer {{token}} when you call to the API.

 

That token will be valid for an hour, when you'll need to create a new token. 

 

 Hope that helps.

Keith

 

View solution in original post

8 REPLIES 8
Cisco Employee

Re: How to use EoX API

Any request to an API through the api.cisco.com proxy requires an access token. To get a token, you'll need to create an application in the API Console that includes the API(s) you want to use. Details on using the Console and getting an access token are at https://apiconsole.cisco.com/documentation (I think the Token Developer Guide (pdf) linked from that page does a good job of outlining the various OAuth 2 grant type you can use).

That said, EOX API is one of the Support APIs, which are available to SNTC customers (and their partners) and PSS partners. Since the Support APIs are limited to specific service contract types, they will not show up in the API Console until the developer has gone through the appropriate on-boarding process outlined at the top of the Support APIs DevNet site. 

But it looks like you are a Cisco employee and neither of those methods will work for you - please reach out to me directly and I'll point you to the internal process.

Regards,

Keith

Highlighted
Beginner

Re: How to use EoX API

Hi Keith!

 

Actually I'm not a Cisco employee, I work at a partner. 

I'll try to do the process you've indicated, create an application and include the APIs that I need. 

 

If I have new troubles I'll reply again :)

 

Thank you!

Bruna. 

Beginner

Re: How to use EoX API

Hi Keith,

 

I've registered my application and I received an client ID and a client secret, but when I put this secret on authorization field at the request the error 403 continues, do you know what can I do to fix this please?

 

Thank you, 

Bruna 

Cisco Employee

Re: How to use EoX API

Hi Bruna,

 

The secret isn't what is used for authorization header. A token, generated using your client id and that secret goes there. The Token Developer Guide linked for the API Console's Platform Documentation page does a good outlining the steps. 

 

Essentially you use the client id/secret you got when creating the app to generate an access token by calling cloudsso.cisco.com. You take the access token from that request and place it on an Authorization header as Bearer {{token}} when you call to the API.

 

That token will be valid for an hour, when you'll need to create a new token. 

 

 Hope that helps.

Keith

 

View solution in original post

Beginner

Re: How to use EoX API

Hi When I try to generate token on url :https://cloudsso.cisco.com/

it shows nothing but "cloudsso is live cloudsso2 is live"

 

Please help!!

Participant

Re: How to use EoX API

What language are you using to make the API query?

 

Can you post your code to get the token (hide the client ID/secret) and make the API call?

 

Usually there would be 2 steps for a successful API call:

  1. Make an API call to get an authorization token using your Client ID and Client Secret (this token lasts 1 hour)
  2. Make an API call against the thing you want (like EOX, Bug, etc.) using the token from step 1 in the Authorization header
Beginner

Re: How to use EoX API

Hello!

 

I've finally had success making API calls, I'm using postman and now everything is working fine, I've had some problems with the token but now is already solved.

 

Thank you, 

Bruna. 

Beginner

Re: How to use EoX API

Hi Bruna,

 

One of Cisco employees referred me to your post. I'm working in Nationwide Insurance, a client of Cisco. We have the same need to request API for EOX data. But I have no clue how to make it happen. Do you mind to share with me your experience and success step by step?

My email: guoy2@nationwide.com

 

Thank you!

 

Lisa Guo

CreatePlease to create content
Content for Community-Ad
FusionCharts will render here
This widget could not be displayed.