Socket
Socket
Sign inDemoInstall

apigeetool

Package Overview
Dependencies
139
Maintainers
7
Versions
43
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.12.0 to 0.14.0

lib/commands/assignUserRole.js

2

lib/cli.js

@@ -67,2 +67,3 @@ #!/usr/bin/env node

}
if (!opts.json && commandModule.format) {

@@ -73,4 +74,5 @@ console.log(commandModule.format(result));

}
process.exit(0);
});
}

2

lib/commands/command-utils.js

@@ -14,3 +14,3 @@ var defaults = require('../defaults')

done(err)
}else if (res.statusCode == 200 || res.statusCode == 201) {
}else if (res.statusCode == 200 || res.statusCode == 201 || res.statusCode == 204) {
if (opts.verbose) {

@@ -17,0 +17,0 @@ console.log(command + ' successful');

@@ -10,2 +10,20 @@ /* jshint node: true */

var Commands = {
attachFlowHook: {
description: 'Attach a Shared Flow to a Flow Hook',
load: function() {
return require('./attachFlowHook');
}
},
detachFlowHook: {
description: 'Detach a Shared Flow from a Flow Hook',
load: function() {
return require('./detachFlowHook');
}
},
getFlowHook: {
description: 'Get the Shared Flow attached to a Flow Hook',
load: function() {
return require('./getFlowHook');
}
},
createTargetServer: {

@@ -23,2 +41,14 @@ description: 'Create a Target Server',

},
getTargetServer: {
description: 'Get a Target Server',
load: function() {
return require('./get-TargetServer');
}
},
listTargetServers: {
description: 'List Target Servers',
load: function() {
return require('./list-TargetServers');
}
},
createkvmmap: {

@@ -191,2 +221,62 @@ description: 'Create a KVM map',

}
},
listRoles: {
description: "List roles in an organziation",
load: function () {
return require('./listRoles');
}
},
createRole: {
description: "Create a userrole in an organziation",
load: function () {
return require('./createRole');
}
},
getRole: {
description: "Get a userrole in an organziation",
load: function () {
return require('./getRole');
}
},
deleteRole: {
description: "Delete a userrole in an organziation",
load: function () {
return require('./deleteRole');
}
},
getRolePermissions: {
description: "Get resource permissions for a role",
load: function () {
return require('./getRolePermissions');
}
},
setRolePermissions: {
description: "Set resource permissions for a role",
load: function () {
return require('./setRolePermissions');
}
},
assignUserRole: {
description: "Assign user to a role",
load: function () {
return require('./assignUserRole');
}
},
removeUserRole: {
description: "Remove user from a role",
load: function () {
return require('./removeUserRole');
}
},
verifyUserRole: {
description: "Verify a user is in a role",
load: function () {
return require('./verifyUserRole');
}
},
listRoleUsers: {
description: "List users in role",
load: function () {
return require('./listRoleUsers');
}
}

@@ -193,0 +283,0 @@ };

@@ -15,11 +15,14 @@ /* jshint node: true */

shortOption: 'e',
required: true
required: true,
prompt: true
},
targetServerName: {
name: 'Target Server Name',
required: true
required: true,
prompt: true
},
targetHost: {
name: 'Target Host',
required: true
required: true,
prompt: true
},

@@ -31,3 +34,4 @@ targetEnabled: {

name: 'Target Port',
required: true
required: true,
prompt: true
},

@@ -34,0 +38,0 @@ targetSSL:{

@@ -15,7 +15,9 @@ /* jshint node: true */

shortOption: 'e',
required: true
required: true,
prompt: true
},
targetServerName: {
name: 'Target Server Name',
required: true
required: true,
prompt: true
}

@@ -34,5 +36,5 @@ });

method:'DELETE',
json:false
json:true
}
command_utils.run('deleteTargetServer', opts,requestOptions,cb)
};

@@ -72,3 +72,3 @@ /* jshint node: true */

else {
console.log( 'Save file: ' + f );
if (opts.verbose) { console.log('Save file: ' + f); }
}

@@ -75,0 +75,0 @@ cb(err);

@@ -72,7 +72,8 @@ /* jshint node: true */

console.log("Error text: " + err);
cb(err);
}
else {
console.log('Save file: ' + f);
if (opts.verbose) { console.log('Save file: ' + f); }
cb(undefined, res.statusCode + " - wrote: " + f);
}
cb(err);
});

@@ -79,0 +80,0 @@ }

@@ -20,6 +20,2 @@ /* jshint node: true */

},
revision: {
name: 'Revision',
shortOption: 'r'
},
long: {

@@ -26,0 +22,0 @@ name: 'Long',

/* jshint node: true */
'use strict';
// todo: this currently only works if the deployed revision is the latest revision

@@ -112,4 +111,4 @@ var util = require('util');

// Find out which revision we should be undeploying
request.get(util.format('%s/v1/o/%s/apis/%s',
opts.baseuri, opts.organization, opts.api),
request.get(util.format('%s/v1/o/%s/environments/%s/apis/%s/deployments',
opts.baseuri, opts.organization, opts.environment, opts.api),
function(err, req, body) {

@@ -123,5 +122,6 @@ if (err) {

done();
} else if (req.statusCode === 400) {
done(new Error(console.log(body.message)));
} else if (req.statusCode === 200) {
opts.deploymentVersion =
parseInt(_.max(body.revision, function(r) { return parseInt(r); }));
opts.deploymentVersion = parseInt(body.revision[0].name);
if (opts.verbose) {

@@ -128,0 +128,0 @@ console.log('Going to undeploy revision %d of API %s',

/* jshint node: true */
'use strict';
// todo: this currently only works if the deployed revision is the latest revision
var util = require('util');

@@ -112,4 +110,4 @@ var path = require('path');

// Find out which revision we should be undeploying
// This is stupid...we should get the latest deployed version not the latest version
request.get(util.format('%s/v1/o/%s/sharedflows/%s',
request.get(util.format('%s/v1/o/%s/sharedflows/%s/deployments',
opts.baseuri, opts.organization, opts.name),

@@ -125,6 +123,17 @@ function (err, req, body) {

} else if (req.statusCode === 200) {
opts.deploymentVersion =
parseInt(_.max(body.revision, function (r) {
return parseInt(r);
}));
// Iterate over the result to get the information on deployment on the specified environment.
var envFound = false;
var curEnv;
var i = 0;
while ( (i < body.environment.length) && (!envFound) ) {
curEnv = body.environment[i];
if (curEnv.name == opts.environment) {
envFound = true;
opts.deploymentVersion = parseInt(curEnv.revision[0].name);
}
i++;
}
if (!envFound) {
done(new Error(util.format('SharedFlow not deployed to environment %s', opts.environment)));
}
if (opts.verbose) {

@@ -131,0 +140,0 @@ console.log('Going to undeploy revision %d of SharedFlow %s',

@@ -17,2 +17,3 @@ /* jshint node: true */

shortOption: 'h',
scope: 'default',
toggle: true

@@ -23,2 +24,3 @@ },

shortOption: 'u',
scope: 'default',
required: true,

@@ -30,2 +32,3 @@ prompt: true

shortOption: 'p',
scope: 'default',
required: true,

@@ -38,2 +41,3 @@ prompt: true,

shortOption: 'H',
scope: 'default',
required: false,

@@ -46,3 +50,4 @@ prompt: false,

shortOption: 't',
required: true,
scope: 'default',
required: false,
prompt: false

@@ -53,2 +58,3 @@ },

shortOption: 'N',
scope: 'default',
required: false,

@@ -60,2 +66,3 @@ toggle: true

shortOption: 'o',
scope: 'default',
required: true

@@ -65,3 +72,4 @@ },

name: 'Base URI',
shortOption: 'L'
shortOption: 'L',
scope: 'default'
},

@@ -71,3 +79,4 @@ debug: {

shortOption: 'D',
toggle: true
scope: 'default',
toggle: true,
},

@@ -77,2 +86,3 @@ verbose: {

shortOption: 'V',
scope: 'default',
toggle: true

@@ -87,7 +97,19 @@ },

name: 'CA file',
shortOption: 'c'
shortOption: 'c',
scope: 'default'
},
keyfile: {
name: 'Key file',
shortOption: 'K',
scope: 'default'
},
certfile: {
name: 'Cert file',
shortOption: 'C',
scope: 'default'
},
insecure: {
name: 'insecure',
shortOption: 'k',
scope: 'default',
toggle: true

@@ -98,2 +120,3 @@ },

shortOption: 'a',
scope: 'default',
type: 'int'

@@ -204,2 +227,10 @@ }

if (opts.keyfile) {
ro.key = fs.readFileSync(opts.keyfile);
}
if (opts.certfile) {
ro.cert = fs.readFileSync(opts.certfile);
}
if (opts.insecure) {

@@ -206,0 +237,0 @@ ro.agentOptions.rejectUnauthorized = false;

@@ -106,2 +106,7 @@ /* jshint node: true */

ApigeeTool.getTargetServer = function (opts, cb) {
var cmd = require('./commands/get-TargetServer.js');
runCommand(cmd, opts, cb);
};
ApigeeTool.deleteTargetServer = function(opts,cb){

@@ -112,2 +117,7 @@ var cmd = require('./commands/delete-TargetServer');

ApigeeTool.listTargetServers = function(opts, cb) {
var cmd = require('./commands/list-TargetServers');
runCommand(cmd, opts, cb);
};
ApigeeTool.createKVM = function(opts, cb) {

@@ -118,4 +128,4 @@ var cmd = require('./commands/create-KVM');

ApigeeTool.getkvmmap = function(opts, cb) {
var cmd = require('./commands/getkvmmap');
ApigeeTool.getKVMmap = function(opts, cb) {
var cmd = require('./commands/getKVMmap');
runCommand(cmd, opts, cb);

@@ -169,2 +179,58 @@ };

ApigeeTool.attachFlowHook = function (opts, cb) {
var cmd = require('./commands/attachFlowHook.js');
runCommand(cmd, opts, cb);
};
ApigeeTool.detachFlowHook = function (opts, cb) {
var cmd = require('./commands/detachFlowHook.js');
runCommand(cmd, opts, cb);
};
ApigeeTool.getFlowHook = function (opts, cb) {
var cmd = require('./commands/getFlowHook.js');
runCommand(cmd, opts, cb);
};
ApigeeTool.listRoles = function (opts, cb) {
var cmd = require('./commands/listRoles.js');
runCommand(cmd, opts, cb);
};
ApigeeTool.getRole = function (opts, cb) {
var cmd = require('./commands/getRole.js');
runCommand(cmd, opts, cb);
};
ApigeeTool.createRole = function (opts, cb) {
var cmd = require('./commands/createRole.js');
runCommand(cmd, opts, cb);
};
ApigeeTool.deleteRole = function (opts, cb) {
var cmd = require('./commands/deleteRole.js');
runCommand(cmd, opts, cb);
};
ApigeeTool.getRolePermissions = function (opts, cb) {
var cmd = require('./commands/getRolePermissions.js');
runCommand(cmd, opts, cb);
};
ApigeeTool.setRolePermissions = function (opts, cb) {
var cmd = require('./commands/setRolePermissions.js');
runCommand(cmd, opts, cb);
};
ApigeeTool.assignUserRole = function (opts, cb) {
var cmd = require('./commands/assignUserRole.js');
runCommand(cmd, opts, cb);
};
ApigeeTool.removeUserRole = function (opts, cb) {
var cmd = require('./commands/removeUserRole.js');
runCommand(cmd, opts, cb);
};
ApigeeTool.verifyUserRole = function (opts, cb) {
var cmd = require('./commands/verifyUserRole.js');
runCommand(cmd, opts, cb);
};
ApigeeTool.listRoleUsers = function (opts, cb) {
var cmd = require('./commands/listRoleUsers.js');
runCommand(cmd, opts, cb);
};
function runCommand(cmd, opts, cb) {

@@ -171,0 +237,0 @@ options.validate(opts, cmd.descriptor, function(err) {

@@ -50,4 +50,5 @@ /* jshint node: true */

}
} else {
badArg(argv[i]);
}
}

@@ -128,2 +129,4 @@ else {

var desc = descriptor[propName];
// console.log( "DEBUG " + desc.required + " " + opts[propName] + " " + opts.prompt + " " + desc.prompt + " " + propName);
// console.log( "DEBUG OPTs" + JSON.stringify(opts) );
if (desc === null || desc === undefined) {

@@ -133,19 +136,23 @@ done(new Error(util.format('Invalid property %s', propName)));

}
if (desc.required && !opts[propName] && (!opts.prompt && desc.prompt)) {
if (opts.interactive) {
var pn = (desc.name ? desc.name : propName);
prompt(pn, desc.secure, function(err, val) {
if (err) {
done(err);
} else {
if (desc.secure === true) {
opts[propName] = new SecureValue(val);
if (desc.required && !opts[propName]) {
if (desc.prompt && !opts.prompt ) {
if (opts.interactive) {
var pn = (desc.name ? desc.name : propName);
prompt(pn, desc.secure, function(err, val) {
if (err) {
done(err);
} else {
opts[propName] = val;
if (desc.secure === true) {
opts[propName] = new SecureValue(val);
} else {
opts[propName] = val;
}
done();
}
done();
}
});
});
} else {
done(new Error(util.format('Missing required option "%s"', propName)));
}
} else {
done(new Error(util.format('Missing required option "%s"', propName)));
done(new Error(util.format('Missing required option with no prompt "%s"', propName)));
}

@@ -213,5 +220,9 @@ } else {

_.each(_.sortBy(_.pairs(descriptor)), function(d) {
tab.push([d[0],
tab.push([
d[0],
(d[1].shortOption ? '-' + d[1].shortOption : ''),
((d[1].required && !d[1].prompt) ? '(required)': '(optional)')]);
((d[1].required && !d[1].prompt) ? '(required)': '(optional)'),
((d[1].name ? d[1].name : 'undefined')),
((d[1].scope == 'default') ? '' : '(command specific)')
]);
});

@@ -218,0 +229,0 @@

@@ -178,3 +178,16 @@ /* jshint node: true */

ApigeeTool.getTargetServer = function(opts) {
var cb = q.defer()
var cmd = require('./commands/get-TargetServer');
runCommand(cmd, opts, cb);
return cb.promise
};
ApigeeTool.listTargetServers = function(opts) {
var cb = q.defer()
var cmd = require('./commands/list-TargetServers');
runCommand(cmd, opts, cb);
return cb.promise
};
ApigeeTool.createKVM = function(opts) {

@@ -201,5 +214,5 @@ var cb = q.defer()

ApigeeTool.getkvmmap = function(opts) {
ApigeeTool.getKVMmap = function(opts) {
var cb = q.defer()
var cmd = require('./commands/getkvmmap');
var cmd = require('./commands/getKVMmap');
runCommand(cmd, opts, cb);

@@ -237,2 +250,84 @@ return cb.promise

ApigeeTool.attachFlowHook = function(opts) {
var cb = q.defer()
var cmd = require('./commands/attachFlowHook');
runCommand(cmd, opts, cb);
return cb.promise
}
ApigeeTool.detachFlowHook = function(opts) {
var cb = q.defer()
var cmd = require('./commands/detachFlowHook');
runCommand(cmd, opts, cb);
return cb.promise
}
ApigeeTool.getFlowHook = function(opts) {
var cb = q.defer()
var cmd = require('./commands/getFlowHook');
runCommand(cmd, opts, cb);
return cb.promise
}
ApigeeTool.listRoles = function(opts) {
var cb = q.defer()
var cmd = require('./commands/listRoles');
runCommand(cmd, opts, cb);
return cb.promise
}
ApigeeTool.createRole = function(opts) {
var cb = q.defer()
var cmd = require('./commands/createRole');
runCommand(cmd, opts, cb);
return cb.promise
}
ApigeeTool.getRole = function(opts) {
var cb = q.defer()
var cmd = require('./commands/getRole');
runCommand(cmd, opts, cb);
return cb.promise
}
ApigeeTool.deleteRole = function(opts) {
var cb = q.defer()
var cmd = require('./commands/deleteRole');
runCommand(cmd, opts, cb);
return cb.promise
}
ApigeeTool.setRolePermissions = function(opts) {
var cb = q.defer()
var cmd = require('./commands/setRolePermissions');
runCommand(cmd, opts, cb);
return cb.promise
}
ApigeeTool.getRolePermissions = function(opts) {
var cb = q.defer()
var cmd = require('./commands/getRolePermissions');
runCommand(cmd, opts, cb);
return cb.promise
}
ApigeeTool.assignUserRole = function(opts) {
var cb = q.defer()
var cmd = require('./commands/assignUserRole');
runCommand(cmd, opts, cb);
return cb.promise
}
ApigeeTool.removeUserRole = function(opts) {
var cb = q.defer()
var cmd = require('./commands/removeUserRole');
runCommand(cmd, opts, cb);
return cb.promise
}
ApigeeTool.verifyUserRole = function(opts) {
var cb = q.defer()
var cmd = require('./commands/verifyUserRole');
runCommand(cmd, opts, cb);
return cb.promise
}
ApigeeTool.listRoleUsers = function(opts) {
var cb = q.defer()
var cmd = require('./commands/listRoleUsers');
runCommand(cmd, opts, cb);
return cb.promise
}
function runCommand(cmd, opts, cb) {

@@ -239,0 +334,0 @@ options.validate(opts, cmd.descriptor, function(err) {

{
"name": "apigeetool",
"version": "0.12.0",
"version": "0.14.0",
"description": "A CLI for Apigee Edge",

@@ -10,3 +10,3 @@ "main": "lib/main.js",

"scripts": {
"test": "mocha -R spec",
"test": "jasmine test/testoptions.js",
"remotetest": "mocha -R spec remotetests"

@@ -30,3 +30,3 @@ },

"netrc": "^0.1.3",
"node-unzip-2": "^0.2.1",
"node-unzip-2": "^0.2.7",
"node-zip": "^1.1.1",

@@ -43,2 +43,3 @@ "q": "^1.5.1",

"express": "^4.13.3",
"jasmine": "^3.5.0",
"mocha": "^5.2.0"

@@ -45,0 +46,0 @@ },

@@ -24,8 +24,8 @@ # apigeetool

* deploying an API proxy to Edge,
* undeploying an API proxy from Edge,
* deploying an API proxy or shared flow to Edge,
* undeploying an API proxy or shared flow from Edge,
* deploying Node.js apps to Edge,
* listing deployed API proxies on Edge,
* retrieving deployed proxies and apps from Edge,
* deleting proxy definitions from Edge, and
* listing deployed API proxies or shared flows on Edge,
* retrieving deployed proxies or shared flows from Edge,
* deleting proxy or shared flow definitions from Edge, and
* retreiving log messages from Node.js apps deployed to Edge.

@@ -38,2 +38,8 @@ * create or delete an API product in Edge

* create, retrieve or delete a KVM Entry in Edge
* attach, detach, or get a FlowHook
* create, get, delete, list Target Servers
* create, get, delete, List Roles
* get, set Role Permisions
* assign, remove, verify Users for a Role
* list all Users in a Role

@@ -60,2 +66,8 @@ You need to be familiar with basic concepts and features of Apigee Edge such as API proxies, organizations, and environments.

`--keyfile -K`
(optional) The name of the PEM file that represents the private key in a mutual auth connection.
`--certfile -C`
(optional) The name of the PEM file that represents the certificate in a mutual auth connection.
`--debug -D`

@@ -99,34 +111,48 @@ (optional) Prints additional information about the deployment, including router and message processor IDs.

* [addEntryToKVM](#addEntryToKVM)
* [assignUserRole](#assignUserRole)
* [attachFlowHook](#attachFlowHook)
* [createappkey](#createappkey)
* [createapp](#createapp)
* [createcache](#createcache)
* [createdeveloper](#createdeveloper)
* [createKVMmap](#createKVMmap)
* [createProduct](#createproduct)
* [createRole](#createRole)
* [createTargetServer](#createTargetServer)
* [deleteapp](#deleteapp)
* [deletecache](#deletecache)
* [deletedeveloper](#deletedeveloper)
* [deleteKVMentry](#deleteKVMentry)
* [deleteKVMmap](#deleteKVMmap)
* [deleteproduct](#deleteproduct)
* [deleteRole](#deleteRole)
* [deleteSharedflow](#deleteSharedflow)
* [deleteTargetServer](#deleteTargetServer)
* [delete](#delete)
* [deployhostedtarget](#deployhostedtarget)
* [deploynodeapp](#deploynodeapp)
* [deployhostedtarget](#deployhostedtarget)
* [deployproxy](#deployproxy)
* [undeploy](#undeploy)
* [listdeployments](#listdeployments)
* [deploySharedflow](#deploySharedflow)
* [detachFlowHook](#detachFlowHook)
* [fetchproxy](#fetchproxy)
* [fetchSharedflow](#fetchSharedflow)
* [getFlowHook](#getFlowHook)
* [getKVMentry](#getKVMentry)
* [getKVMmap](#getKVMmap)
* [getlogs](#getlogs)
* [delete](#delete)
* [deploySharedflow](#deploySharedflow)
* [getRole](#getRole)
* [getRolePermissions](#getRolePermissions)
* [getTargetServer](#getTargetServer)
* [listdeployments](#listdeployments)
* [listRoles](#listRoles)
* [listRoleUsers](#listRoleUsers)
* [listSharedflowDeployments](#listSharedflowDeployments)
* [listTargetServers](#listTargetServers)
* [removeUserRole](#removeUserRole)
* [setRolePermissions](#setRolePermissions)
* [undeploySharedflow](#undeploySharedflow)
* [listSharedflowDeployments](#listSharedflowDeployments)
* [fetchSharedflow](#fetchSharedflow)
* [deleteSharedflow](#deleteSharedflow)
* [createdeveloper](#createdeveloper)
* [deletedeveloper](#deletedeveloper)
* [createproduct](#createproduct)
* [deleteproduct](#deleteproduct)
* [createapp](#createapp)
* [deleteapp](#deleteapp)
* [createappkey](#createappkey)
* [createcache](#createcache)
* [deletecache](#deletecache)
* [createkvmmap](#createkvmmap)
* [addEntryToKVM](#addEntryToKVM)
* [getkvmmap](#getkvmmap)
* [getKVMentry](#getKVMentry)
* [deletekvmmap](#deletekvmmap)
* [deleteKVMentry](#deleteKVMentry)
* [createTargetServer](#createTargetServer)
* [deleteTargetServer](#deleteTargetServer)
* [undeploy](#undeploy)
* [verifyUserRole](#verifyUserRole)
## <a name="deploynodeapp"></a>deploynodeapp

@@ -575,3 +601,3 @@

Undeploys a named API proxy or Node.js app deployed on Apigee Edge.
Undeploys a SharedFlow deployed on Apigee Edge.

@@ -709,3 +735,3 @@ #### Example

### <a name="createkvmmap"></a>createkvmmap
### <a name="createKVMmap"></a>createKVMmap

@@ -717,3 +743,3 @@ Creates a map in the Apigee KVM with the given name.

apigeetool createkvmmap -u sdoe@example.com -o sdoe -e test --mapName test-map
apigeetool createKVMmap -u sdoe@example.com -o sdoe -e test --mapName test-map

@@ -781,3 +807,3 @@ #### Required parameters

### <a name="getkvmmap"></a>getkvmmap
### <a name="getKVMmap"></a>getKVMmap

@@ -790,3 +816,3 @@ Retrieves an entire KVM map with all of its entries, by name.

apigeetool getkvmmap -u sdoe@example.com -o sdoe -e test --mapName test-map
apigeetool getKVMmap -u sdoe@example.com -o sdoe -e test --mapName test-map

@@ -848,3 +874,3 @@ #### Required parameters

### <a name="deletekvmmap"></a>deletekvmmap
### <a name="deleteKVMmap"></a>deleteKVMmap

@@ -857,3 +883,3 @@ Deletes an entire map from the Apigee KVM along with all of its entries.

apigeetool deletekvmmap -u sdoe@example.com -o sdoe -e test --mapName test-map
apigeetool deleteKVMmap -u sdoe@example.com -o sdoe -e test --mapName test-map

@@ -889,3 +915,3 @@ #### Required parameters

apigeetool deletekvmmap -u sdoe@example.com -o sdoe -e test --mapName test-map --entryName test1
apigeetool deleteKVMmmap -u sdoe@example.com -o sdoe -e test --mapName test-map --entryName test1

@@ -993,2 +1019,343 @@ #### Required parameters

### <a name="getTargetServer"></a>getTargetServer
Get details for a Target Server with the given name.
#### Example
Get Target Server named "test-target".
apigeetool getTargetServer -N -o $ORG -e $ENV --targetServerName test-target
#### Required parameters
The following parameters are required. However, if any are left unspecified
on the command line, and if apigeetool is running in an interactive shell,
then apigeetool will prompt for them.
See [Common Parameters](#commonargs) for a list of additional parameters, including
the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
`--organization -o` (required) The organization to target.
`--environment -e` (required) The environment to target.
`--targetServerName` (required) The name of the Target Server to be deleted.
### <a name="listTargetServers"></a>listTargetServers
List Target Servers in a given environment.
#### Example
List Target Servers.
apigeetool listTargetServers -N -o $ORG -e $ENV
#### Required parameters
The following parameters are required. However, if any are left unspecified
on the command line, and if apigeetool is running in an interactive shell,
then apigeetool will prompt for them.
See [Common Parameters](#commonargs) for a list of additional parameters, including
the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
`--organization -o` (required) The organization to target.
`--environment -e` (required) The environment to target.
## <a name="FlowHook Operations"></a>FlowHook Operations
Operations on the pre-defined FlowHook names:
* PreProxyFlowHook
* PreTargetFlowHook
* PostTargetFlowHook
* PostProxyFlowHook
### <a name="attachFlowHook"></a>attachFlowHook
Attach a deployed SharedFlow to one of the [named FlowHooks](#FlowHook Operations).
#### Example
Attach SharedFlow "GetLogValues" to "PreProxyFlowHook".
apigeetool attachFlowHook -N -o $ORG -e $ENV --flowHookName PreProxyFlowHook --sharedFlowName GetLogValues
#### Required parameters
The following parameters are required. However, if any are left unspecified
on the command line, and if apigeetool is running in an interactive shell,
then apigeetool will prompt for them.
See [Common Parameters](#commonargs) for a list of additional parameters, including
the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
`--organization -o` (required) The organization to target.
`--environment -e` (required) The environment to target.
`--flowHookName` (required) The pre-defined name of the FlowHook.
`--sharedFlowName` (required) The name of a deployed SharedFlow.
### <a name="detachFlowHook"></a>detachFlowHook
Detach a SharedFlow from one of the [named FlowHooks](#FlowHook Operations).
#### Example
Detach "PreProxyFlowHook".
apigeetool detachFlowHook -N -o $ORG -e $ENV --flowHookName PreProxyFlowHook
#### Required parameters
The following parameters are required. However, if any are left unspecified
on the command line, and if apigeetool is running in an interactive shell,
then apigeetool will prompt for them.
See [Common Parameters](#commonargs) for a list of additional parameters, including
the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
`--organization -o` (required) The organization to target.
`--environment -e` (required) The environment to target.
`--flowHookName` (required) The pre-defined name of the FlowHook.
### <a name="getFlowHook"></a>getFlowHook
Get the SharedFlow currently attached to one of the [named FlowHooks](#FlowHook Operations).
#### Example
Detach "PreProxyFlowHook".
apigeetool getFlowHook -N -o $ORG -e $ENV --flowHookName PreProxyFlowHook
#### Required parameters
The following parameters are required. However, if any are left unspecified
on the command line, and if apigeetool is running in an interactive shell,
then apigeetool will prompt for them.
See [Common Parameters](#commonargs) for a list of additional parameters, including
the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
`--organization -o` (required) The organization to target.
`--environment -e` (required) The environment to target.
`--flowHookName` (required) The pre-defined name of the FlowHook.
## <a name="Roles and Permissions Operations"></a>Roles and Permissions Operations
Operations on Roles, Permissions and User assignment. The general flow is:
* Create a role
* Assign Permissions to the Role
* Assign the Role to a User
### <a name="createRole"></a>createRole
Create a role.
#### Example
Create role "AllowGetUserRoles".
apigeetool createRole -N -o $ORG --roleName AllowGetUserRoles
#### Required parameters
The following parameters are required. However, if any are left unspecified
on the command line, and if apigeetool is running in an interactive shell,
then apigeetool will prompt for them.
See [Common Parameters](#commonargs) for a list of additional parameters, including
the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
`--organization -o` (required) The organization to target.
`--roleName` (required) The name for the role.
### <a name="getRole"></a>getRole
Get a role.
#### Example
Get role "AllowGetUserRoles".
apigeetool getRole -N -o $ORG --roleName AllowGetUserRoles
#### Required parameters
The following parameters are required. However, if any are left unspecified
on the command line, and if apigeetool is running in an interactive shell,
then apigeetool will prompt for them.
See [Common Parameters](#commonargs) for a list of additional parameters, including
the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
`--organization -o` (required) The organization to target.
`--roleName` (required) The name for the role.
### <a name="deleteRole"></a>deleteRole
Delete a role.
#### Example
Delete role "AllowGetUserRoles".
apigeetool deleteRole -N -o $ORG --roleName AllowGetUserRoles
#### Required parameters
The following parameters are required. However, if any are left unspecified
on the command line, and if apigeetool is running in an interactive shell,
then apigeetool will prompt for them.
See [Common Parameters](#commonargs) for a list of additional parameters, including
the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
`--organization -o` (required) The organization to target.
`--roleName` (required) The name for the role.
### <a name="listRoles"></a>listRoles
List roles.
#### Example
List roles.
apigeetool listRoles -N -o $ORG
#### Required parameters
The following parameters are required. However, if any are left unspecified
on the command line, and if apigeetool is running in an interactive shell,
then apigeetool will prompt for them.
See [Common Parameters](#commonargs) for a list of additional parameters, including
the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
`--organization -o` (required) The organization to target.
### <a name="setRolePermissions"></a>setRolePermissions
Set Role Permissions for a Role.
#### Example
Set Permissions on Role "AllowGetUserRoles" to allow access to list Roles.
apigeetool setRolePermissions -N -o $ORG --roleName AllowGetUserRoles --permissions '[{"path":"/userroles","permissions":["get"]}]'
#### Required parameters
The following parameters are required. However, if any are left unspecified
on the command line, and if apigeetool is running in an interactive shell,
then apigeetool will prompt for them.
See [Common Parameters](#commonargs) for a list of additional parameters, including
the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
`--organization -o` (required) The organization to target.
`--roleName` (required) The name for the role.
`--permissions` Permissions array for path and verbs.
### <a name="getRolePermissions"></a>getRolePermissions
Get Role Permissions for a Role.
#### Example
Get Permissions on Role "AllowGetUserRoles".
apigeetool getRolePermissions -N -o $ORG --roleName AllowGetUserRoles
#### Required parameters
The following parameters are required. However, if any are left unspecified
on the command line, and if apigeetool is running in an interactive shell,
then apigeetool will prompt for them.
See [Common Parameters](#commonargs) for a list of additional parameters, including
the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
`--organization -o` (required) The organization to target.
`--roleName` (required) The name for the role.
### <a name="assignUserRole"></a>assignUserRole
Assign existing User to a Role. NOTE: User must already exist in Edge.
#### Example
Assign "somedeveloper@any.com" to Role "AllowGetUserRoles".
apigeetool assignUserRole -N -o $ORG --email "somedeveloper@any.com" --roleName AllowGetUserRoles
#### Required parameters
The following parameters are required. However, if any are left unspecified
on the command line, and if apigeetool is running in an interactive shell,
then apigeetool will prompt for them.
See [Common Parameters](#commonargs) for a list of additional parameters, including
the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
`--organization -o` (required) The organization to target.
`--email` (required) Email for an existing User in Edge.
`--roleName` (required) The name for the role.
### <a name="removeUserRole"></a>removeUserRole
Remove existing User from a Role.
#### Example
Remove "somedeveloper@any.com" from Role "AllowGetUserRoles".
apigeetool removeUserRole -N -o $ORG --email "somedeveloper@any.com" --roleName AllowGetUserRoles
#### Required parameters
The following parameters are required. However, if any are left unspecified
on the command line, and if apigeetool is running in an interactive shell,
then apigeetool will prompt for them.
See [Common Parameters](#commonargs) for a list of additional parameters, including
the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
`--organization -o` (required) The organization to target.
`--email` (required) Email for an existing User in Edge.
`--roleName` (required) The name for the role.
### <a name="verifyUserRole"></a>verifyUserRole
Verify User assigned to a Role.
#### Example
Verify "somedeveloper@any.com" assigned to Role "AllowGetUserRoles".
apigeetool verifyUserRole -N -o $ORG --email "somedeveloper@any.com" --roleName AllowGetUserRoles
#### Required parameters
The following parameters are required. However, if any are left unspecified
on the command line, and if apigeetool is running in an interactive shell,
then apigeetool will prompt for them.
See [Common Parameters](#commonargs) for a list of additional parameters, including
the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
`--organization -o` (required) The organization to target.
`--email` (required) Email for an existing User in Edge.
`--roleName` (required) The name for the role.
### <a name="listRoleUsers"></a>listRoleUsers
Get Users assigned to a Role.
#### Example
List Users assigned to Role "AllowGetUserRoles".
apigeetool listRoleUsers -N -o $ORG --roleName AllowGetUserRoles
#### Required parameters
The following parameters are required. However, if any are left unspecified
on the command line, and if apigeetool is running in an interactive shell,
then apigeetool will prompt for them.
See [Common Parameters](#commonargs) for a list of additional parameters, including
the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
`--organization -o` (required) The organization to target.
`--email` (required) Email for an existing User in Edge.
`--roleName` (required) The name for the role.
# <a name="sdkreference"></a>SDK Reference

@@ -1062,3 +1429,3 @@

## <a name="createproduct"></a>Create Product
## <a name="createProduct"></a>Create Product

@@ -1065,0 +1432,0 @@ Creates a new API Product in Edge

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc