Skip to main content

List Organization Secrets

Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the secrets organization permission to use this endpoint.

External Documentation

To learn more, visit the GitHub documentation.

Parameters

ParameterDescription
OrgThe organization name. The name is not case sensitive.
PagePage number of the results to fetch.
Per PageThe number of results per page (max 100).
Return All PagesAutomatically fetch all resources, page by page.

Example Output

{
"value": {
"secrets": [
{
"created_at": "2019-08-10T14:59:22Z",
"name": "GIST_ID",
"updated_at": "2020-01-10T14:59:22Z",
"visibility": "private"
},
{
"created_at": "2019-08-10T14:59:22Z",
"name": "DEPLOY_TOKEN",
"updated_at": "2020-01-10T14:59:22Z",
"visibility": "all"
},
{
"created_at": "2019-08-10T14:59:22Z",
"name": "GH_TOKEN",
"selected_repositories_url": "https://api.github.com/orgs/octo-org/actions/secrets/SUPER_SECRET/repositories",
"updated_at": "2020-01-10T14:59:22Z",
"visibility": "selected"
}
],
"total_count": 3
}
}

Workflow Library Example

List Organization Secrets with Github and Send Results Via Email

Workflow LibraryPreview this Workflow on desktop