oh I see.
In that case, I advise you strongly to not try to build that into an API Proxy. If it’s a one-time thing, I would want to build a script that does the work. Just run it from your workstation terminal.
For scripting these kinds of things, you can choose whatever you like: Powershell, nodejs, Python, and I suppose you could use bash too.
I am most familiar with nodejs, and find it to be a good tool for scripting automated tasks.
There is a library that can help - apigee-edge-js. It’s a npm module that provides an interface for connecting to an Apigee organization and invoking the management API. It uses JavaScript promises, and if you understand that, then the programming model is pretty easy to use, I think. Here’s an example for how you would create a new developer:
const apigeejs = require('apigee-edge-js'),
apigee = apigeejs.apigee;
const options = {
org : config.org,
user: config.username,
password: config.password
};
apigee.connect(options)
.then ( org => {
const options = {
developerEmail : "JDimaggio@example.org",
lastName : "Dimaggio",
firstName : "Josephine",
userName : "JD1"
};
return org.developers.create(options)
.then( result => console.log('ok. developer: ' + JSON.stringify(result)) )
})
.catch ( error => console.log('error: ' + error) );
The library exposes collections that support CRUD operations on developers, products, developerapps, appcredentials, and so on. Lots of examples available too. And here’s a screencast that gives an overview.
If I wanted to build a script to perform 1000 steps, then I would :
- start with the code above, but build in a loop
- build a little logic to read in the CSV file
- build in some error checking in case the script fails, and I need to re-run it.
- build in some logging, so I can monitor progress
If you don’t know JavaScript, that might sound complicated, but it’s pretty straightforward for an experienced scripter. You could do the same thing in Python, too.