---
title: "Create or update a Build Cache Node."
method: PUT
path: "/api/build-cache/nodes/{name}"
tags: ["BuildCache", "GradleEnterprise", "Develocity"]
---

# Create or update a Build Cache Node.

`PUT /api/build-cache/nodes/{name}`

## Request

- Base URL: `https://develocity.example.com`
- URL: `https://develocity.example.com/api/build-cache/nodes/{name}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/develocity/apis/develocity-api/docs/api/build-cache/nodes/:name/put.ts> (a function with typed inputs; its response is checked against the schema)

Create a new Build Cache Node in Develocity or update the configuration of an existing one.
The Built-in Build Cache Node cannot be named as the target of this operation.

## Request body

- NodeConfiguration: A Build Cache Node configuration description.
  - `enabled` boolean, required: Indicates if the Build Cache Node is enabled.
  - `replication` ReplicationConfiguration, nullable: Cached data replication configuration description. May be `null` if replication is not configured.
    - `source` string, required: The name of the Build Cache Node which is the source of data.
    - `preemptive` boolean, required: Indicates if preemptive replication is enabled from the source.

## Response `200`

The name referenced an existing Build Cache Node and that Build Cache Node’s configuration was updated successfully.

## Other responses

- `201`: A new Build Cache Node was created with the configuration specified in the request.
- `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.

---

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