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
Solved! Go to Solution.
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.
I am assuming that you have apigee EDGE on premise.
Go through the script
/<inst-root>/apigee4/bin/create-org.sh
Also, you can use the below API CALL
curl -u <GLOBAL ADMIN ID> -H "Content-Type:application/xml" -X POST http://localhost:8080/v1/organizations \ -d '<Organization name="<org-name>" type="paid"/>'
After creating the ORG, you need to associate the ORG with the POD
curl -u <GLOBAL ADMIN ID> -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
/<inst-root>/apigee4/bin/add-env.sh
You can use the below API CALL for creating the ENV
curl -u <GLOBAL ADMIN ID> -H "Content-Type:application/xml" -u -X POST http://localhost:8080/v1/organizations/$ORGNAME>/environments \ -d '<Environment name="<env-name>"/>'
Its better to use the script shared by APIGEE to create this.
Creating Virtual host
curl -H "Content-Type:application/xml" -u <admin user>:<admin passwd> \ -X POST \ http://<ms-ip>:8080/v1/organizations/<org-name>/environments/<env-name>/virtualhosts \ -d '<VirtualHost name="default"> \ <HostAliases> \ <HostAlias>abcde.company.com</HostAlias> \ </HostAliases> \ <Interfaces/> \ <Port>443</Port>
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.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |