# Install Passenger application dependencies

Note: Web Apps (WebApp) is the newer, recommended feature for
deploying web applications; it deploys container-based applications
and supersedes Application Manager. WebApp::deploy installs an
application's dependencies automatically as part of the deploy, so
there is no separate dependency-install call for Web Apps. Use
PassengerApps only to manage applications already registered with
Application Manager.

This function installs the dependencies for a Passenger application.

Note:

  This function starts the installation process. This may take a long time to complete.

Important:

  When you disable the Web Server role, the system disables this function.

Endpoint: GET /PassengerApps/ensure_deps
Version: 11.138.0.6
Security: BasicAuth

## Query parameters:

  - `app_path` (string, required)
    The application’s filepath.
    Example: "/home/example/my-app/"

  - `type` (string, required)
    The application’s type.

* gem — Ensure ruby gems in the application’s Gemfile file.
* npm — Ensure node packages in the application’s package.json file.
* pip — Ensure python pips in the application’s requirements.txt file.
    Enum: "gem", "npm", "pip"

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "ensure_deps"

  - `module` (string)
    The name of the module called.
    Example: "PassengerApps"

  - `result` (object)

  - `result.data` (object)

  - `result.data.sse_url` (string)
    The SSE URI to track the progress of the process.
    Example: "/sse/UserTasks/00000000_5c6c8b18228a35/ensure_deps.log"

  - `result.data.task_id` (string)
    The task id of the SSE process.
    Example: "00000000/5c76ec5566332c"

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.status` (integer)
    - 1 - Success.
- 0 - Failed. Check the errors field for more details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.


