apigee vs code emulator - programmatically create developers and developers app

Hi, 

I'm trying to replicate locally, the apigee's functionality I'm using in staging and production environments...
I was able to do almost all of it, but I'm not being able to create developers and developers app programmatically (In those environments I do it executing REST calls to google cloud https://apigee.googleapis.com/v1/... , during runtime)

Is there a way to create this type of entities programmatically and on runtime? So far, I was able to do it only by exporting test resources 😪, which doesn't reflect the actual flow.

Thanks!!!

0 6 216
6 REPLIES 6

This should be doable with the management APIs, but note this is an antipattern

https://cloud.google.com/apigee/docs/api-platform/antipatterns/invoking-management

Hi @dknezic, and thanks for you quick response.

Sorry if I wasn't clear, I didn't mean to invoke apigee from within an Api proxy... I want to invoke it from other services running in my local machine.

But I haven't been able, I'm basically trying to execute in this address for example:
POST localhost:8080/v1/organizations/hybrid/developers

Where 8080 is the control port (using the default vs code suggests)
The hybrid organization I inferred it from the docker logs

But I keep getting following error, for example, when trying to create a new developer in that address:

{
"code": "rest.requested_operation_invalid",
"message": "POST operation is not supported",
"contexts": []
}


Maybe you can realize what I'm missing or doing wrong.

Thanks once again! 😉

Is it you're trying to use a management api but for a local emulator?

Exactly!

In the end, I just need to create developers and developers apps programmatically in apigee emulator running in vs code, instead of doing it by uploading test resources manually.

Logged-in users to my web application, can create this entities today in my production implementation, to get an api key.

Is it possible to use management apis in a local emulator? Is there any other non-manual way of doing this?  

I'm not aware of the management APIs being supported by the emulator. 

Otherwise look at using a CI CD pipeline and an actual Apigee dev/test environment rather than an emulated one.

Is there any other way of running apigee locally for recreating staging/production environments functionality?

Is the only blocker we are having, for adopting apigee as our api management tool😪