Update a user-level variable which is created by current doer
PUT
/user/actions/variables/{variablename}
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”variablename
required
string
Name of the variable
Request Body
Section titled “Request Body”Media typeapplication/json
UpdateVariableOption defines the properties of the variable to update.
object
name
New name for the variable. If the field is empty, the variable name won’t be updated. Forgejo will convert it to uppercase.
string
value
required
Value of the variable to update. Special characters will be retained. Line endings will be normalized to LF to match the behaviour of browsers. Encode the data with Base64 if line endings should be retained.
string
Examplegenerated
{ "name": "example", "value": "example"}Responses
Section titled “Responses”Response when updating a variable
Media typeapplication/json
Response when updating a variable
Media typeapplication/json
APIError is error format response
Media typeapplication/json
APIError is an api error with a message
object
message
string
url
string
Examplegenerated
{ "message": "example", "url": "example"}APIUnauthorizedError is a unauthorized error response
Media typeapplication/json
object
message
string
url
string
Examplegenerated
{ "message": "example", "url": "example"}APIForbiddenError is a forbidden error response
Media typeapplication/json
object
message
string
url
string
Examplegenerated
{ "message": "example", "url": "example"}APINotFound is a not found error response
Media typeapplication/json
object
errors
Array<string>
message
string
url
string
Examplegenerated
{ "errors": [ "example" ], "message": "example", "url": "example"}