Curl Commands

Can someone please provide me the curl commands to do following tasks :

  1. curl commands to create organisation ,environment ,virtual hosts

  2. curl commands to list organisation,encironment and virtual hosts

@Arpit Sharma

I am assuming that you have apigee EDGE on premise.

Go through the script

//apigee4/bin/create-org.sh

Also, you can use the below API CALL

curl -u -H “Content-Type:application/xml” -X POST http://localhost:8080/v1/organizations \ -d ‘’

After creating the ORG, you need to associate the ORG with the POD

curl -u -H “Content-Type:application/x-www-form-urlencoded” \ -u -X POST \ http://localhost:8080/v1/organizations/$ORGNAME/pods \ -d “region=default&pod=gateway”

Local host means = IP Address of Management Server

You can use the below script to create an Environment in the existing ORG

//apigee4/bin/add-env.sh

You can use the below API CALL for creating the ENV

curl -u -H “Content-Type:application/xml” -u -X POST http://localhost:8080/v1/organizations/$ORGNAME>/environments \ -d ‘’

Its better to use the script shared by APIGEE to create this.

Creating Virtual host

curl -H “Content-Type:application/xml” -u : \ -X POST \ http://:8080/v1/organizations//environments//virtualhosts \ -d ' \ \ abcde.company.com \ \ \ 443

You can remove -X post and -d value from all the above commands to get the details for ORG, ENV and virtual host

Hi @Arpit Sharma,

On a related-topic, you may also find this Postman collection particularly helpful for all of your Apigee Management Server API needs.

https://github.com/apigee/apigee-management-api-postman

1 Like