Create or Update a secret value in a repository
PUT
/repos/{owner}/{repo}/actions/secrets/{secretname}
const url = 'https://gitea.com/api/v1/repos/example/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/repos/example/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”owner
required
string
Owner of the repository
repo
required
string
Name of the repository
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
Response when updating a secret
APIError is error format response
Headers
Section titled “Headers”message
string
url
string
APINotFound is a not found empty response