{"meta":{"title":"カスタム プロパティの REST API エンドポイント","intro":"REST API を使用して、組織によってリポジトリに割り当てられたカスタム プロパティを一覧表示します。","product":"REST API","breadcrumbs":[{"href":"/ja/rest","title":"REST API"},{"href":"/ja/rest/repos","title":"リポジトリ"},{"href":"/ja/rest/repos/custom-properties","title":"カスタム プロパティ"}],"documentType":"article"},"body":"# カスタム プロパティの REST API エンドポイント\n\nREST API を使用して、組織によってリポジトリに割り当てられたカスタム プロパティを一覧表示します。\n\n## カスタム プロパティについて\n\nREST API を使用して、リポジトリを所有する組織によってリポジトリに割り当てられたカスタム プロパティを表示できます。 詳しくは、「[Organization 内リポジトリのカスタム プロパティの管理](/ja/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization)」をご覧ください。 カスタム プロパティを管理するための REST API エンドポイントの詳細については、「[カスタム プロパティの REST API エンドポイント](/ja/rest/orgs/custom-properties)」を参照してください。\n\n> \\[!NOTE]\n> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2026-03-10`. Curl examples below omit these standard headers for brevity.\n\n## Get all custom property values for a repository\n\n```\nGET /repos/{owner}/{repo}/properties/values\n```\n\nGets all custom property values that are set for a repository.\nUsers with read access to the repository can use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **403** - Forbidden\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/properties/values\n```\n\n**Response schema (Status: 200):**\n\nArray of `Custom Property Value`:\n\n* `property_name`: required, string\n* `value`: required, one of:\n  * **string**\n  * **array**\n\n## Create or update custom property values for a repository\n\n```\nPATCH /repos/{owner}/{repo}/properties/values\n```\n\nCreate new or update existing custom property values for a repository.\nUsing a value of null for a custom property will remove or 'unset' the property value from the repository.\nRepository admins and other users with the repository-level \"edit custom property values\" fine-grained permission can use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n#### Body parameters\n\n* **`properties`** (array of objects) (required)\n  A list of custom property names and associated values to apply to the repositories.\n  * **`property_name`** (string) (required)\n    The name of the property\n  * **`value`** (null or string or array) (required)\n    The value assigned to the property\n\n### HTTP response status codes\n\n* **204** - No Content when custom property values are successfully created or updated\n\n* **403** - Forbidden\n\n* **404** - Resource not found\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PATCH \\\n  https://api.github.com/repos/OWNER/REPO/properties/values \\\n  -d '{\n  \"properties\": [\n    {\n      \"property_name\": \"environment\",\n      \"value\": \"production\"\n    },\n    {\n      \"property_name\": \"service\",\n      \"value\": \"web\"\n    },\n    {\n      \"property_name\": \"team\",\n      \"value\": \"octocat\"\n    }\n  ]\n}'\n```\n\n**Response schema (Status: 204):**"}