跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
Support
This is the documentation of 22.6.1, which is no longer the latest release. See the latest release.

Create a user-level variable

POST
/user/actions/variables/{variablename}
curl --request POST \
--url https://gitea.example.com/api/v1/user/actions/variables/example \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "value": "example" }'
variablename
required
string

Name of the variable

Media typeapplication/json

CreateVariableOption the option when creating variable

object
value
required

Value of the variable to create

string
Examplegenerated
{
"value": "example"
}

Response when creating a variable

Media typeapplication/json

Response when creating a variable

Media typeapplication/json

APIError is error format response

Media typeapplication/json
message
string
url
string

APINotFound is a not found empty response

Media typeapplication/json