Send Docs Feedback

Note: Most user interface tasks can be performed in Edge Classic or the New Edge experience. For an overview, getting started topics, and release notes specific to the New Edge experience, see the docs.

Manage Node Packaged Modules

Resource Summary

Security

Content Type

application/x-www-form-urlencoded

Category

Node.js Management,

postNpm

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 
  • 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/.

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 true, the output will include additional information from npm on which API calls were made to the registry.

Header Parameters

Name Values Description
Content-Type
(required)

Specify as application/x-www-form-urlencoded.

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

HTTP Basic

OAuth 2.0

API Key

Reset

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?