UNPKG

55.7 kBMarkdownView Raw
1# apigeetool
2
3This is a tool for deploying API proxies and Node.js applications to the Apigee Edge platform. The tool also lets you list and undeploy API proxies.
4
5* [Installation](#installation)
6* [What you need to know about apigeetool](#whatyouneed)
7* [Command reference and examples](#reference)
8* [SDK reference and examples](#sdkreference)
9* [Original tool](#original)
10* [Contribution](#contrib)
11
12# <a name="installation"></a>Installation
13
14`apigeetool` is a Node.js module and you can install it using npm:
15
16`npm install -g apigeetool`
17
18*NOTE*: The `-g` option places the apigeetool command in your PATH. On "\*nix"-based machines, `sudo` may be required with the `-g` option. If you do not use `-g`, then you need to add the apigeetool command to your PATH manually. Typically, the `-g` option places modules in: `/usr/local/lib/node_modules/apigee-127` on *nix-based machines.
19
20# <a name="whatyouneed"></a>What you need to know about apigeetool
21
22You must have an account on Apigee Edge to perform any `apigeetool` functions. These functions include:
23
24* deploying an API proxy or shared flow to Edge,
25* undeploying an API proxy or shared flow from Edge,
26* deploying Node.js apps to Edge,
27* listing deployed API proxies or shared flows on Edge,
28* retrieving deployed proxies or shared flows from Edge,
29* deleting proxy or shared flow definitions from Edge, and
30* retreiving log messages from Node.js apps deployed to Edge.
31* create or delete an API product in Edge
32* create or delete a Developer in Edge
33* create or delete a Developer Application in Edge
34* create or delete a Cache resource in Edge
35* create, retrieve or delete a KVM Map in Edge
36* create, retrieve or delete a KVM Entry in Edge
37* attach, detach, or get a FlowHook
38* create, get, delete, list Target Servers
39* create, get, delete, List Roles
40* get, set Role Permisions
41* assign, remove, verify Users for a Role
42* list all Users in a Role
43
44You need to be familiar with basic concepts and features of Apigee Edge such as API proxies, organizations, and environments.
45
46For more information, refer to the [Apigee Edge docs](http://apigee.com/docs/).
47
48# <a name="commonargs"></a>Common Parameters
49
50The following parameters are available on all of the commands supported by
51this tool:
52
53`--baseuri -L`
54(optional) The base URI for you organization on Apigee Edge. The default is the base URI for Apigee cloud deployments is `api.enterprise.apigee.com`. For on-premise deployments, the base URL may be different.
55
56`--header -H`
57(optional) Adds a header to the API call. Format is header:value. This option may be used multiple times if more than one header is needed.
58
59`--cafile -c`
60(optional) The names of one of more PEM files that represent trusted certificate authorities.
61Multiple file names may be comma-separated. Use this to communicate with an installation
62of Apigee Edge that uses a custom certificate for API calls.
63
64`--keyfile -K`
65(optional) The name of the PEM file that represents the private key in a mutual auth connection.
66
67`--certfile -C`
68(optional) The name of the PEM file that represents the certificate in a mutual auth connection.
69
70`--debug -D`
71(optional) Prints additional information about the deployment, including router and message processor IDs.
72
73`--help -h`
74(optional) Displays help on this command.
75
76`--insecure -k`
77(optional) Do not validate the TLS certificate of the HTTPS target for API calls.
78Use this to communicate with an installation of Apigee Edge that does not use a
79trusted TLS certificate.
80
81`--asynclimit -a`
82(optional) Limit for the maximum number of operations performed concurrently.
83Currently this only affects file uploads in the `deploynodeapp` command. Defaults to 4.
84
85`--json -j`
86(optional) Formats the command's response as a JSON object.
87
88`--organization -o`
89(required) The name of the organization to deploy to. May be set as an environment variable APIGEE_ORGANIZATION.
90
91`--password -p`
92(required) Your Apigee account password. May be set as an environment variable APIGEE_PASSWORD.
93
94`--username -u`
95(required) Your Apigee account username. May be set as an environment variable APIGEE_USERNAME.
96
97`--token -t`
98(optional) Your Apigee access token. Use this in lieu of -u / -p
99
100`--netrc -N`
101(optional) Use this in lieu of -u / -p, to tell apigeetool to retrieve credentials from your .netrc file.
102
103`--verbose -V`
104(optional) Prints additional information as the deployment proceeds.
105
106# <a name="reference"></a>Command reference and examples
107
108* [addEntryToKVM](#addEntryToKVM)
109* [assignUserRole](#assignUserRole)
110* [attachFlowHook](#attachFlowHook)
111* [createappkey](#createappkey)
112* [createapp](#createapp)
113* [createcache](#createcache)
114* [createdeveloper](#createdeveloper)
115* [createKVMmap](#createKVMmap)
116* [createProduct](#createproduct)
117* [createRole](#createRole)
118* [createTargetServer](#createTargetServer)
119* [deleteapp](#deleteapp)
120* [deletecache](#deletecache)
121* [deletedeveloper](#deletedeveloper)
122* [deleteKVMentry](#deleteKVMentry)
123* [deleteKVMmap](#deleteKVMmap)
124* [deleteproduct](#deleteproduct)
125* [deleteRole](#deleteRole)
126* [deleteSharedflow](#deleteSharedflow)
127* [deleteTargetServer](#deleteTargetServer)
128* [delete](#delete)
129* [deployhostedtarget](#deployhostedtarget)
130* [deploynodeapp](#deploynodeapp)
131* [deployproxy](#deployproxy)
132* [deploySharedflow](#deploySharedflow)
133* [detachFlowHook](#detachFlowHook)
134* [fetchproxy](#fetchproxy)
135* [fetchSharedflow](#fetchSharedflow)
136* [getFlowHook](#getFlowHook)
137* [getKVMentry](#getKVMentry)
138* [getKVMmap](#getKVMmap)
139* [getlogs](#getlogs)
140* [getRole](#getRole)
141* [getRolePermissions](#getRolePermissions)
142* [getTargetServer](#getTargetServer)
143* [listdeployments](#listdeployments)
144* [listRoles](#listRoles)
145* [listRoleUsers](#listRoleUsers)
146* [listSharedflowDeployments](#listSharedflowDeployments)
147* [listTargetServers](#listTargetServers)
148* [removeUserRole](#removeUserRole)
149* [setRolePermissions](#setRolePermissions)
150* [undeploySharedflow](#undeploySharedflow)
151* [undeploy](#undeploy)
152* [verifyUserRole](#verifyUserRole)
153
154## <a name="deploynodeapp"></a>deploynodeapp
155
156Deploys a Node.js app to Apigee Edge as an API proxy. With your Node.js app deployed to Edge, you can take advantage of Edge features like security, quotas, caching, analytics, trace tool, and more.
157
158#### Examples
159
160Deploys a Node.js app to Apigee Edge.
161
162 apigeetool deploynodeapp -u sdoe@apigee.com -o sdoe -e test -n 'Test Node App 2' -d . -m app.js -b /node2
163
164Deploys a Node.js app to both the default (HTTP) and secure (HTTPS) virtual hosts.
165
166 apigeetool deploynodeapp -u sdoe@apigee.com -o sdoe -e test -n 'Test Node App 2' -d . -m app.js -b /node2 -v default,secure
167
168#### Required parameters
169
170The following parameters are required. However, if any are left unspecified
171on the command line, and if apigeetool is running in an interactive shell,
172then apigeetool will prompt for them.
173
174For example, if you do not specify a password using "-p", apigeetool will
175prompt for the password on the command line.
176
177See [Common Parameters](#commonargs) for a list of additional parameters, including
178the "-u" and "-p" parameters for username and password, and the "-o" parameter
179for organization name, all of which are required.
180
181`--environments -e`
182(required) The name(s) of the environment(s) to deploy to (comma-delimited).
183
184#### Optional parameters
185
186`--api -n`
187(optional) The name of the API proxy. The name of the API proxy must be unique within an organization. The characters you are allowed to use in the name are restricted to the following: `A-Z0-9._\-$ %`. If not specified, will attempt to use name from package.json.
188
189`--base-path -b`
190(optional) The base path of the API proxy. For example, for this API proxy, the base path is `/example-proxy`: `http://myorg-test.apigee.net/example-proxy/resource1`.
191
192`--directory -d`
193(optional) The path to the root directory of the API proxy on your local system. Will attempt to use current directory is none is specified.
194
195`--import-only -i`
196(optional) Imports the API proxy to Apigee Edge but does not deploy it.
197
198`--main -m`
199(optional) The Node.js file you want to be the main file. If not specified, will attempt to use main from package.json.
200
201`--preserve-policies -P`
202(optional) If specified, the highest revision of the existing proxy will be downloaded and the node code in your directory will be overlayed upon it to create a resulting proxy that contains both any existing policies and the node code in the directory. If there is no existing revision, this option will have no effect.
203
204`--resolve-modules -R`
205(optional) If the API proxy includes Node.js modules (e.g., in a `node_modules` directory), this option updates them on Apigee Edge without uploading them from your system. Basically, it's like running "npm install" on Apigee Edge in the root directory of the API proxy bundle.
206
207`--production`
208(optional) Indicates if Apigee Edge should use the `--production` flag during `npm install`. Defaults to `true`, example of disabling the flag would be `--production false`.
209
210`--upload-modules -U`
211(optional) If specified, uploads Node.js modules from your system to Apigee Edge rather than resolving the modules directly on Apigee Edge (the default behavior).
212
213`--virtualhosts -v`
214(optional) A comma-separated list of virtual hosts that the deployed app will use. The two most common options are `default` and `secure`. The `default` option is always HTTP and `secure` is always HTTPS. By default, `apigeetool deploynodeapp` uses `default,secure`.
215
216`--bundled-dependencies`
217(optional) If specified, the source code will be uploaded with its `bundledDependencies` as defined in the `package.json`.
218
219`--wait-after-import -W`
220(optional) Number of seconds to delay before deploying node.js proxy.
221
222## <a name="deployhostedtarget"></a>deployhostedtarget
223
224Deploys a Hosted Target to Apigee Edge as an API proxy. With your Hosted Target deployed to Edge, you can take advantage of Edge features like security, quotas, caching, analytics, trace tool, and more.
225
226#### Examples
227
228Deploys a Node.js app as a Hosted Target to Apigee Edge.
229
230 apigeetool deployhostedtarget -u sdoe@apigee.com -o sdoe -e test -n 'test-node-app-2' -b /node2
231
232Deploys a Node.js app as a Hosted Target to both the default (HTTP) and secure (HTTPS) virtual hosts.
233
234 apigeetool deployhostedtarget -u sdoe@apigee.com -o sdoe -e test -n 'test-node-app-2' -b /node2 -v default,secure
235
236#### Required parameters
237
238The following parameters are required. However, if any are left unspecified
239on the command line, and if apigeetool is running in an interactive shell,
240then apigeetool will prompt for them.
241
242For example, if you do not specify a password using "-p", apigeetool will
243prompt for the password on the command line.
244
245See [Common Parameters](#commonargs) for a list of additional parameters, including
246the "-u" and "-p" parameters for username and password, and the "-o" parameter
247for organization name, all of which are required.
248
249`--api -n`
250The name of the API proxy. The name of the API proxy must be unique within an organization. The characters you are allowed to use in the name are restricted to the following: `a-z0-9._\-$ %`.
251
252`--environments -e`
253(required) The name(s) of the environment(s) to deploy to (comma-delimited).
254
255#### Optional parameters
256
257`--base-path -b`
258(optional) The base path of the API proxy. For example, for this API proxy, the base path is `/example-proxy`: `http://myorg-test.apigee.net/example-proxy/resource1`.
259
260`--directory -d`
261(optional) The path to the root directory of the API proxy on your local system. Will attempt to use current directory is none is specified.
262
263`--import-only -i`
264(optional) Imports the API proxy to Apigee Edge but does not deploy it.
265
266`--preserve-policies -P`
267(optional) If specified, the highest revision of the existing proxy will be downloaded and the source code in your directory will be overlayed upon it to create a resulting proxy that contains both any existing policies and the source code in the directory. If there is no existing revision, this option will have no effect.
268
269`--virtualhosts -v`
270(optional) A comma-separated list of virtual hosts that the deployed app will use. The two most common options are `default` and `secure`. The `default` option is always HTTP and `secure` is always HTTPS. By default, `apigeetool deployhostedtarget` uses `default,secure`.
271
272`--bundled-dependencies`
273(optional) If specified, the source code will be uploaded with its `bundledDependencies` as defined in the `package.json`.
274
275## <a name="deployproxy"></a>deployproxy
276
277Deploys an API proxy to Apigee Edge. If the proxy is currently deployed, it will be undeployed first, and the newly deployed proxy's revision number is incremented.
278
279#### Example
280
281Deploys an API proxy called example-proxy to Apigee Edge. Per the `-d` flag, the command is executed in the root directory of the proxy bundle.
282
283 apigeetool deployproxy -u sdoe@example.com -o sdoe -e test -n example-proxy -d .
284
285#### Required parameters
286
287The following parameters are required. However, if any are left unspecified
288on the command line, and if apigeetool is running in an interactive shell,
289then apigeetool will prompt for them.
290
291See [Common Parameters](#commonargs) for a list of additional parameters, including
292the "-u" and "-p" parameters for username and password, and the "-o" parameter
293for organization name, all of which are required.
294
295`--api -n`
296(required) The name of the API proxy. Note: The name of the API proxy must be unique within an organization. The characters you are allowed to use in the name are restricted to the following: `A-Z0-9._\-$ %`.
297
298`--environments -e`
299(required) The name(s) of the environment(s) to deploy to (comma delimited).
300
301#### Optional parameters
302
303`--base-path -b`
304(optional) The base path of the API proxy. For example, for this API proxy, the base path is /example-proxy: http://myorg-test.apigee.net/example-proxy/resource1.
305
306`--directory -d`
307(optional) The path to the root directory of the API proxy on your local system. Will attempt to use current directory is none is specified.
308
309`--import-only -i`
310(optional) Imports the API proxy to Apigee Edge but does not deploy it.
311
312`--resolve-modules -R`
313(optional) If the API proxy includes Node.js modules (e.g., in a `node_modules` directory), this option updates them on Apigee Edge without uploading them from your system. Basically, it's like running npm on Apigee Edge in the root directory of the API proxy bundle.
314
315`--upload-modules -U`
316(optional) If specified, uploads Node.js modules from your system to Apigee Edge.
317
318`--bundled-dependencies`
319(optional) If specified, the `node` & `hosted` resources will be uploaded with their `bundledDependencies` as defined in their respective `package.json` files.
320
321`--wait-after-import -W`
322(optional) Number of seconds to delay before deploying node.js proxy.
323
324## <a name="deployExistingRevision"></a>deployExistingRevision
325
326Deploys an existing API proxy revision to Apigee Edge. If a different revision is already deployed to the targeted environments, it will be undeployed and replaced with the requested revision.
327
328#### Example
329
330Deploys an existing API proxy revision called example-proxy to Apigee Edge.
331
332 apigeetool deployExistingRevision -u sdoe@example.com -o sdoe -e test -n example-proxy -r 1
333
334#### Required parameters
335
336The following parameters are required. However, if any are left unspecified
337on the command line, and if apigeetool is running in an interactive shell,
338then apigeetool will prompt for them.
339
340See [Common Parameters](#commonargs) for a list of additional parameters, including
341the "-u" and "-p" parameters for username and password, and the "-o" parameter
342for organization name, all of which are required.
343
344`--api -n`
345(required) The name of the API proxy. Note: The name of the API proxy must be unique within an organization. The characters you are allowed to use in the name are restricted to the following: `A-Z0-9._\-$ %`.
346
347`--environments -e`
348(required) The name(s) of the environment(s) to deploy to (comma delimited).
349
350`--revision -r`
351(required) The existing revision of the proxy to be deployed.
352
353## <a name="undeploy"></a>undeploy
354
355Undeploys a named API proxy or Node.js app deployed on Apigee Edge.
356
357#### Example
358
359Undeploy the proxy named "example-proxy".
360
361 apigeetool undeploy -u sdoe@example.com -o sdoe -n example-proxy -e test -D
362
363#### Required parameters
364
365The following parameters are required. However, if any are left unspecified
366on the command line, and if apigeetool is running in an interactive shell,
367then apigeetool will prompt for them.
368
369See [Common Parameters](#commonargs) for a list of additional parameters, including
370the "-u" and "-p" parameters for username and password, and the "-o" parameter
371for organization name, all of which are required.
372
373`--api -n`
374(required) The name of the API proxy or app to undeploy.
375
376`--environment -e`
377(required) The environment on Apigee Edge where the API proxy or app is currently deployed.
378
379#### Optional parameters
380
381`--revision -r`
382(optional) Specify the revision number of the API proxy to undeploy.
383
384## <a name="listdeployments"></a>listdeployments
385
386Lists the API proxies deployed on Apigee Edge for the specified organization. Lets you filter the result by API proxy name or environment.
387
388#### Examples
389
390List all API proxies in an organization:
391
392 $ apigeetool listdeployments -u sdoe@example.com -o sdoe -e test`
393
394List API proxies named "example-proxy":
395
396 $ apigeetool listdeployments -u sdoe@example.com -o sdoe -n example-proxy
397
398#### Required parameters
399
400See [Common Parameters](#commonargs) for a list of additional parameters, including
401the "-u" and "-p" parameters for username and password, and the "-o" parameter
402for organization name, all of which are required.
403
404#### Required, mutually exclusive parameters
405
406`--api -n`
407(You must specify either `api` or `environment` in this command) The name of the API proxy to list.
408
409`--environment -e`
410(You must specify either `api` or `environment` in this command) The environment for which you want to list deployments. When `-e` is specified, the command lists all deployed proxies in the environment.
411
412#### Optional parameters
413
414`--long -l`
415(optional) Returns additional information about the API proxy or Node.js app,
416including the URL to use as the base path for each one.
417
418`--revision -r`
419(optional) Filters the list by the specified revision number.
420
421## <a name="fetchproxy"></a>fetchproxy
422
423Fetches a deployed API proxy or Node.js application from Apigee Edge. The
424result will be a ZIP file that contains the contents of the entire
425proxy.
426
427Regardless of whether "deployproxy" or "deploynodeapp" is used to deploy the
428proxy or app, the result of "fetchproxy" will always be a ZIP file that
429represents an API proxy. The resulting proxy may be "unzipped" and
430re-deployed using "deployproxy."
431
432#### Example
433
434Fetch the deployed proxy named "example-proxy".
435
436 apigeetool fetchproxy -u sdoe@example.com -o sdoe -n example-proxy -r 1
437
438#### Required parameters
439
440The following parameters are required. However, if any are left unspecified
441on the command line, and if apigeetool is running in an interactive shell,
442then apigeetool will prompt for them.
443
444See [Common Parameters](#commonargs) for a list of additional parameters, including
445the "-u" and "-p" parameters for username and password, and the "-o" parameter
446for organization name, all of which are required.
447
448`--api -n`
449(required) The name of the API proxy or app to undeploy.
450
451`--revision -r`
452(required) Specifies the revision to retrieve.
453
454#### Optional parameters
455
456`--file -f`
457(optional) The name of the file to write as the result. If not specified,
458then the file name will be the same as the name passed to the "name"
459parameter.
460
461## <a name="delete"></a>delete
462
463Delete all revisions of a proxy from Apigee Edge.
464
465It is an error to delete a proxy that still has deployed revisions. Revisions
466must be undeployed using "undeploy" before this command may be used.
467
468#### Example
469
470Delete the proxy named "example-proxy".
471
472 apigeetool delete -u sdoe@example.com -o sdoe -n example-proxy
473
474#### Required parameters
475
476The following parameters are required. However, if any are left unspecified
477on the command line, and if apigeetool is running in an interactive shell,
478then apigeetool will prompt for them.
479
480See [Common Parameters](#commonargs) for a list of additional parameters, including
481the "-u" and "-p" parameters for username and password, and the "-o" parameter
482for organization name, all of which are required.
483
484`--api -n`
485(required) The name of the API proxy or app to undeploy.
486
487## <a name="getlogs"></a>getlogs
488
489Retrieve the last set of log records from a Node.js application or Hosted Target deployed to Apigee Edge.
490
491The resulting log files will be written directly to standard output. Each is prefixed with:
492
493* A timestamp, in UTC by default
494* An indication of whether the log record came from standard output or standard error
495* A unique identifier of the server where the log was generated.
496
497Since Apigee Edge, by default, deploys each Node.js application on at least two
498different servers, most applications will see at least two sets of logs. These are
499sorted in time stamp order.
500
501The log records from this command come from a cache inside Apigee Edge that retains
502the last 500 lines of log output from each server. The cache is a circular buffer,
503so older messages will be discarded when it fills up.
504
505By default, the last set of log records will be pulled and written to standard output. However, if the
506"-f" option is used, then "apigeetool" will poll Edge for new log records and append them to standard
507output, in the manner of "tail -f". (By default, the tool polls every
508five seconds).
509
510For example, a set of log records might look like this:
511
512<pre>
513[2014-11-05T01:30:01.530Z nodejs/stderr svr.362] *** Starting script
514[2014-11-05T01:30:09.182Z nodejs/stderr svr.362] 2014-11-05T01:30:09.181Z - debug: 1/4. this is a debug log
515[2014-11-05T01:30:09.186Z nodejs/stdout svr.362] 2014-11-05T01:30:09.186Z - info: 2/4. this is an info log
516[2014-11-05T01:30:09.187Z nodejs/stdout svr.362] 2014-11-05T01:30:09.187Z - warn: 3/4. this is a warning log
517[2014-11-05T01:30:09.188Z nodejs/stderr svr.362] 2014-11-05T01:30:09.188Z - error: 4/4. this is an error log
518[2014-11-05T01:48:21.419Z nodejs/stderr svr.828] *** Starting script
519[2014-11-05T01:48:28.637Z nodejs/stderr svr.828] js-bson: Failed to load c++ bson extension, using pure JS version
520[2014-11-05T01:48:29.801Z nodejs/stderr svr.828] 2014-11-05T01:48:29.800Z - debug: 1/4. this is a debug log
521[2014-11-05T01:48:29.804Z nodejs/stdout svr.828] 2014-11-05T01:48:29.804Z - info: 2/4. this is an info log
522[2014-11-05T01:48:29.805Z nodejs/stdout svr.828] 2014-11-05T01:48:29.805Z - warn: 3/4. this is a warning log
523[2014-11-05T01:48:29.806Z nodejs/stderr svr.828] 2014-11-05T01:48:29.806Z - error: 4/4. this is an error log
524</pre>
525
526#### Required Parameters
527
528The following parameters are required. However, if any are left unspecified
529on the command line, and if apigeetool is running in an interactive shell,
530then apigeetool will prompt for them.
531
532See [Common Parameters](#commonargs) for a list of additional parameters, including
533the "-u" and "-p" parameters for username and password, and the "-o" parameter
534for organization name, all of which are required.
535
536`--api -n`
537(required) The name of the deployed app to get logs from.
538
539`--environment -e`
540(required) The environment on Apigee Edge where the app is currently deployed.
541
542#### Optional Parameters
543
544`--streaming -f`
545(optional) If specified, do not exit, but instead poll Apigee Edge for new log
546records and write them to standard output in the manner of "tail -f."
547
548`--timezone -z`
549(optional) If specified, use the time zone to format the timestamps on the
550log records. If not specified, then the default is UTC. The timestamp name
551should be a name such as "PST."
552
553`--hosted-build`
554(optional) If specified will attempt to get the build logs for a deployed
555Hosted Target.
556
557`--hosted-runtime`
558(optional) If specified will attempt to get the runtime logs for a deployed
559Hosted Target.
560
561## <a name="deploySharedflow"></a>deploySharedflow
562
563Deploys a sharedFlow to Apigee Edge. If the sharedFlow is currently deployed, it will be undeployed first, and the newly deployed sharedflow's revision number is incremented.
564
565#### Example
566
567Deploys a SharedFlow called example-sf to Apigee Edge. Per the `-d` flag, the command is executed in the root directory of the sharedflow bundle.
568
569 apigeetool deploySharedflow -u sdoe@example.com -o sdoe -e test -n example-sf -d .
570
571#### Required parameters
572
573The following parameters are required. However, if any are left unspecified
574on the command line, and if apigeetool is running in an interactive shell,
575then apigeetool will prompt for them.
576
577See [Common Parameters](#commonargs) for a list of additional parameters, including
578the "-u" and "-p" parameters for username and password, and the "-o" parameter
579for organization name, all of which are required.
580
581`--name -n`
582(required) The name of the SharedFlow. Note: The name of the SharedFlow must be unique within an organization. The characters you are allowed to use in the name are restricted to the following: `A-Z0-9._\-$ %`.
583
584`--environments -e`
585(required) The name(s) of the environment(s) to deploy to (comma delimited).
586
587#### Optional parameters
588
589`--directory -d`
590(optional) The path to the root directory of the sharedflow on your local system. Will attempt to use current directory is none is specified.
591
592`--import-only -i`
593(optional) Imports the sharedflow to Apigee Edge but does not deploy it.
594
595## <a name="undeploySharedflow"></a>undeploySharedflow
596
597Undeploys a SharedFlow deployed on Apigee Edge.
598
599#### Example
600
601Undeploy the proxy named "example-sf".
602
603 apigeetool undeploySharedflow -u sdoe@example.com -o sdoe -n example-sf -e test -D
604
605#### Required parameters
606
607The following parameters are required. However, if any are left unspecified
608on the command line, and if apigeetool is running in an interactive shell,
609then apigeetool will prompt for them.
610
611See [Common Parameters](#commonargs) for a list of additional parameters, including
612the "-u" and "-p" parameters for username and password, and the "-o" parameter
613for organization name, all of which are required.
614
615`--name -n`
616(required) The name of the sharedflow to undeploy.
617
618`--environment -e`
619(required) The environment on Apigee Edge where the sharedflow is currently deployed.
620
621#### Optional parameters
622
623`--revision -r`
624(optional) Specify the revision number of the sharedflow to undeploy.
625
626## <a name="listSharedflowDeployments"></a>listSharedflowDeployments
627
628Lists the sharedflows deployed on Apigee Edge for the specified organization. Lets you filter the result by API proxy name or environment.
629
630#### Examples
631
632List all Sharedflows in an organization:
633
634 $ apigeetool listSharedflowDeployments -u sdoe@example.com -o sdoe -e test` #Won't work due to missing API
635
636List Sharedflows named "example-sf":
637
638 $ apigeetool listSharedflowDeployments -u sdoe@example.com -o sdoe -n example-sf
639
640#### Required parameters
641
642See [Common Parameters](#commonargs) for a list of additional parameters, including
643the "-u" and "-p" parameters for username and password, and the "-o" parameter
644for organization name, all of which are required.
645
646#### Required, mutually exclusive parameters
647
648`--name -n`
649(You must specify either `name` or `environment` in this command) The name of the Sharedflow to list.
650
651`--environment -e`
652(You must specify either `name` or `environment` in this command) The environment for which you want to list deployments. When `-e` is specified, the command lists all deployed proxies in the environment.
653
654#### Optional parameters
655
656`--revision -r`
657(optional) Filters the list by the specified revision number.
658
659## <a name="fetchSharedflow"></a>fetchSharedFlow
660
661Fetches a sharedFlow from Apigee Edge. The
662result will be a ZIP file that contains the contents of the entire
663sharedflow.The resulting ZIP file may be "unzipped" and re-deployed using "deploySharedflow."
664
665#### Example
666
667Fetch the deployed proxy named "example-proxy".
668
669 apigeetool fetchSharedflow -u sdoe@example.com -o sdoe -n example-proxy -r 1
670
671#### Required parameters
672
673The following parameters are required. However, if any are left unspecified
674on the command line, and if apigeetool is running in an interactive shell,
675then apigeetool will prompt for them.
676
677See [Common Parameters](#commonargs) for a list of additional parameters, including
678the "-u" and "-p" parameters for username and password, and the "-o" parameter
679for organization name, all of which are required.
680
681`--name -n`
682(required) The name of the sharedflow or app to undeploy.
683
684`--revision -r`
685(required) Specifies the revision to retrieve.
686
687#### Optional parameters
688
689`--file -f`
690(optional) The name of the file to write as the result. If not specified,
691then the file name will be the same as the name passed to the "name"
692parameter.
693
694## <a name="deleteSharedflow"></a>deleteSharedflow
695
696Delete all revisions of a sharedflow from Apigee Edge.
697
698It is an error to delete a proxy that still has deployed revisions. Revisions
699must be undeployed using "undeploySharedflow" before this command may be used.
700
701#### Example
702
703Delete the proxy named "example-sf".
704
705 apigeetool deleteSharedflow -u sdoe@example.com -o sdoe -n example-sf
706
707#### Required parameters
708
709The following parameters are required. However, if any are left unspecified
710on the command line, and if apigeetool is running in an interactive shell,
711then apigeetool will prompt for them.
712
713See [Common Parameters](#commonargs) for a list of additional parameters, including
714the "-u" and "-p" parameters for username and password, and the "-o" parameter
715for organization name, all of which are required.
716
717`--name -n`
718(required) The name of the API proxy or app to undeploy.
719
720## <a name="KVM Operations"></a>KVM Operations
721
722The following commands support the varying scoped of the Apigee KVM.
723
724When just the `--organization` option is present, the operation will correspond to the Organization-scoped KVM.
725
726When the `--organization` and `--environment` options are present, the operation will correspond to the Environment-scoped KVM.
727
728When the `--organization` and `--api` options are present, the operation will correspond to the API-scoped KVM.
729
730### <a name="createKVMmap"></a>createKVMmap
731
732Creates a map in the Apigee KVM with the given name.
733
734#### Example
735Create KVM map named "test-map"
736
737 apigeetool createKVMmap -u sdoe@example.com -o sdoe -e test --mapName test-map
738
739#### Required parameters
740
741The following parameters are required. However, if any are left unspecified
742on the command line, and if apigeetool is running in an interactive shell,
743then apigeetool will prompt for them.
744
745See [Common Parameters](#commonargs) for a list of additional parameters, including
746the "-u" and "-p" parameters for username and password, and the "-o" parameter
747for organization name, all of which are required.
748
749`--mapName`
750(required) The name of the map to be created.
751
752#### Optional parameters
753
754`--environment -e`
755(optional) The environment to target for an Environment-scoped KVM operation.
756
757`--api -n`
758(optional) The API to target for an API-scoped KVM operation.
759
760`--encrypted`
761(optional) Create a encrypted KVM Map.
762
763### <a name="addEntryToKVM"></a>addEntryToKVM
764
765Adds an entry of name:value to the named map in the Apigee KVM.
766
767#### Example
768
769Add entry to KVM with name "test1" and value "value1"
770
771 apigeetool addEntryToKVM -u sdoe@example.com -o sdoe -e test --mapName test-map --entryName test1 --entryValue value1
772
773#### Required parameters
774
775The following parameters are required. However, if any are left unspecified
776on the command line, and if apigeetool is running in an interactive shell,
777then apigeetool will prompt for them.
778
779See [Common Parameters](#commonargs) for a list of additional parameters, including
780the "-u" and "-p" parameters for username and password, and the "-o" parameter
781for organization name, all of which are required.
782
783`--mapName`
784(required) The name of the map the entry will belong to.
785
786`--entryName`
787(required) The name of the entry to be created.
788
789`--entryValue`
790(required) The value of the entry to be created.
791
792#### Optional parameters
793
794`--environment -e`
795(optional) The environment to target for an Environment-scoped KVM operation.
796
797`--api -n`
798(optional) The API to target for an API-scoped KVM operation.
799
800### <a name="getKVMmap"></a>getKVMmap
801
802Retrieves an entire KVM map with all of its entries, by name.
803
804#### Example
805
806Get map named "test-map".
807
808 apigeetool getKVMmap -u sdoe@example.com -o sdoe -e test --mapName test-map
809
810#### Required parameters
811
812The following parameters are required. However, if any are left unspecified
813on the command line, and if apigeetool is running in an interactive shell,
814then apigeetool will prompt for them.
815
816See [Common Parameters](#commonargs) for a list of additional parameters, including
817the "-u" and "-p" parameters for username and password, and the "-o" parameter
818for organization name, all of which are required.
819
820`--mapName`
821(required) The name of the map to be retrieved.
822
823#### Optional parameters
824
825`--environment -e`
826(optional) The environment to target for an Environment-scoped KVM operation.
827
828`--api -n`
829(optional) The API to target for an API-scoped KVM operation.
830
831### <a name="getKVMentry"></a>getKVMentry
832
833Retrieve an unencrypted KVM entry from an Apigee KVM map, by name.
834
835#### Example
836
837Retrieve the KVM entry named "test1" in the map "test-map".
838
839 apigeetool getKVMentry -u sdoe@example.com -o sdoe -e test --mapName test-map --entryName test1
840
841#### Required parameters
842
843The following parameters are required. However, if any are left unspecified
844on the command line, and if apigeetool is running in an interactive shell,
845then apigeetool will prompt for them.
846
847See [Common Parameters](#commonargs) for a list of additional parameters, including
848the "-u" and "-p" parameters for username and password, and the "-o" parameter
849for organization name, all of which are required.
850
851`--mapName`
852(required) The name of the map that the entry belongs to.
853
854`--entryName`
855(required) The name of the entry to be retrieved.
856
857#### Optional parameters
858
859`--environment -e`
860(optional) The environment to target for an Environment-scoped KVM operation.
861
862`--api -n`
863(optional) The API to target for an API-scoped KVM operation.
864
865### <a name="deleteKVMmap"></a>deleteKVMmap
866
867Deletes an entire map from the Apigee KVM along with all of its entries.
868
869#### Example
870
871Delete map named "test-map".
872
873 apigeetool deleteKVMmap -u sdoe@example.com -o sdoe -e test --mapName test-map
874
875#### Required parameters
876
877The following parameters are required. However, if any are left unspecified
878on the command line, and if apigeetool is running in an interactive shell,
879then apigeetool will prompt for them.
880
881See [Common Parameters](#commonargs) for a list of additional parameters, including
882the "-u" and "-p" parameters for username and password, and the "-o" parameter
883for organization name, all of which are required.
884
885`--mapName`
886(required) The name of the map to be deleted.
887
888#### Optional parameters
889
890`--environment -e`
891(optional) The environment to target for an Environment-scoped KVM operation.
892
893`--api -n`
894(optional) The API to target for an API-scoped KVM operation.
895
896### <a name="deleteKVMentry"></a>deleteKVMentry
897
898Deletes a single entry by name from an Apigee KVM map.
899
900#### Example
901
902Delete entry named "test1" from the map named "test-map".
903
904 apigeetool deleteKVMmmap -u sdoe@example.com -o sdoe -e test --mapName test-map --entryName test1
905
906#### Required parameters
907
908The following parameters are required. However, if any are left unspecified
909on the command line, and if apigeetool is running in an interactive shell,
910then apigeetool will prompt for them.
911
912See [Common Parameters](#commonargs) for a list of additional parameters, including
913the "-u" and "-p" parameters for username and password, and the "-o" parameter
914for organization name, all of which are required.
915
916`--mapName`
917(required) The name of the map that the entry belongs to.
918
919`--entryName`
920(required) The name of the entry to be deleted.
921
922#### Optional parameters
923
924`--environment -e`
925(optional) The environment to target for an Environment-scoped KVM operation.
926
927`--api -n`
928(optional) The API to target for an API-scoped KVM operation.
929
930## <a name="Cache Operations"></a>Cache Operations
931
932### <a name="createcache"></a>createcache
933
934Creates a Cache with the given name.
935
936#### Example
937Create Cache map named "test-cache"
938
939 apigeetool createcache -u sdoe@example.com -o sdoe -e test -z test-cache
940
941#### Required parameters
942
943The following parameters are required. However, if any are left unspecified
944on the command line, and if apigeetool is running in an interactive shell,
945then apigeetool will prompt for them.
946
947See [Common Parameters](#commonargs) for a list of additional parameters, including
948the "-u" and "-p" parameters for username and password, and the "-o" parameter
949for organization name, all of which are required.
950
951`-z`
952(required) The name of the cache to be created.
953
954`--environment -e`
955(required) The environment to target.
956
957## <a name="Target Server Operations"></a>Target Server Operations
958
959### <a name="createTargetServer"></a>createTargetServer
960
961Creates a Target Server with the given name.
962
963#### Example
964Create Target Server named "test-target" with SSL enabled.
965
966 apigeetool createTargetServer -N -o $ORG -e $ENV --targetServerName test-target --targetHost httpbin.org --targetPort 443 --targetSSL true
967
968#### Required parameters
969
970The following parameters are required. However, if any are left unspecified
971on the command line, and if apigeetool is running in an interactive shell,
972then apigeetool will prompt for them.
973
974See [Common Parameters](#commonargs) for a list of additional parameters, including
975the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
976
977`--organization -o` (required) The organization to target.
978`--environment -e` (required) The environment to target.
979`--targetServerName` (required) The name of the Target Server to be created.
980`--targetHost` (required) The hostname of the target.
981`--targetPort` (required) The port number of the target.
982`--targetSSL` (optional) Whether or not SSL is configured, defaults to none.
983`--targetEnabled` (optional) Whether or not the Target Server itself is enabled, defaults to true.
984
985### <a name="deleteTargetServer"></a>deleteTargetServer
986
987Deletes a Target Server with the given name.
988
989#### Example
990Delete Target Server named "test-target".
991
992 apigeetool deleteTargetServer -N -o $ORG -e $ENV --targetServerName test-target
993
994#### Required parameters
995
996The following parameters are required. However, if any are left unspecified
997on the command line, and if apigeetool is running in an interactive shell,
998then apigeetool will prompt for them.
999
1000See [Common Parameters](#commonargs) for a list of additional parameters, including
1001the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
1002
1003`--organization -o` (required) The organization to target.
1004`--environment -e` (required) The environment to target.
1005`--targetServerName` (required) The name of the Target Server to be deleted.
1006
1007### <a name="getTargetServer"></a>getTargetServer
1008
1009Get details for a Target Server with the given name.
1010
1011#### Example
1012Get Target Server named "test-target".
1013
1014 apigeetool getTargetServer -N -o $ORG -e $ENV --targetServerName test-target
1015
1016#### Required parameters
1017
1018The following parameters are required. However, if any are left unspecified
1019on the command line, and if apigeetool is running in an interactive shell,
1020then apigeetool will prompt for them.
1021
1022See [Common Parameters](#commonargs) for a list of additional parameters, including
1023the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
1024
1025`--organization -o` (required) The organization to target.
1026`--environment -e` (required) The environment to target.
1027`--targetServerName` (required) The name of the Target Server to be deleted.
1028
1029### <a name="listTargetServers"></a>listTargetServers
1030
1031List Target Servers in a given environment.
1032
1033#### Example
1034List Target Servers.
1035
1036 apigeetool listTargetServers -N -o $ORG -e $ENV
1037
1038#### Required parameters
1039
1040The following parameters are required. However, if any are left unspecified
1041on the command line, and if apigeetool is running in an interactive shell,
1042then apigeetool will prompt for them.
1043
1044See [Common Parameters](#commonargs) for a list of additional parameters, including
1045the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
1046
1047`--organization -o` (required) The organization to target.
1048`--environment -e` (required) The environment to target.
1049
1050## <a name="FlowHook Operations"></a>FlowHook Operations
1051
1052Operations on the pre-defined FlowHook names:
1053
1054* PreProxyFlowHook
1055* PreTargetFlowHook
1056* PostTargetFlowHook
1057* PostProxyFlowHook
1058
1059### <a name="attachFlowHook"></a>attachFlowHook
1060
1061Attach a deployed SharedFlow to one of the [named FlowHooks](#FlowHook Operations).
1062
1063#### Example
1064Attach SharedFlow "GetLogValues" to "PreProxyFlowHook".
1065
1066 apigeetool attachFlowHook -N -o $ORG -e $ENV --flowHookName PreProxyFlowHook --sharedFlowName GetLogValues
1067
1068#### Required parameters
1069
1070The following parameters are required. However, if any are left unspecified
1071on the command line, and if apigeetool is running in an interactive shell,
1072then apigeetool will prompt for them.
1073
1074See [Common Parameters](#commonargs) for a list of additional parameters, including
1075the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
1076
1077`--organization -o` (required) The organization to target.
1078`--environment -e` (required) The environment to target.
1079`--flowHookName` (required) The pre-defined name of the FlowHook.
1080`--sharedFlowName` (required) The name of a deployed SharedFlow.
1081
1082### <a name="detachFlowHook"></a>detachFlowHook
1083
1084Detach a SharedFlow from one of the [named FlowHooks](#FlowHook Operations).
1085
1086#### Example
1087Detach "PreProxyFlowHook".
1088
1089 apigeetool detachFlowHook -N -o $ORG -e $ENV --flowHookName PreProxyFlowHook
1090
1091#### Required parameters
1092
1093The following parameters are required. However, if any are left unspecified
1094on the command line, and if apigeetool is running in an interactive shell,
1095then apigeetool will prompt for them.
1096
1097See [Common Parameters](#commonargs) for a list of additional parameters, including
1098the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
1099
1100`--organization -o` (required) The organization to target.
1101`--environment -e` (required) The environment to target.
1102`--flowHookName` (required) The pre-defined name of the FlowHook.
1103
1104### <a name="getFlowHook"></a>getFlowHook
1105
1106Get the SharedFlow currently attached to one of the [named FlowHooks](#FlowHook Operations).
1107
1108#### Example
1109Detach "PreProxyFlowHook".
1110
1111 apigeetool getFlowHook -N -o $ORG -e $ENV --flowHookName PreProxyFlowHook
1112
1113#### Required parameters
1114
1115The following parameters are required. However, if any are left unspecified
1116on the command line, and if apigeetool is running in an interactive shell,
1117then apigeetool will prompt for them.
1118
1119See [Common Parameters](#commonargs) for a list of additional parameters, including
1120the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
1121
1122`--organization -o` (required) The organization to target.
1123`--environment -e` (required) The environment to target.
1124`--flowHookName` (required) The pre-defined name of the FlowHook.
1125
1126## <a name="Roles and Permissions Operations"></a>Roles and Permissions Operations
1127
1128Operations on Roles, Permissions and User assignment. The general flow is:
1129
1130* Create a role
1131* Assign Permissions to the Role
1132* Assign the Role to a User
1133
1134### <a name="createRole"></a>createRole
1135
1136Create a role.
1137
1138#### Example
1139Create role "AllowGetUserRoles".
1140
1141 apigeetool createRole -N -o $ORG --roleName AllowGetUserRoles
1142
1143#### Required parameters
1144
1145The following parameters are required. However, if any are left unspecified
1146on the command line, and if apigeetool is running in an interactive shell,
1147then apigeetool will prompt for them.
1148
1149See [Common Parameters](#commonargs) for a list of additional parameters, including
1150the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
1151
1152`--organization -o` (required) The organization to target.
1153`--roleName` (required) The name for the role.
1154
1155### <a name="getRole"></a>getRole
1156
1157Get a role.
1158
1159#### Example
1160Get role "AllowGetUserRoles".
1161
1162 apigeetool getRole -N -o $ORG --roleName AllowGetUserRoles
1163
1164#### Required parameters
1165
1166The following parameters are required. However, if any are left unspecified
1167on the command line, and if apigeetool is running in an interactive shell,
1168then apigeetool will prompt for them.
1169
1170See [Common Parameters](#commonargs) for a list of additional parameters, including
1171the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
1172
1173`--organization -o` (required) The organization to target.
1174`--roleName` (required) The name for the role.
1175
1176### <a name="deleteRole"></a>deleteRole
1177
1178Delete a role.
1179
1180#### Example
1181Delete role "AllowGetUserRoles".
1182
1183 apigeetool deleteRole -N -o $ORG --roleName AllowGetUserRoles
1184
1185#### Required parameters
1186
1187The following parameters are required. However, if any are left unspecified
1188on the command line, and if apigeetool is running in an interactive shell,
1189then apigeetool will prompt for them.
1190
1191See [Common Parameters](#commonargs) for a list of additional parameters, including
1192the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
1193
1194`--organization -o` (required) The organization to target.
1195`--roleName` (required) The name for the role.
1196
1197### <a name="listRoles"></a>listRoles
1198
1199List roles.
1200
1201#### Example
1202List roles.
1203
1204 apigeetool listRoles -N -o $ORG
1205
1206#### Required parameters
1207
1208The following parameters are required. However, if any are left unspecified
1209on the command line, and if apigeetool is running in an interactive shell,
1210then apigeetool will prompt for them.
1211
1212See [Common Parameters](#commonargs) for a list of additional parameters, including
1213the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
1214
1215`--organization -o` (required) The organization to target.
1216
1217### <a name="setRolePermissions"></a>setRolePermissions
1218
1219Set Role Permissions for a Role.
1220
1221#### Example
1222Set Permissions on Role "AllowGetUserRoles" to allow access to list Roles.
1223
1224 apigeetool setRolePermissions -N -o $ORG --roleName AllowGetUserRoles --permissions '[{"path":"/userroles","permissions":["get"]}]'
1225
1226#### Required parameters
1227
1228The following parameters are required. However, if any are left unspecified
1229on the command line, and if apigeetool is running in an interactive shell,
1230then apigeetool will prompt for them.
1231
1232See [Common Parameters](#commonargs) for a list of additional parameters, including
1233the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
1234
1235`--organization -o` (required) The organization to target.
1236`--roleName` (required) The name for the role.
1237`--permissions` Permissions array for path and verbs.
1238
1239### <a name="getRolePermissions"></a>getRolePermissions
1240
1241Get Role Permissions for a Role.
1242
1243#### Example
1244Get Permissions on Role "AllowGetUserRoles".
1245
1246 apigeetool getRolePermissions -N -o $ORG --roleName AllowGetUserRoles
1247
1248#### Required parameters
1249
1250The following parameters are required. However, if any are left unspecified
1251on the command line, and if apigeetool is running in an interactive shell,
1252then apigeetool will prompt for them.
1253
1254See [Common Parameters](#commonargs) for a list of additional parameters, including
1255the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
1256
1257`--organization -o` (required) The organization to target.
1258`--roleName` (required) The name for the role.
1259
1260### <a name="assignUserRole"></a>assignUserRole
1261
1262Assign existing User to a Role. NOTE: User must already exist in Edge.
1263
1264#### Example
1265Assign "somedeveloper@any.com" to Role "AllowGetUserRoles".
1266
1267 apigeetool assignUserRole -N -o $ORG --email "somedeveloper@any.com" --roleName AllowGetUserRoles
1268
1269#### Required parameters
1270
1271The following parameters are required. However, if any are left unspecified
1272on the command line, and if apigeetool is running in an interactive shell,
1273then apigeetool will prompt for them.
1274
1275See [Common Parameters](#commonargs) for a list of additional parameters, including
1276the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
1277
1278`--organization -o` (required) The organization to target.
1279`--email` (required) Email for an existing User in Edge.
1280`--roleName` (required) The name for the role.
1281
1282### <a name="removeUserRole"></a>removeUserRole
1283
1284Remove existing User from a Role.
1285
1286#### Example
1287Remove "somedeveloper@any.com" from Role "AllowGetUserRoles".
1288
1289 apigeetool removeUserRole -N -o $ORG --email "somedeveloper@any.com" --roleName AllowGetUserRoles
1290
1291#### Required parameters
1292
1293The following parameters are required. However, if any are left unspecified
1294on the command line, and if apigeetool is running in an interactive shell,
1295then apigeetool will prompt for them.
1296
1297See [Common Parameters](#commonargs) for a list of additional parameters, including
1298the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
1299
1300`--organization -o` (required) The organization to target.
1301`--email` (required) Email for an existing User in Edge.
1302`--roleName` (required) The name for the role.
1303
1304### <a name="verifyUserRole"></a>verifyUserRole
1305
1306Verify User assigned to a Role.
1307
1308#### Example
1309Verify "somedeveloper@any.com" assigned to Role "AllowGetUserRoles".
1310
1311 apigeetool verifyUserRole -N -o $ORG --email "somedeveloper@any.com" --roleName AllowGetUserRoles
1312
1313#### Required parameters
1314
1315The following parameters are required. However, if any are left unspecified
1316on the command line, and if apigeetool is running in an interactive shell,
1317then apigeetool will prompt for them.
1318
1319See [Common Parameters](#commonargs) for a list of additional parameters, including
1320the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
1321
1322`--organization -o` (required) The organization to target.
1323`--email` (required) Email for an existing User in Edge.
1324`--roleName` (required) The name for the role.
1325
1326### <a name="listRoleUsers"></a>listRoleUsers
1327
1328Get Users assigned to a Role.
1329
1330#### Example
1331List Users assigned to Role "AllowGetUserRoles".
1332
1333 apigeetool listRoleUsers -N -o $ORG --roleName AllowGetUserRoles
1334
1335#### Required parameters
1336
1337The following parameters are required. However, if any are left unspecified
1338on the command line, and if apigeetool is running in an interactive shell,
1339then apigeetool will prompt for them.
1340
1341See [Common Parameters](#commonargs) for a list of additional parameters, including
1342the "-u" and "-p" parameters for username and password or preferably -N for .netrc usage.
1343
1344`--organization -o` (required) The organization to target.
1345`--email` (required) Email for an existing User in Edge.
1346`--roleName` (required) The name for the role.
1347
1348# <a name="sdkreference"></a>SDK Reference
1349
1350You could use apigeetool as an SDK to orchestrate tasks that you want to perform with Edge, for eg, deploying an api proxy or running tests etc.
1351
1352#### Usage Example
1353
1354 var apigeetool = require('apigeetool')
1355 var sdk = apigeetool.getPromiseSDK()
1356 var opts = {
1357 organization: 'edge-org',
1358 username: 'edge-user',
1359 password: 'password',
1360 environments: 'environment',
1361 }
1362 opts.api = APIGEE_PROXY_NAME;
1363 opts.directory = path.join(__dirname);
1364
1365 sdk.deployProxy(opts)
1366 .then(function(result){
1367 //deploy success
1368 },function(err){
1369 //deploy failed
1370 });
1371
1372## <a name="createdeveloper"></a>Create Developer
1373
1374Creates a new Developer in Edge
1375
1376#### Example
1377
1378Create a developer.
1379
1380 //see above for other required options
1381 opts.email = DEVELOPER_EMAIL
1382 opts.firstName = 'Test'
1383 opts.lastName = 'Test1'
1384 opts.userName = 'runningFromTest123'
1385 opts.attributes = [
1386 {
1387 name: "testAttribute",
1388 value: "newValue"
1389 }
1390 ]
1391
1392 sdk.createDeveloper(opts)
1393 .then(function(result){
1394 //developer created
1395 },function(err){
1396 //developer creation failed
1397 }) ;
1398
1399
1400## <a name="deletedeveloper"></a>Delete Developer
1401
1402Delete a Developer in Edge
1403
1404#### Example
1405
1406 //see above for other required options
1407 opts.email = DEVELOPER_EMAIL
1408
1409 sdk.deleteDeveloper(opts)
1410 .then(function(result){
1411 //developer deleted
1412 },function(err){
1413 //developer delete failed
1414 }) ;
1415
1416## <a name="createProduct"></a>Create Product
1417
1418Creates a new API Product in Edge
1419
1420#### Example
1421
1422 opts.productName = APIGEE_PRODUCT_NAME
1423 opts.productDesc = 'description'
1424 opts.proxies = APIGEE_PROXY_NAME
1425 opts.environments = 'test' //apigee env
1426 opts.quota = '1', //quota amount
1427 opts.quotaInterval = '1' //interval
1428 opts.quotaTimeUnit = 'minute' //timeunit
1429
1430 sdk.createProduct(opts)
1431 .then(function(result){
1432 //product created
1433 },function(err){
1434 //product creation failed
1435 }) ;
1436
1437## <a name="deleteproduct"></a>Delete Product
1438
1439Delete API Product in Edge
1440
1441#### Example
1442 opts.productName = APIGEE_PRODUCT_NAME
1443
1444 sdk.deleteProduct(opts)
1445 .then(function(result){
1446 //delete success
1447 },function(err){
1448 //delete failed
1449 }) ;
1450
1451## <a name="createapp"></a>Create App
1452
1453Create App in Edge
1454
1455#### Example
1456
1457 opts.name = APP_NAME
1458 opts.apiproducts = APIGEE_PRODUCT_NAME
1459 opts.email = DEVELOPER_EMAIL
1460
1461 sdk.createApp(opts)
1462 .then(function(result){
1463 //create app done
1464 },function(err){
1465 //create app failed
1466 }) ;
1467
1468## <a name="deleteapp"></a>Delete App
1469
1470Delete App in Edge
1471
1472#### Example
1473
1474 opts.email = DEVELOPER_EMAIL
1475 opts.name = APP_NAME
1476
1477 sdk.deleteApp(opts)
1478 .then(function(result){
1479 //delete app success
1480 },function(err){
1481 //delete app failed
1482 }) ;
1483
1484## <a name="createappkey"></a>Create App Key
1485
1486Create App Key in Edge
1487
1488#### Example
1489
1490 opts.key = APP_KEY;
1491 opts.secret = APP_SECRET;
1492 opts.developerId = DEVELOPER_EMAIL;
1493 opts.appName = APP_NAME;
1494 opts.apiProducts = PRODUCT_NAME;
1495
1496 sdk.createAppKey(opts)
1497 .then(function(result){
1498 //create key/secret success
1499 },function(err){
1500 //create key/secret failed
1501 }) ;
1502
1503## <a name="createcache"></a>Create Cache
1504
1505Create Cache in Edge
1506
1507#### Example
1508 opts.cache = CACHE_RESOURCE_NAME;
1509 sdk.createcache(opts)
1510 .then(function(result){
1511 //cache create success
1512 },function(err){
1513 //cache create failed
1514 }) ;
1515
1516## <a name="deletecache"></a>Delete Cache
1517
1518Delete Cache in Edge
1519
1520#### Example
1521 opts.cache = CACHE_RESOURCE_NAME;
1522 sdk.deletecache(opts)
1523 .then(function(result){
1524 //delete create success
1525 },function(err){
1526 //delete create failed
1527 }) ;
1528
1529# <a name="original"></a>Original Tool
1530
1531This module replaces the original "apigeetool," which was written in Python.
1532It is also called "apigeetool" and resides here:
1533
1534https://github.com/apigee/api-platform-tools
1535
1536# <a name="contrib"></a>Contribution
1537
1538To run remotetests, provide your edge creds, org, env details in `remotetest/testconfig.js` similar to 'remotetest/testconfig-sample.js'