UNPKG

27.4 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 to Edge,
25* undeploying an API proxy from Edge,
26* deploying Node.js apps to Edge,
27* listing deployed API proxies on Edge,
28* retrieving deployed proxies and apps from Edge,
29* deleting proxy 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
36You need to be familiar with basic concepts and features of Apigee Edge such as API proxies, organizations, and environments.
37
38For more information, refer to the [Apigee Edge docs](http://apigee.com/docs/).
39
40# <a name="commonargs"></a>Common Parameters
41
42The following parameters are available on all of the commands supported by
43this tool:
44
45`--baseuri -L`
46(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.
47
48`--cafile -c`
49(optional) The names of one of more PEM files that represent trusted certificate authorities.
50Multiple file names may be comma-separated. Use this to communicate with an installation
51of Apigee Edge that uses a custom certificate for API calls.
52
53`--debug -D`
54(optional) Prints additional information about the deployment, including router and message processor IDs.
55
56`--help -h`
57(optional) Displays help on this command.
58
59`--insecure -k`
60(optional) Do not validate the TLS certificate of the HTTPS target for API calls.
61Use this to communicate with an installation of Apigee Edge that does not use a
62trusted TLS certificate.
63
64`--asynclimit -a`
65(optional) Limit for the maximum number of operations performed concurrently.
66Currently this only affects file uploads in the `deploynodeapp` command. Defaults to 4.
67
68`--json -j`
69(optional) Formats the command's response as a JSON object.
70
71`--organization -o`
72(required) The name of the organization to deploy to. May be set as an environment variable APIGEE_ORGANIZATION.
73
74`--password -p`
75(required) Your Apigee account password. May be set as an environment variable APIGEE_PASSWORD.
76
77`--username -u`
78(required) Your Apigee account username. May be set as an environment variable APIGEE_USERNAME.
79
80`--token -t`
81(optional) Your Apigee access token. Use this in lieu of -u / -p
82
83`--netrc -N`
84(optional) Use this in lieu of -u / -p, to tell apigeetool to retrieve credentials from your .netrc file.
85
86`--verbose -V`
87(optional) Prints additional information as the deployment proceeds.
88
89# <a name="reference"></a>Command reference and examples
90
91* [deploynodeapp](#deploynodeapp)
92* [deployproxy](#deployproxy)
93* [undeploy](#undeploy)
94* [listdeployments](#listdeployments)
95* [fetchproxy](#fetchproxy)
96* [getlogs](#getlogs)
97* [delete](#delete)
98* [deploySharedflow](#deploySharedflow)
99* [undeploySharedflow](#undeploySharedflow)
100* [listSharedflowDeployments](#listSharedflowDeployments)
101* [fetchSharedflow](#fetchSharedflow)
102* [deleteSharedflow](#deleteSharedflow)
103* [createdeveloper](#createdeveloper)
104* [deletedeveloper](#deletedeveloper)
105* [createproduct](#createproduct)
106* [deleteproduct](#deleteproduct)
107* [createapp](#createapp)
108* [deleteapp](#deleteapp)
109* [createcache](#createcache)
110* [deletecache](#deletecache)
111
112
113## <a name="deploynodeapp"></a>deploynodeapp
114
115Deploys 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.
116
117#### Examples
118
119Deploys a Node.js app to Apigee Edge.
120
121 apigeetool deploynodeapp -u sdoe@apigee.com -o sdoe -e test -n 'Test Node App 2' -d . -m app.js -b /node2
122
123Deploys a Node.js app to both the default (HTTP) and secure (HTTPS) virtual hosts.
124
125 apigeetool deploynodeapp -u sdoe@apigee.com -o sdoe -e test -n 'Test Node App 2' -d . -m app.js -b /node2 -v default,secure
126
127#### Required parameters
128
129The following parameters are required. However, if any are left unspecified
130on the command line, and if apigeetool is running in an interactive shell,
131then apigeetool will prompt for them.
132
133For example, if you do not specify a password using "-p", apigeetool will
134prompt for the password on the command line.
135
136See [Common Parameters](#commonargs) for a list of additional parameters, including
137the "-u" and "-p" parameters for username and password, and the "-o" parameter
138for organization name, all of which are required.
139
140`--environments -e`
141(required) The name(s) of the environment(s) to deploy to (comma-delimited).
142
143#### Optional parameters
144
145`--api -n`
146(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.
147
148`--base-path -b`
149(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`.
150
151`--directory -d`
152(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.
153
154`--import-only -i`
155(optional) Imports the API proxy to Apigee Edge but does not deploy it.
156
157`--main -m`
158(optional) The Node.js file you want to be the main file. If not specified, will attempt to use main from package.json.
159
160`--preserve-policies -P`
161(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.
162
163`--resolve-modules -R`
164(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.
165
166`--upload-modules -U`
167(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).
168
169`--virtualhosts -v`
170(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`.
171
172## <a name="deployproxy"></a>deployproxy
173
174Deploys 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.
175
176#### Example
177
178Deploys 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.
179
180 apigeetool deployproxy -u sdoe@example.com -o sdoe -e test -n example-proxy -d .
181
182#### Required parameters
183
184The following parameters are required. However, if any are left unspecified
185on the command line, and if apigeetool is running in an interactive shell,
186then apigeetool will prompt for them.
187
188See [Common Parameters](#commonargs) for a list of additional parameters, including
189the "-u" and "-p" parameters for username and password, and the "-o" parameter
190for organization name, all of which are required.
191
192`--api -n`
193(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._\-$ %`.
194
195`--environments -e`
196(required) The name(s) of the environment(s) to deploy to (comma delimited).
197
198#### Optional parameters
199
200`--base-path -b`
201(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.
202
203`--directory -d`
204(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.
205
206`--import-only -i`
207(optional) Imports the API proxy to Apigee Edge but does not deploy it.
208
209`--resolve-modules -R`
210(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.
211
212`--upload-modules -U`
213(optional) If specified, uploads Node.js modules from your system to Apigee Edge.
214
215## <a name="undeploy"></a>undeploy
216
217Undeploys a named API proxy or Node.js app deployed on Apigee Edge.
218
219#### Example
220
221Undeploy the proxy named "example-proxy".
222
223 apigeetool undeploy -u sdoe@example.com -o sdoe -n example-proxy -e test -D
224
225#### Required parameters
226
227The following parameters are required. However, if any are left unspecified
228on the command line, and if apigeetool is running in an interactive shell,
229then apigeetool will prompt for them.
230
231See [Common Parameters](#commonargs) for a list of additional parameters, including
232the "-u" and "-p" parameters for username and password, and the "-o" parameter
233for organization name, all of which are required.
234
235`--api -n`
236(required) The name of the API proxy or app to undeploy.
237
238`--environment -e`
239(required) The environment on Apigee Edge where the API proxy or app is currently deployed.
240
241#### Optional parameters
242
243`--revision -r`
244(optional) Specify the revision number of the API proxy to undeploy.
245
246## <a name="listdeployments"></a>listdeployments
247
248Lists the API proxies deployed on Apigee Edge for the specified organization. Lets you filter the result by API proxy name or environment.
249
250#### Examples
251
252List all API proxies in an organization:
253
254 $ apigeetool listdeployments -u sdoe@example.com -o sdoe -e test`
255
256List API proxies named "example-proxy":
257
258 $ apigeetool listdeployments -u sdoe@example.com -o sdoe -n example-proxy
259
260#### Required parameters
261
262See [Common Parameters](#commonargs) for a list of additional parameters, including
263the "-u" and "-p" parameters for username and password, and the "-o" parameter
264for organization name, all of which are required.
265
266#### Required, mutually exclusive parameters
267
268`--api -n`
269(You must specify either `api` or `environment` in this command) The name of the API proxy to list.
270
271`--environment -e`
272(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.
273
274#### Optional parameters
275
276`--long -l`
277(optional) Returns additional information about the API proxy or Node.js app,
278including the URL to use as the base path for each one.
279
280`--revision -r`
281(optional) Filters the list by the specified revision number.
282
283## <a name="fetchproxy"></a>fetchproxy
284
285Fetches a deployed API proxy or Node.js application from Apigee Edge. The
286result will be a ZIP file that contains the contents of the entire
287proxy.
288
289Regardless of whether "deployproxy" or "deploynodeapp" is used to deploy the
290proxy or app, the result of "fetchproxy" will always be a ZIP file that
291represents an API proxy. The resulting proxy may be "unzipped" and
292re-deployed using "deployproxy."
293
294#### Example
295
296Fetch the deployed proxy named "example-proxy".
297
298 apigeetool fetchproxy -u sdoe@example.com -o sdoe -n example-proxy -r 1
299
300#### Required parameters
301
302The following parameters are required. However, if any are left unspecified
303on the command line, and if apigeetool is running in an interactive shell,
304then apigeetool will prompt for them.
305
306See [Common Parameters](#commonargs) for a list of additional parameters, including
307the "-u" and "-p" parameters for username and password, and the "-o" parameter
308for organization name, all of which are required.
309
310`--api -n`
311(required) The name of the API proxy or app to undeploy.
312
313`--revision -r`
314(optional) Specifies the revision to retrieve.
315
316#### Optional parameters
317
318`--file -f`
319(optional) The name of the file to write as the result. If not specified,
320then the file name will be the same as the name passed to the "name"
321parameter.
322
323## <a name="delete"></a>delete
324
325Delete all revisions of a proxy from Apigee Edge.
326
327It is an error to delete a proxy that still has deployed revisions. Revisions
328must be undeployed using "undeploy" before this command may be used.
329
330#### Example
331
332Delete the proxy named "example-proxy".
333
334 apigeetool delete -u sdoe@example.com -o sdoe -n example-proxy
335
336#### Required parameters
337
338The following parameters are required. However, if any are left unspecified
339on the command line, and if apigeetool is running in an interactive shell,
340then apigeetool will prompt for them.
341
342See [Common Parameters](#commonargs) for a list of additional parameters, including
343the "-u" and "-p" parameters for username and password, and the "-o" parameter
344for organization name, all of which are required.
345
346`--api -n`
347(required) The name of the API proxy or app to undeploy.
348
349## <a name="getlogs"></a>getlogs
350
351Retrieve the last set of log records from a Node.js application deployed to Apigee Edge.
352
353The resulting log files will be written directly to standard output. Each is prefixed with:
354
355* A timestamp, in UTC by default
356* An indication of whether the log record came from standard output or standard error
357* A unique identifier of the server where the log was generated.
358
359Since Apigee Edge, by default, deploys each Node.js application on at least two
360different servers, most applications will see at least two sets of logs. These are
361sorted in time stamp order.
362
363The log records from this command come from a cache inside Apigee Edge that retains
364the last 500 lines of log output from each server. The cache is a circular buffer,
365so older messages will be discarded when it fills up.
366
367By default, the last set of log records will be pulled and written to standard output. However, if the
368"-f" option is used, then "apigeetool" will poll Edge for new log records and append them to standard
369output, in the manner of "tail -f". (By default, the tool polls every
370five seconds).
371
372For example, a set of log records might look like this:
373
374<pre>
375[2014-11-05T01:30:01.530Z nodejs/stderr svr.362] *** Starting script
376[2014-11-05T01:30:09.182Z nodejs/stderr svr.362] 2014-11-05T01:30:09.181Z - debug: 1/4. this is a debug log
377[2014-11-05T01:30:09.186Z nodejs/stdout svr.362] 2014-11-05T01:30:09.186Z - info: 2/4. this is an info log
378[2014-11-05T01:30:09.187Z nodejs/stdout svr.362] 2014-11-05T01:30:09.187Z - warn: 3/4. this is a warning log
379[2014-11-05T01:30:09.188Z nodejs/stderr svr.362] 2014-11-05T01:30:09.188Z - error: 4/4. this is an error log
380[2014-11-05T01:48:21.419Z nodejs/stderr svr.828] *** Starting script
381[2014-11-05T01:48:28.637Z nodejs/stderr svr.828] js-bson: Failed to load c++ bson extension, using pure JS version
382[2014-11-05T01:48:29.801Z nodejs/stderr svr.828] 2014-11-05T01:48:29.800Z - debug: 1/4. this is a debug log
383[2014-11-05T01:48:29.804Z nodejs/stdout svr.828] 2014-11-05T01:48:29.804Z - info: 2/4. this is an info log
384[2014-11-05T01:48:29.805Z nodejs/stdout svr.828] 2014-11-05T01:48:29.805Z - warn: 3/4. this is a warning log
385[2014-11-05T01:48:29.806Z nodejs/stderr svr.828] 2014-11-05T01:48:29.806Z - error: 4/4. this is an error log
386</pre>
387
388#### Required Parameters
389
390The following parameters are required. However, if any are left unspecified
391on the command line, and if apigeetool is running in an interactive shell,
392then apigeetool will prompt for them.
393
394See [Common Parameters](#commonargs) for a list of additional parameters, including
395the "-u" and "-p" parameters for username and password, and the "-o" parameter
396for organization name, all of which are required.
397
398`--api -n`
399(required) The name of the deployed app to get logs from.
400
401`--environment -e`
402(required) The environment on Apigee Edge where the app is currently deployed.
403
404#### Optional Parameters
405
406`--streaming -f`
407(optional) If specified, do not exit, but instead poll Apigee Edge for new log
408records and write them to standard output in the manner of "tail -f."
409
410`--timezone -z`
411(optional) If specified, use the time zone to format the timestamps on the
412log records. If not specified, then the default is UTC. The timestamp name
413should be a name such as "PST."
414
415## <a name="deploySharedflow"></a>deploySharedflow
416
417Deploys 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.
418
419#### Example
420
421Deploys a SharedFlow called example-sf to Apigee Edge. Per the `-d` flag, the command is executed in the root directory of the sharedflow bundle.
422
423 apigeetool deploySharedflow -u sdoe@example.com -o sdoe -e test -n example-sf -d .
424
425#### Required parameters
426
427The following parameters are required. However, if any are left unspecified
428on the command line, and if apigeetool is running in an interactive shell,
429then apigeetool will prompt for them.
430
431See [Common Parameters](#commonargs) for a list of additional parameters, including
432the "-u" and "-p" parameters for username and password, and the "-o" parameter
433for organization name, all of which are required.
434
435`--name -n`
436(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._\-$ %`.
437
438`--environments -e`
439(required) The name(s) of the environment(s) to deploy to (comma delimited).
440
441#### Optional parameters
442
443`--directory -d`
444(optional) The path to the root directory of the sharedflow on your local system. Will attempt to use current directory is none is specified.
445
446`--import-only -i`
447(optional) Imports the sharedflow to Apigee Edge but does not deploy it.
448
449## <a name="undeploySharedflow"></a>undeploySharedflow
450
451Undeploys a named API proxy or Node.js app deployed on Apigee Edge.
452
453#### Example
454
455Undeploy the proxy named "example-sf".
456
457 apigeetool undeploySharedflow -u sdoe@example.com -o sdoe -n example-sf -e test -D
458
459#### Required parameters
460
461The following parameters are required. However, if any are left unspecified
462on the command line, and if apigeetool is running in an interactive shell,
463then apigeetool will prompt for them.
464
465See [Common Parameters](#commonargs) for a list of additional parameters, including
466the "-u" and "-p" parameters for username and password, and the "-o" parameter
467for organization name, all of which are required.
468
469`--name -n`
470(required) The name of the sharedflow to undeploy.
471
472`--environment -e`
473(required) The environment on Apigee Edge where the sharedflow is currently deployed.
474
475#### Optional parameters
476
477`--revision -r`
478(optional) Specify the revision number of the sharedflow to undeploy.
479
480## <a name="listSharedflowDeployments"></a>listSharedflowDeployments
481
482Lists the sharedflows deployed on Apigee Edge for the specified organization. Lets you filter the result by API proxy name or environment.
483
484#### Examples
485
486List all Sharedflows in an organization:
487
488 $ apigeetool listSharedflowDeployments -u sdoe@example.com -o sdoe -e test` #Won't work due to missing API
489
490List Sharedflows named "example-sf":
491
492 $ apigeetool listSharedflowDeployments -u sdoe@example.com -o sdoe -n example-sf
493
494#### Required parameters
495
496See [Common Parameters](#commonargs) for a list of additional parameters, including
497the "-u" and "-p" parameters for username and password, and the "-o" parameter
498for organization name, all of which are required.
499
500#### Required, mutually exclusive parameters
501
502`--name -n`
503(You must specify either `name` or `environment` in this command) The name of the Sharedflow to list.
504
505`--environment -e`
506(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.
507
508#### Optional parameters
509
510`--revision -r`
511(optional) Filters the list by the specified revision number.
512
513## <a name="fetchSharedflow"></a>fetchSharedFlow
514
515Fetches a sharedFlow from Apigee Edge. The
516result will be a ZIP file that contains the contents of the entire
517sharedflow.The resulting ZIP file may be "unzipped" and re-deployed using "deploySharedflow."
518
519#### Example
520
521Fetch the deployed proxy named "example-proxy".
522
523 apigeetool fetchSharedflow -u sdoe@example.com -o sdoe -n example-proxy -r 1
524
525#### Required parameters
526
527The following parameters are required. However, if any are left unspecified
528on the command line, and if apigeetool is running in an interactive shell,
529then apigeetool will prompt for them.
530
531See [Common Parameters](#commonargs) for a list of additional parameters, including
532the "-u" and "-p" parameters for username and password, and the "-o" parameter
533for organization name, all of which are required.
534
535`--name -n`
536(required) The name of the sharedflow or app to undeploy.
537
538`--revision -r`
539(required) Specifies the revision to retrieve.
540
541#### Optional parameters
542
543`--file -f`
544(optional) The name of the file to write as the result. If not specified,
545then the file name will be the same as the name passed to the "name"
546parameter.
547
548## <a name="deleteSharedflow"></a>deleteSharedflow
549
550Delete all revisions of a sharedflow from Apigee Edge.
551
552It is an error to delete a proxy that still has deployed revisions. Revisions
553must be undeployed using "undeploySharedflow" before this command may be used.
554
555#### Example
556
557Delete the proxy named "example-sf".
558
559 apigeetool deleteSharedflow -u sdoe@example.com -o sdoe -n example-sf
560
561#### Required parameters
562
563The following parameters are required. However, if any are left unspecified
564on the command line, and if apigeetool is running in an interactive shell,
565then apigeetool will prompt for them.
566
567See [Common Parameters](#commonargs) for a list of additional parameters, including
568the "-u" and "-p" parameters for username and password, and the "-o" parameter
569for organization name, all of which are required.
570
571`--name -n`
572(required) The name of the API proxy or app to undeploy.
573
574
575# <a name="sdkreference"></a>SDK Reference
576
577You 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.
578
579#### Usage Example
580
581 var apigeetool = require('apigeetool')
582 var sdk = apigeetool.getPromiseSDK()
583 var opts = {
584 organization: 'edge-org',
585 username: 'edge-user',
586 password: 'password',
587 environment: 'environment',
588 }
589 opts.api = APIGEE_PROXY_NAME;
590 opts.directory = path.join(__dirname);
591
592 sdk.deployProxy(opts)
593 .then(function(result){
594 //deploy success
595 },function(err){
596 //deploy failed
597 })
598
599## <a name="createdeveloper"></a>Create Developer
600
601Creates a new Developer in Edge
602
603#### Example
604
605Create a developer.
606
607 //see above for other required options
608 opts.email = DEVELOPER_EMAIL
609 opts.firstName = 'Test'
610 opts.lastName = 'Test1'
611 opts.userName = 'runningFromTest123'
612
613 sdk.createDeveloper(opts)
614 .then(function(result){
615 //developer created
616 },function(err){
617 //developer creation failed
618 }) ;
619
620
621## <a name="deletedeveloper"></a>Delete Developer
622
623Delete a Developer in Edge
624
625#### Example
626
627 //see above for other required options
628 opts.email = DEVELOPER_EMAIL
629
630 sdk.deleteDeveloper(opts)
631 .then(function(result){
632 //developer deleted
633 },function(err){
634 //developer delete failed
635 }) ;
636
637## <a name="createproduct"></a>Create Product
638
639Creates a new API Product in Edge
640
641#### Example
642
643 opts.productName = APIGEE_PRODUCT_NAME
644 opts.productDesc = 'description'
645 opts.proxies = APIGEE_PROXY_NAME
646 opts.environments = 'test' //apigee env
647 opts.quota = '1', //quota amount
648 opts.quotaInterval = '1' //interval
649 opts.quotaTimeUnit = 'minute' //timeunit
650
651 sdk.createProduct(opts)
652 .then(function(result){
653 //product created
654 },function(err){
655 //product creation failed
656 }) ;
657
658## <a name="deleteproduct"></a>Delete Product
659
660Delete API Product in Edge
661
662#### Example
663 opts.productName = APIGEE_PRODUCT_NAME
664
665 sdk.deleteProduct(opts)
666 .then(function(result){
667 //delete success
668 },function(err){
669 //delete failed
670 }) ;
671
672## <a name="createapp"></a>Create App
673
674Create App in Edge
675
676#### Example
677
678 opts.name = APP_NAME
679 opts.apiproducts = APIGEE_PRODUCT_NAME
680 opts.email = DEVELOPER_EMAIL
681
682 sdk.createApp(opts)
683 .then(function(result){
684 //create app done
685 },function(err){
686 //create app failed
687 }) ;
688
689## <a name="deleteapp"></a>Delete App
690
691Delete App in Edge
692
693#### Example
694
695 opts.email = DEVELOPER_EMAIL
696 opts.name = APP_NAME
697
698 sdk.deleteApp(opts)
699 .then(function(result){
700 //delete app success
701 },function(err){
702 //delete app failed
703 }) ;
704
705## <a name="createcache"></a>Create Cache
706
707Create Cache in Edge
708
709#### Example
710 opts.cache = CACHE_RESOURCE_NAME;
711 sdk.createcache(opts)
712 .then(function(result){
713 //cache create success
714 },function(err){
715 //cache create failed
716 }) ;
717
718## <a name="deletecache"></a>Delete Cache
719
720Delete Cache in Edge
721
722#### Example
723 opts.cache = CACHE_RESOURCE_NAME;
724 sdk.deletecache(opts)
725 .then(function(result){
726 //delete create success
727 },function(err){
728 //delete create failed
729 }) ;
730
731# <a name="original"></a>Original Tool
732
733This module replaces the original "apigeetool," which was written in Python.
734It is also called "apigeetool" and resides here:
735
736https://github.com/apigee/api-platform-tools
737
738# <a name="contrib"></a>Contribution
739
740To run remotetests, provide your edge creds, org, env details in `remotetest/testconfig.js` similar to 'remotetest/testconfig-sample.js'