---
title: "Regenerate the secret of a Build Cache Node."
method: POST
path: "/api/build-cache/nodes/{name}/secret"
tags: ["BuildCache", "GradleEnterprise", "Develocity"]
---

# Regenerate the secret of a Build Cache Node.

`POST /api/build-cache/nodes/{name}/secret`

## Request

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

Regenerates the secret associated with the named Build Cache Node. The old secret expires immediately, causing the Build Cache Node to
disconnect from Develocity. The Built-in Build Cache Node cannot be named as the target of this operation.

## Response `200`

The name referenced an existing Build Cache Node and that Build Cache Node's secret was regenerated.

- KeySecretPair: A Build Cache Node key and secret pair.
  - `key` string, required: A unique identifier for the Build Cache Node in Develocity.
  - `secret` string, required: The secret associated with the Build Cache Node.

## Other responses

- `404`: The referenced resource either does not exist or the permissions to know about it are missing.
- `500`: The server encountered an unexpected error.

---

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