Skip to main content

secrets

Overview

Namesecrets
TypeResource
Idgithub.codespaces.secrets

Fields

NameDatatypeDescription
namestringThe name of the secret
created_atstringThe date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.
selected_repositories_urlstringThe API URL at which the list of repositories this secret is visible to can be retrieved
updated_atstringThe date and time at which the secret was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.
visibilitystringThe type of repositories in the organization that the secret is visible to

Methods

NameAccessible byRequired ParamsDescription
get_secret_for_authenticated_userSELECTsecret_nameGets a secret available to a user's codespaces without revealing its encrypted value.

You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint.

GitHub Apps must have read access to the codespaces_user_secrets user permission to use this endpoint.
list_secrets_for_authenticated_userSELECTLists all secrets available for a user's Codespaces without revealing their
encrypted values.

You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint.

GitHub Apps must have read access to the codespaces_user_secrets user permission to use this endpoint.
create_or_update_secret_for_authenticated_userINSERTsecret_name, data__key_idCreates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using
LibSodium. For more information, see "Encrypting secrets for the REST API."

You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must also have Codespaces access to use this endpoint.

GitHub Apps must have write access to the codespaces_user_secrets user permission and codespaces_secrets repository permission on all referenced repositories to use this endpoint.
delete_secret_for_authenticated_userDELETEsecret_nameDeletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret.

You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint.

GitHub Apps must have write access to the codespaces_user_secrets user permission to use this endpoint.