ApigeeAliases.

ImportProxy(ICakeContext, string, string, FilePath, ImportProxySettings) Method

Summary

Import a proxy into Apigee from a zip file. The zip file should contain an apiproxy folder at the top level.
Assembly
Cake.Apigee.dll
Namespace
Cake.Apigee
Containing Type
ApigeeAliases

Syntax

public static ImportProxyResult ImportProxy(this ICakeContext ctx, string orgName, string proxyName, FilePath proxyZipfile, ImportProxySettings settings = null)

Examples

Cake task:

 var orgName = "myorg";
 var apigeeCredentials = new Credentials
 {
    Username = "[email protected]",
    Password = "mypassword"
 };

 var result = ImportProxy(
                orgName,
                "myapi",
                File("apiproxy.zip"),
                new ImportProxySettings { Credentials = apigeeCredentials });

Remarks

This calls the following API: https://docs.apigee.com/management/apis/post/organizations/%7Borg_name%7D/apis-0

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
ctx ICakeContext The Cake context.
orgName string Your org name as shown in Apigee.
proxyName string Name of the proxy.
proxyZipfile FilePath Path to the zip.
settings ImportProxySettings The settings such as authentication credentials.

Return Value

Type Description
ImportProxyResult The result of the import such as the revision created.