Create or Update a secret value in an organization
PUT
/orgs/{org}/actions/secrets/{secretname}
const url = 'https://gitea.com/api/v1/orgs/example/actions/secrets/example';const options = { method: 'PUT', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"data":"example","description":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://gitea.com/api/v1/orgs/example/actions/secrets/example \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "data": "example", "description": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”org
required
string
Name of organization
secretname
required
string
Name of the secret
Request Body
Section titled “Request Body”Media typeapplication/json
CreateOrUpdateSecretOption options when creating or updating secret
object
data
required
Data of the secret to update
string
description
Description of the secret to update
string
Examplegenerated
{ "data": "example", "description": "example"}Responses
Section titled “ Responses ”Response when creating a secret
Media typeapplication/json
Response when updating a secret
Media typeapplication/json
APIError is error format response
Media typeapplication/json
Headers
Section titled “Headers”message
string
url
string
APINotFound is a not found empty response
Media typeapplication/json