Skip to main content
PATCH
/
api
/
variables
/
name
/
{name}
Update Variable By Name
curl --request PATCH \
  --url https://api.example.com/api/variables/name/{name} \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "my_variable",
  "value": "my-value",
  "tags": [
    "tag-1",
    "tag-2"
  ]
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Headers

x-prefect-api-version
string

Path Parameters

name
string
required

Body

application/json

Data used by the Prefect REST API to update a Variable.

name
string | null

The name of the variable

Maximum string length: 255
Example:

"my_variable"

value

The value of the variable

Example:

"my-value"

tags
string[] | null

A list of variable tags

Example:
["tag-1", "tag-2"]

Response

Successful Response