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

# Get the attributes of an npm build.

`GET /api/builds/{id}/npm-attributes`

## Request

- Base URL: `https://develocity.example.com`
- URL: `https://develocity.example.com/api/builds/{id}/npm-attributes`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/develocity/apis/develocity-api/docs/api/builds/:id/npm-attributes/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.

## Response `200`

The attributes of an npm build.

- NpmAttributes: The attributes of an npm build.
  - `id` string, required: The Build Scan ID.
  - `buildStartTime` integer, required: The time when the build starts, as milliseconds since Epoch.
  - `buildDuration` integer, required: The duration of the build, as milliseconds.
  - `exitCode` integer, nullable: The exit code of the npm process.
  - `nodejsVersion` string: The Node.js version used.
  - `npmVersion` string, required: The npm version used.
  - `npmAgentVersion` string, required: The version of the Develocity npm agent.
  - `command` NpmCommand, required: The command run on an npm build.
    - `command` string, required: The command that was run (e.g. in "npm install", this would be "install").
    - `arguments` string[]: The arguments passed to the command (e.g. in "npm run script.js", this would be ["script.js"]).
  - `links` BuildAttributesLink[], required: The list of Build Scan links.
    - `label` string, required: The label of the Build Scan link.
    - `url` string, required: The url of the Build Scan link.
  - `tags` string[], required: The list of Build Scan tags.
  - `values` BuildAttributesValue[], required: The list of Build Scan values.
    - `name` string, required: The name of the Build Scan value.
    - `value` string: The value of the Build Scan value. `null` if the Build Scan value is not set.
  - `user` string, nullable: The username of the user that ran the build.
  - `host` string, nullable: The hostname of the user that ran the build, if set.
  - `packageName` string, nullable: The name of the package. `null` in case of very early build failure.
  - `hasFailed` boolean, required: True when the build fails, false otherwise.
  - `hasVerificationFailure` boolean: Set only if the build failed: true when the build has at least one failure classified as "Verification", false otherwise. The Verification classification is meant for failures that are expected within a standard application development lifecycle. They typically represent a problem with the developer’s inputs to the build such as the source code.
  - `hasNonVerificationFailure` boolean: Set only if the build failed: true when the build has at least one failure classified as "Non-verification", false otherwise. The Non-verification classification is meant for failures that are typically not expected within a standard application development lifecycle, such as build configuration failures, dependency resolution failures, and infrastructure failures.

## 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)
