calling management APIs in on premise APIGEE

Hi  team

 

We have a need to call the management APIs for the below

Creation of the developer and creating an APP for the developer.

It should be done with in a custom API. As soon as this custom API is called we need call the management APIs( need to know where to get this URLs) to do the job without manual intervention.  Appreciate quick response.

Ours is a on premise installation. 

Solved Solved
0 4 244
1 ACCEPTED SOLUTION

in the second call API output we get the API Key and secret as response of the API for the developer?

yes, that is correct.

please tell me how do we get the bearer token for both the management APIs?

Use the get_token utility. Or, directly call the API that get_token uses (It's a script, you can just look at the code). BTW, for some (simpler) on-prem installs of Apigee, Basic Auth is fine. Which means you just need credentials for your own username + password.

We are planning to expose an API to onboard a developer and hence we are wrapping up both the above APIs in to that API and expose to an internal system in order to automate the onboarding process. ( Since our developer portal is still not in place) . Is this okay from a practice perspective?

yes, absolutely. Sounds fine to me.

View solution in original post

4 REPLIES 4

Also if any Authorisation needed for calling the Management APIs, how to get the same.. appreciated.

The following applies to Apigee Edge.  Not Apigee X/hybrid.

The documentation for the Management API for Apigee Edge is here. If you want developer and Keys for developers, then you can look here.

Specific to creating a developer profile, that's this request.  It would be something like this

POST $mgmtserver/v1/organizations/{org_name}/developers
content-type: application/json
Authorization: Bearer $TOKEN

{
  "email": "ahamilton@example.com",
  "firstName": "Alex",
  "lastName": "Hamilton",
  "userName": "ahamilton" 
}

And to create a key for a developer, that's THiS request.  And it might look like so:

POST $mgmtserver/v1/organizations/{org_name}/developers/{developer_email}/apps
Authorization: Bearer $TOKEN
content-type: application/json

{
  "attributes": [ { "name" : "date added", "value": "2023 Dec 05"} ],
  "apiProducts": [ "SampleProduct1" ],
  "callbackUrl" : "",
  "keyExpiresIn" : "8640000",
  "scopes" : [ ],
  "name" : "newApp"
}

 

Thanks a lot @dchiesa1 for the quick response. Really appreciate it.

1) So we call the first API to create the developer profile and then the second API to create an APP for the developer with a product . 

  1.                        May I know in the second call API output we get the API Key and secret as response of the API for the developer?
  2.    Also can you please tell me how do we get the bearer token for both the management APIs?

2)  Need your advise here. We are planning to expose an API to onboard a developer and hence we are wrapping up both the above APIs in  to that API and expose to  an internal system in order to automate the onboarding process. ( Since our developer portal is still not in place) . Is this okay from a practice perspective?

in the second call API output we get the API Key and secret as response of the API for the developer?

yes, that is correct.

please tell me how do we get the bearer token for both the management APIs?

Use the get_token utility. Or, directly call the API that get_token uses (It's a script, you can just look at the code). BTW, for some (simpler) on-prem installs of Apigee, Basic Auth is fine. Which means you just need credentials for your own username + password.

We are planning to expose an API to onboard a developer and hence we are wrapping up both the above APIs in to that API and expose to an internal system in order to automate the onboarding process. ( Since our developer portal is still not in place) . Is this okay from a practice perspective?

yes, absolutely. Sounds fine to me.