REST API endpoints for custom properties
About custom properties
Get all custom property values for a repository
Fine-grained access tokens for "Get all custom property values for a repository"
-
GitHub App user access tokens -
GitHub App installation access tokens -
Fine-grained personal access tokens
-
"Metadata" repository permissions (read)
Parameters for "Get all custom property values for a repository"
|
---|
|
|
---|
|
|
HTTP response status codes for "Get all custom property values for a repository"
| |
---|---|
| |
| |
| |
Code samples for "Get all custom property values for a repository"
Request example
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/OWNER/REPO/properties/values
Status: 200
[ { "property_name": "environment", "value": "production" }, { "property_name": "service", "value": "web" }, { "property_name": "team", "value": "octocat" } ]
Create or update custom property values for a repository
Fine-grained access tokens for "Create or update custom property values for a repository"
-
GitHub App user access tokens -
GitHub App installation access tokens -
Fine-grained personal access tokens
-
"Custom properties" repository permissions (write)
Parameters for "Create or update custom property values for a repository"
|
---|
|
|
---|
|
|
| |||
---|---|---|---|
| |||
|
|
---|
|
|
HTTP response status codes for "Create or update custom property values for a repository"
| |
---|---|
| |
| |
| |
| |
Code samples for "Create or update custom property values for a repository"
Request example
curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/OWNER/REPO/properties/values \ -d '{"properties":[{"property_name":"environment","value":"production"},{"property_name":"service","value":"web"},{"property_name":"team","value":"octocat"}]}'
Status: 204