Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

Update bucket

PATCH/v1/buckets/{bucketId}Update bucket

Updates the display name, logical id, or branch of the bucket with the given ID. The display name is a label only: the provider bucket name, the objects, and the access keys do not change. logicalId cannot be combined with branchId or branchGitName in one request; move the bucket first, then set its logicalId.

Parameters

bucketIdstringpathrequired

pattern ^(bkt_)?([cC][^\s-]{8,}|[a-z0-9]+)$

Request body

application/json
object
branchGitNamestring

Git name of the branch to move the bucket to; the branch is created when it does not exist. Mutually exclusive with branchId.

minLength 1

branchIdstring

ID of the branch to move the bucket to. Mutually exclusive with branchGitName.

pattern ^(br_)?([cC][^\s-]{8,}|[a-z0-9]+)$

displayNamestring

New display name for the bucket. A label only: the provider bucket name does not change.

maxLength 100 · minLength 1

logicalIdstring

Declared identity of the resource, unique within its branch. Set by the tool that declares the resource.

maxLength 255 · pattern ^[A-Za-z0-9][A-Za-z0-9._-]*$

Example request
{
  "branchGitName": "string",
  "branchId": "string",
  "displayName": "string",
  "logicalId": "string"
}

Responses

200Updated the bucket.application/json
object
dataobjectrequired
Show child attributes
branchIdnull | stringrequired

pattern ^(br_)([cC][^\s-]{8,}|[a-z0-9]+)$

createdAtstring · date-timerequired
idstringrequired

pattern ^(bkt_)([cC][^\s-]{8,}|[a-z0-9]+)$

logicalIdnull | stringrequired
namestringrequired
projectobjectrequired
Show child attributes
idstringrequired

pattern ^(proj_)([cC][^\s-]{8,}|[a-z0-9]+)$

namestringrequired
urlstring · urirequired
providerNamestringrequired
statusstringrequired
typestringrequired

const "bucket"

urlstring · urirequired
Example response
{
  "data": {
    "branchId": "string",
    "createdAt": "2026-06-09T00:00:00Z",
    "id": "string",
    "logicalId": "string",
    "name": "string",
    "project": {
      "id": "string",
      "name": "string",
      "url": "https://example.com"
    },
    "providerName": "string",
    "status": "string",
    "type": "bucket",
    "url": "https://example.com"
  }
}
401Missing or invalid authorization token.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
404Bucket or branch not found.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
409A bucket with the same `logicalId` already exists on the branch, the bucket's `logicalId` is already taken on the target branch of a move, or the target branch changed during the move.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
413Request body exceeds this endpoint's size cap.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
422Validation failed (e.g. no field given, an empty display name, or `logicalId` combined with a branch move).application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
Documentation menu