You are viewing the Apigee Management API reference documentation. For the main product docs, and to search all docs, go to https://docs.apigee.com. |
Manage Node Packaged Modules
Resource Summary |
|
Security |
|
Content Type |
application/x-www-form-urlencoded |
Category |
Node.js Management, |
POST
Manage Node Packaged Modules
Runs a specified npm
command for an API proxy deployed on Apigee Edge. When you call this API, it is equivalent to executing an npm
command in the resources/node
directory of the API proxy.
Valid npm
commands that you can execute with this API are:
- install
- update
- outdated
- dedupe
- prune
- verbose (directs npm to produce more output)
- ls (default if no query param is specified)
Usage: Specify the body of this API like this: "command={npm-command}". For example: command=install
. The command is designed to install known dependencies for the API's package directory (resources/node).
Do not try to specify an arbitrary published Node.js package name with this API. For example, something like this will fail: command=install async
.
With the exception of ls
and outdated
, all of these commands replace node_modules.zip
and any other ZIP file in resources/node
with the prefix node_modules
with a new set of files that contains the updated dependencies.
For details about these individual npm
commands, see https://docs.npmjs.com/cli/.
package.json
that are listed as "devDependencies". (Node.js module authors use "devDependencies" to denote modules that are required for testing and development but not to actually run the module.) You can override the default behavior by passing the parameter production=false
. For example:
curl http://host:port/v1/o/ORG/apis/API/revisions/REV/npm -d 'command=install&production=false'
Example 1:
command=ls
Returns a list of Node.js dependencies.
Example 2:
command=install
Installs all dependencies for the resources/node
directory.
Resource URL
https://api.enterprise.apigee.com/v1 /organizations/{org_name}/apis/{api_name}/revisions/{revision_num}/npm
Query Parameters
Name | Values | Description |
---|---|---|
verbose |
If |
Header Parameters
Name | Values | Description |
---|---|---|
Content-Type
(required) |
Specify as |
Request Body
org_name Mention the organization name true
api_name Mention the API proxy true
revision_num Mention the API proxy revision number true
Make a request and see the response.
Make a request and see the response.
Make a request and see the response.
Working...
Help or comments?
- If something's not working: Ask the Apigee Community or see Apigee Support.
- If something's wrong with the docs: Click the "Send Feedback" button.
(Incorrect? Unclear? Broken link? Typo?)