Is there an API that can get information for a given API Key?

Not applicable

If I have a given API Key, is there an Apigee API or GUI I can use to figure out what Developer App it is associated with? That is, without going through every single Developer App manually?

For example, I can pull details about an OAuth Access token with "

/accesstokens/<access_token>", but is there something similar for an API key?

Solved Solved
1 4 164
1 ACCEPTED SOLUTION

akoo
New Member

Hi @Eric Dahl,

Great question. You can put in the API key into the search box on the Developer App page. The UI will dynamically show you the corresponding developer app for that key. Screenshot attached for convenience:

2538-screen-shot-2016-04-22-at-122622-pm.png

View solution in original post

4 REPLIES 4

akoo
New Member

Hi @Eric Dahl,

Great question. You can put in the API key into the search box on the Developer App page. The UI will dynamically show you the corresponding developer app for that key. Screenshot attached for convenience:

2538-screen-shot-2016-04-22-at-122622-pm.png

Thanks. That works. Just curious: is there also an API for that?

The way to do it would be to use expand=true and then just scan the response (in the client app) for the apikey you seek.

like this:

curl -i -n -X GET \
 'https://api.enterprise.apigee.com/v1/o/ORGNAME/apps?expand=true'

...and then do a filter on the returned array, looking for your target key.

Here is a nodejs command-line tool that does this: findApiKey

@Dino That's going to be very expensive when you have more than a thousand apps. It makes multiple calls behind the scenes to get all the apps, the app credentials for each app. An easier approach maybe to setup a simple "No Target" proxy, add a VerifyApiKey policy to it. Once the policy executes successfully, it would populate a bunch of variables like developer.id, developer.name, app.id, app.name etc. That might be a far better approach mainly because of 2 things:

1. you are making runtime calls which is far more scalable than the management layer

2. you are only fetching the apikey specific details and not all other apps and keys

Today UI is doing the magic behind the scenes, but doing it multiple times would really bring down the performance of the management APIs, especially if you have a large number of apps.