---
title: "Get the network activity of an npm build."
method: GET
path: "/api/builds/{id}/npm-network-activity"
tags: ["Builds", "Develocity"]
---

# Get the network activity of an npm build.

`GET /api/builds/{id}/npm-network-activity`

## Request

- Base URL: `https://develocity.example.com`
- URL: `https://develocity.example.com/api/builds/{id}/npm-network-activity`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/develocity/apis/develocity-api/docs/api/builds/:id/npm-network-activity/get.ts> (a function with typed inputs; its response is checked against the schema)

This model is npm specific and cannot be requested for another build tool.  This model is only available starting with the Develocity npm agent version 3.0.0.

## Response `200`

The network activity of an npm build.

- NpmNetworkActivity: Information about the network activity of the build.
  - `networkRequestCount` integer, required: This represents the total count of network requests made during dependency resolution.
  - `serialNetworkRequestTime` integer, required: The duration in milliseconds representing the sum of times for potentially parallel network requests. It does not reflect wall clock time but offers a rough estimation of network activity.
  - `wallClockNetworkRequestTime` integer, required: The estimate in milliseconds representing the wall clock time spent on network requests during the current build.
  - `fileDownloadSize` integer, required: The total number of bytes downloaded for dependencies. It accounts only for the bytes of the files (e.g. TGZs, pakuments) downloaded and not the total network transfer.
  - `fileDownloadCount` integer, required: The total number of successfully downloaded files.
  - `methods` object: A breakdown of the network activity by HTTP method, when available.
  - `registries` object: A breakdown of the network activity by registry URL. This is empty when no registries were captured.
  - `registryMethods` object: A breakdown of the network activity by HTTP method and registry, when available.

## Other responses

- `400`: The request cannot be fulfilled due to a problem.
- `404`: The referenced resource either does not exist or the permissions to know about it are missing.
- `500`: The server encountered an unexpected error.
- `503`: The server is not ready to handle the request.

---

[API](https://skmtc.dev/develocity/apis/develocity-api.md) - [All operations](https://skmtc.dev/develocity/apis/develocity-api/llms.txt) - [OpenAPI document](https://skmtc.dev/develocity/apis/develocity-api/revisions/b49835fbf065?raw)
