Windows user? Want to automate administration of Apigee Edge from Powershell?

We've produced a new option for automation of Apigee Edge, or even manual control of Apigee Edge.

Now you can do so through Powershell!

There's an open-source Powershell Module now, called PSApigeeEdge, available for download from github. It's on the Powershell Gallery as well. To take advantage of the latter, you need to only run this command from within powershell:

PS C:\dev\ps> Install-Module PSApigeeEdge

With this module, you can do things like:

  • create or delete developers, apiproducts, or developer apps
  • add or remove credentials to apps (and set expiry on credentials when you create them)
  • revoke or approve developers, or credentials
  • list, import and export API Proxies
  • list, create and remove caches

Some examples:

List developers verbosely:

PS C:\dev\ps> (Get-EdgeDeveloper -Params @{ expand = 'true' }).developer | Format-List
apps             : {my-hospitality-app-oauth, my-hospitality-app}
companies        : {}
email            : mpalmer@example.org
developerId      : 0wYm1ALhbLl3er5G
firstName        : Matt
lastName         : Palmer
userName         : mpalmer
organizationName : cap500
status           : active
attributes       : {}
createdAt        : 1470173119147
createdBy        : dchiesa+devportal@apigee.com
lastModifiedAt   : 1470174224727
lastModifiedBy   : dchiesa+devportal@apigee.com
apps             : {dpc1, dpc2, dpc3, DPC4...}
companies        : {}
email            : dchiesa@example.org
developerId      : IiwTHAerQeO1OAqG
firstName        : Dino
lastName         : Chiesa
userName         : DC
organizationName : cap500
status           : active
attributes       : {}
createdAt        : 1469831492534
createdBy        : dchiesa+devportal@apigee.com
lastModifiedAt   : 1469831492534
lastModifiedBy   : dchiesa+devportal@apigee.com

Import an API Proxy:

PS C:\dev\ps> Import-EdgeApi -Name dino-test-6 -Source oauth2-pwd-cc-r8-20160805-175438.zip

Create and populate a KVM:

PS C:\dev\ps> type .\data.json
{
  "threshold" : 1780,
  "allowErrors" : true,
  "header-name" : "X-Client-ID",
  "targetUrl" : "http://192.168.78.12:9090"
}
PS C:\dev\ps> Create-EdgeKvm -Name kvm1 -Env env1 -Source .\data.json

There's lots more you can do with the Powershell module. Here is a quick screencast tour:

I'd love to hear feedback from any and all.

Also, feature requests are welcomed. Pull requests are even better.

Comments
williamssean
Staff

@Andrew Krowczyk and @Surabhi.gupta Check out this Windows command line tool.

Version history
Last update:
‎08-08-2016 03:44 PM
Updated by: