Apigee::Edge - Apigee.com 'Edge' management API.
use Apigee::Edge; my $apigee = Apigee::Edge->new( org => 'apigee_org', usr => 'your_email', pwd => 'your_password' );
Apigee::Edge is an object-oriented interface to facilitate management of Developers and Apps using the Apigee.com 'Edge' management API. see http://apigee.com/docs/api-services/content/api-reference-getting-started
The API is incompleted. welcome to fork the repos on github https://github.com/binary-com/perl-Apigee-Edge and send us pull-requests.
org
required. organization name.
usr
required. login email
pwd
required. login password
endpoint
optional. default to https://api.enterprise.apigee.com/v1
http://apigee.com/docs/api/apps-0
my $app = $apigee->get_app($app_id);
my $app_ids = $apigee->get_apps(); my $apps = $apigee->get_apps(expand => 'true', includeCred => 'true');
my $app_ids = $apigee->get_apps_by_family($family);
my $app_ids = $apigee->get_apps_by_keystatus($keystatus);
my $app_ids = $apigee->get_apps_by_type($type);
http://apigee.com/docs/api/developers-0
my $developers = $apigee->get_developers();
my $developers = $apigee->get_app_developers($app_name);
my $developer = $apigee->get_developer('fayland@binary.com') or die $apigee->errstr;
my $developer = $apigee->create_developer( "email" => 'fayland@binary.com', "firstName" => "Fayland", "lastName" => "Lam", "userName" => "fayland.binary", "attributes" => [ { "name" => "Attr1", "value" => "V1" }, { "name" => "A2", "value" => "V2.v2" } ] );
my $developer = $apigee->update_developer( $developer_email, { "firstName" => "Fayland", "lastName" => "Lam", } );
my $developer = $apigee->delete_developer('fayland@binary.com') or die $apigee->errstr;
my $status = $apigee->set_developer_status($email, $status);
http://apigee.com/docs/api/apps-developer
my $app = $apigee->change_app_status($developer_email, $app_name);
my $app = $apigee->create_developer_app( $developer_email, { "name" => "Test App", "apiProducts" => [ "{apiproduct1}", "{apiproduct2}", ...], "keyExpiresIn" => "{milliseconds}", "attributes" => [ { "name" => "DisplayName", "value" => "{display_name_value}" }, { "name" => "Notes", "value" => "{notes_for_developer_app}" }, { "name" => "{custom_attribute_name}", "value" => "{custom_attribute_value}" } ], "callbackUrl" => "{url}", } );
my $app = $apigee->delete_developer_app($developer_email, $app_name);
my $app = $apigee->get_developer_app($developer_email, $app_name);
my $apps = $apigee->get_developer_apps($developer_email); my $apps = $apigee->get_developer_apps($developer_email, { expand => 'true' });
my $app = $apigee->update_developer_app($developer_email, $app_name, { # update part });
my $app = $apigee->regenerate_developer_app_key($developer_email, $app_name, { # update part });
my $count = $apigee->get_count_of_developer_app_resource($developer_email, $app_name, $entity_name);
http://apigee.com/docs/api/api-products-1
my $products = $apigee->get_api_products(); my $products = $apigee->get_api_products(expand => 'true');
my $products = $apigee->search_api_products('attributename' => 'access', 'attributevalue' => 'public'); my $products = $apigee->search_api_products('attributename' => 'access', 'attributevalue' => 'private', expand => 'true');
my $product = $apigee->get_api_product($product_name);
my $apps = $apigee->get_api_product_details( $product_name, query => 'list', entity => 'apps' # or query => 'count', entity => 'keys, apps, developers, or companies' );
my $product = $apigee->delete_api_product($product_name);
my $product = $apigee->create_api_product( "approvalType" => "manual", "attributes" => [ { "name" => "access", "value" => "private" }, { "name" => "ATTR2", "value" => "V2" } ], "description" => "DESC", "displayName" => "TEST PRODUCT NAME", "name" => "test-product-name", "apiResources" => [ "/resource1", "/resource2"], "environments" => [ "test", "prod"], # "proxies" => ["{proxy1}", "{proxy2}", ...], # "quota" => "{quota}", # "quotaInterval" => "{quota_interval}", # "quotaTimeUnit" => "{quota_unit}", "scopes" => ["user", "repos"] );
my $product = $apigee->update_api_product( "test-product-name", { "approvalType" => "auto", "displayName" => "ANOTHER TEST PRODUCT NAME", } );
The underlaying method to call Apigee when you see something is missing.
$self->request('GET', "/o/$org_name/apps/$app_id"); $self->request('DELETE', "/o/$org_name/developers/" . uri_escape($email)); $self->request('POST', "/o/$org_name/developers", %args); $self->request('PUT', "/o/$org_name/developers/" . uri_escape($email), %args);
https://github.com/binary-com/perl-Apigee-Edge
Binary.com <fayland@binary.com>
Copyright 2014- Binary.com
To install Apigee::Edge, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apigee::Edge
CPAN shell
perl -MCPAN -e shell install Apigee::Edge
For more information on module installation, please visit the detailed CPAN module installation guide.