{"meta":{"title":"리포지토리 콘텐츠에 대한 REST API 엔드포인트","intro":"REST API를 사용하여 리포지토리에서 Base64로 인코드된 콘텐츠를 만들고, 수정하고, 삭제할 수 있습니다.","product":"REST API","breadcrumbs":[{"href":"/ko/rest","title":"REST API"},{"href":"/ko/rest/repos","title":"리포지토리"},{"href":"/ko/rest/repos/contents","title":"콘텐트"}],"documentType":"article"},"body":"# 리포지토리 콘텐츠에 대한 REST API 엔드포인트\n\nREST API를 사용하여 리포지토리에서 Base64로 인코드된 콘텐츠를 만들고, 수정하고, 삭제할 수 있습니다.\n\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\n## Get repository content\n\n```\nGET /repos/{owner}/{repo}/contents/{path}\n```\n\nGets the contents of a file or directory in a repository. Specify the file path or directory with the path parameter. If you omit the path parameter, you will receive the contents of the repository's root directory.\nThis endpoint supports the following custom media types. For more information, see \"Media types.\"\n\napplication/vnd.github.raw+json: Returns the raw file contents for files and symlinks.\napplication/vnd.github.html+json: Returns the file contents in HTML. Markup languages are rendered to HTML using GitHub's open-source Markup library.\napplication/vnd.github.object+json: Returns the contents in a consistent object format regardless of the content type. For example, instead of an array of objects for a directory, the response will be an object with an entries attribute containing the array of objects.\n\nIf the content is a directory: The response will be an array of objects, one object for each item in the directory.\nIf the content is a symlink and the symlink's target is a normal file in the repository, then the API responds with the content of the file. Otherwise, the API responds with an object describing the symlink itself.\nIf the content is a submodule, the submodule_git_url field identifies the location of the submodule repository, and the sha identifies a specific commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out the submodule at that specific commit. If the submodule repository is not hosted on github.com, the Git URLs (git_url and _links[\"git\"]) and the github.com URLs (html_url and _links[\"html\"]) will have null values.\nNotes:\n\nTo get a repository's contents recursively, you can recursively get the tree.\nThis API has an upper limit of 1,000 files for a directory. If you need to retrieve\nmore files, use the Git Trees API.\nDownload URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.\nIf the requested file's size is:\n\n1 MB or smaller: All features of this endpoint are supported.\nBetween 1-100 MB: Only the raw or object custom media types are supported. Both will work as normal, except that when using the object media type, the content field will be an empty\nstring and the encoding field will be \"none\". To get the contents of these larger files, use the raw media type.\nGreater than 100 MB: This endpoint is not supported.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\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- **`path`** (string) (required)\n  path parameter\n\n- **`ref`** (string)\n  The name of the commit/branch/tag. Default: the repository’s default branch.\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **200** - OK\n\n\n- **302** - Found\n\n\n- **304** - Not modified\n\n\n- **403** - Forbidden\n\n\n- **404** - Resource not found\n\n\n\n\n### Code examples\n\n\n\n#### Content is a file using the object media type\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/contents/PATH\n```\n\n**Response schema (Status: 200):**\n\n* `type`: required, string\n* `size`: required, integer\n* `name`: required, string\n* `path`: required, string\n* `sha`: required, string\n* `content`: string\n* `url`: required, string, format: uri\n* `git_url`: required, string or null, format: uri\n* `html_url`: required, string or null, format: uri\n* `download_url`: required, string or null, format: uri\n* `entries`: array of objects:\n  * `type`: required, string\n  * `size`: required, integer\n  * `name`: required, string\n  * `path`: required, string\n  * `sha`: required, string\n  * `url`: required, string, format: uri\n  * `git_url`: required, string or null, format: uri\n  * `html_url`: required, string or null, format: uri\n  * `download_url`: required, string or null, format: uri\n  * `_links`: required, object:\n    * `git`: required, string or null, format: uri\n    * `html`: required, string or null, format: uri\n    * `self`: required, string, format: uri\n* `encoding`: string\n* `_links`: required, object:\n  * `git`: required, string or null, format: uri\n  * `html`: required, string or null, format: uri\n  * `self`: required, string, format: uri\n\n\n\n#### Content is a directory using the object media type\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/contents/PATH\n```\n\n**Response schema (Status: 200):**\n\n* `type`: required, string\n* `size`: required, integer\n* `name`: required, string\n* `path`: required, string\n* `sha`: required, string\n* `content`: string\n* `url`: required, string, format: uri\n* `git_url`: required, string or null, format: uri\n* `html_url`: required, string or null, format: uri\n* `download_url`: required, string or null, format: uri\n* `entries`: array of objects:\n  * `type`: required, string\n  * `size`: required, integer\n  * `name`: required, string\n  * `path`: required, string\n  * `sha`: required, string\n  * `url`: required, string, format: uri\n  * `git_url`: required, string or null, format: uri\n  * `html_url`: required, string or null, format: uri\n  * `download_url`: required, string or null, format: uri\n  * `_links`: required, object:\n    * `git`: required, string or null, format: uri\n    * `html`: required, string or null, format: uri\n    * `self`: required, string, format: uri\n* `encoding`: string\n* `_links`: required, object:\n  * `git`: required, string or null, format: uri\n  * `html`: required, string or null, format: uri\n  * `self`: required, string, format: uri\n\n\n\n#### Content is a file\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/contents/PATH\n```\n\n**Response schema (Status: 200):**\n\n* one of:\n  * **Content Directory**\n  * **Content File**\n    * `type`: required, string, enum: `file`\n    * `encoding`: required, string\n    * `size`: required, integer\n    * `name`: required, string\n    * `path`: required, string\n    * `content`: required, string\n    * `sha`: required, string\n    * `url`: required, string, format: uri\n    * `git_url`: required, string or null, format: uri\n    * `html_url`: required, string or null, format: uri\n    * `download_url`: required, string or null, format: uri\n    * `_links`: required, object:\n      * `git`: required, string or null, format: uri\n      * `html`: required, string or null, format: uri\n      * `self`: required, string, format: uri\n    * `target`: string\n    * `submodule_git_url`: string\n  * **Symlink Content**\n    * `type`: required, string, enum: `symlink`\n    * `target`: required, string\n    * `size`: required, integer\n    * `name`: required, string\n    * `path`: required, string\n    * `sha`: required, string\n    * `url`: required, string, format: uri\n    * `git_url`: required, string or null, format: uri\n    * `html_url`: required, string or null, format: uri\n    * `download_url`: required, string or null, format: uri\n    * `_links`: required, object:\n      * `git`: required, string or null, format: uri\n      * `html`: required, string or null, format: uri\n      * `self`: required, string, format: uri\n  * **Submodule Content**\n    * `type`: required, string, enum: `submodule`\n    * `submodule_git_url`: required, string, format: uri\n    * `size`: required, integer\n    * `name`: required, string\n    * `path`: required, string\n    * `sha`: required, string\n    * `url`: required, string, format: uri\n    * `git_url`: required, string or null, format: uri\n    * `html_url`: required, string or null, format: uri\n    * `download_url`: required, string or null, format: uri\n    * `_links`: required, object:\n      * `git`: required, string or null, format: uri\n      * `html`: required, string or null, format: uri\n      * `self`: required, string, format: uri\n\n\n\n#### Content is a directory\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/contents/PATH\n```\n\n**Response schema (Status: 200):**\n\n* one of:\n  * **Content Directory**\n  * **Content File**\n    * `type`: required, string, enum: `file`\n    * `encoding`: required, string\n    * `size`: required, integer\n    * `name`: required, string\n    * `path`: required, string\n    * `content`: required, string\n    * `sha`: required, string\n    * `url`: required, string, format: uri\n    * `git_url`: required, string or null, format: uri\n    * `html_url`: required, string or null, format: uri\n    * `download_url`: required, string or null, format: uri\n    * `_links`: required, object:\n      * `git`: required, string or null, format: uri\n      * `html`: required, string or null, format: uri\n      * `self`: required, string, format: uri\n    * `target`: string\n    * `submodule_git_url`: string\n  * **Symlink Content**\n    * `type`: required, string, enum: `symlink`\n    * `target`: required, string\n    * `size`: required, integer\n    * `name`: required, string\n    * `path`: required, string\n    * `sha`: required, string\n    * `url`: required, string, format: uri\n    * `git_url`: required, string or null, format: uri\n    * `html_url`: required, string or null, format: uri\n    * `download_url`: required, string or null, format: uri\n    * `_links`: required, object:\n      * `git`: required, string or null, format: uri\n      * `html`: required, string or null, format: uri\n      * `self`: required, string, format: uri\n  * **Submodule Content**\n    * `type`: required, string, enum: `submodule`\n    * `submodule_git_url`: required, string, format: uri\n    * `size`: required, integer\n    * `name`: required, string\n    * `path`: required, string\n    * `sha`: required, string\n    * `url`: required, string, format: uri\n    * `git_url`: required, string or null, format: uri\n    * `html_url`: required, string or null, format: uri\n    * `download_url`: required, string or null, format: uri\n    * `_links`: required, object:\n      * `git`: required, string or null, format: uri\n      * `html`: required, string or null, format: uri\n      * `self`: required, string, format: uri\n\n\n\n#### Content is a symlink\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/contents/PATH\n```\n\n**Response schema (Status: 200):**\n\n* one of:\n  * **Content Directory**\n  * **Content File**\n    * `type`: required, string, enum: `file`\n    * `encoding`: required, string\n    * `size`: required, integer\n    * `name`: required, string\n    * `path`: required, string\n    * `content`: required, string\n    * `sha`: required, string\n    * `url`: required, string, format: uri\n    * `git_url`: required, string or null, format: uri\n    * `html_url`: required, string or null, format: uri\n    * `download_url`: required, string or null, format: uri\n    * `_links`: required, object:\n      * `git`: required, string or null, format: uri\n      * `html`: required, string or null, format: uri\n      * `self`: required, string, format: uri\n    * `target`: string\n    * `submodule_git_url`: string\n  * **Symlink Content**\n    * `type`: required, string, enum: `symlink`\n    * `target`: required, string\n    * `size`: required, integer\n    * `name`: required, string\n    * `path`: required, string\n    * `sha`: required, string\n    * `url`: required, string, format: uri\n    * `git_url`: required, string or null, format: uri\n    * `html_url`: required, string or null, format: uri\n    * `download_url`: required, string or null, format: uri\n    * `_links`: required, object:\n      * `git`: required, string or null, format: uri\n      * `html`: required, string or null, format: uri\n      * `self`: required, string, format: uri\n  * **Submodule Content**\n    * `type`: required, string, enum: `submodule`\n    * `submodule_git_url`: required, string, format: uri\n    * `size`: required, integer\n    * `name`: required, string\n    * `path`: required, string\n    * `sha`: required, string\n    * `url`: required, string, format: uri\n    * `git_url`: required, string or null, format: uri\n    * `html_url`: required, string or null, format: uri\n    * `download_url`: required, string or null, format: uri\n    * `_links`: required, object:\n      * `git`: required, string or null, format: uri\n      * `html`: required, string or null, format: uri\n      * `self`: required, string, format: uri\n\n\n\n#### Content is a submodule\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/contents/PATH\n```\n\n**Response schema (Status: 200):**\n\n* one of:\n  * **Content Directory**\n  * **Content File**\n    * `type`: required, string, enum: `file`\n    * `encoding`: required, string\n    * `size`: required, integer\n    * `name`: required, string\n    * `path`: required, string\n    * `content`: required, string\n    * `sha`: required, string\n    * `url`: required, string, format: uri\n    * `git_url`: required, string or null, format: uri\n    * `html_url`: required, string or null, format: uri\n    * `download_url`: required, string or null, format: uri\n    * `_links`: required, object:\n      * `git`: required, string or null, format: uri\n      * `html`: required, string or null, format: uri\n      * `self`: required, string, format: uri\n    * `target`: string\n    * `submodule_git_url`: string\n  * **Symlink Content**\n    * `type`: required, string, enum: `symlink`\n    * `target`: required, string\n    * `size`: required, integer\n    * `name`: required, string\n    * `path`: required, string\n    * `sha`: required, string\n    * `url`: required, string, format: uri\n    * `git_url`: required, string or null, format: uri\n    * `html_url`: required, string or null, format: uri\n    * `download_url`: required, string or null, format: uri\n    * `_links`: required, object:\n      * `git`: required, string or null, format: uri\n      * `html`: required, string or null, format: uri\n      * `self`: required, string, format: uri\n  * **Submodule Content**\n    * `type`: required, string, enum: `submodule`\n    * `submodule_git_url`: required, string, format: uri\n    * `size`: required, integer\n    * `name`: required, string\n    * `path`: required, string\n    * `sha`: required, string\n    * `url`: required, string, format: uri\n    * `git_url`: required, string or null, format: uri\n    * `html_url`: required, string or null, format: uri\n    * `download_url`: required, string or null, format: uri\n    * `_links`: required, object:\n      * `git`: required, string or null, format: uri\n      * `html`: required, string or null, format: uri\n      * `self`: required, string, format: uri\n\n\n\n\n\n## Create or update file contents\n\n```\nPUT /repos/{owner}/{repo}/contents/{path}\n```\n\nCreates a new file or replaces an existing file in a repository.\nNote\n\nIf you use this endpoint and the \"Delete a file\" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead.\n\nOAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint. The workflow scope is also required in order to modify files in the .github/workflows directory.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\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- **`path`** (string) (required)\n  path parameter\n\n\n\n\n#### Body parameters\n\n- **`message`** (string) (required)\n  The commit message.\n\n- **`content`** (string) (required)\n  The new file content, using Base64 encoding.\n\n- **`sha`** (string)\n  Required if you are updating a file. The blob SHA of the file being replaced.\n\n- **`branch`** (string)\n  The branch name. Default: the repository’s default branch.\n\n- **`committer`** (object)\n  The person that committed the file. Default: the authenticated user.\n  - **`name`** (string) (required)\n    The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.\n  - **`email`** (string) (required)\n    The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.\n  - **`date`** (string)\n\n- **`author`** (object)\n  The author of the file. Default: The committer or the authenticated user if you omit committer.\n  - **`name`** (string) (required)\n    The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.\n  - **`email`** (string) (required)\n    The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.\n  - **`date`** (string)\n\n\n\n\n\n### HTTP response status codes\n\n\n- **200** - OK\n\n\n- **201** - Created\n\n\n- **404** - Resource not found\n\n\n- **409** - Conflict\n\n\n- **422** - Validation failed, or the endpoint has been spammed.\n\n\n\n\n### Code examples\n\n\n\n#### Example for creating a file\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PUT \\\n  https://api.github.com/repos/OWNER/REPO/contents/PATH \\\n  -d '{\n  \"message\": \"my commit message\",\n  \"committer\": {\n    \"name\": \"Monalisa Octocat\",\n    \"email\": \"octocat@github.com\"\n  },\n  \"content\": \"bXkgbmV3IGZpbGUgY29udGVudHM=\"\n}'\n```\n\n**Response schema (Status: 201):**\n\n* `content`: required, object or null:\n  * `name`: string\n  * `path`: string\n  * `sha`: string\n  * `size`: integer\n  * `url`: string\n  * `html_url`: string\n  * `git_url`: string\n  * `download_url`: string\n  * `type`: string\n  * `_links`: object:\n    * `self`: string\n    * `git`: string\n    * `html`: string\n* `commit`: required, object:\n  * `sha`: string\n  * `node_id`: string\n  * `url`: string\n  * `html_url`: string\n  * `author`: object:\n    * `date`: string\n    * `name`: string\n    * `email`: string\n  * `committer`: object:\n    * `date`: string\n    * `name`: string\n    * `email`: string\n  * `message`: string\n  * `tree`: object:\n    * `url`: string\n    * `sha`: string\n  * `parents`: array of objects:\n    * `url`: string\n    * `html_url`: string\n    * `sha`: string\n  * `verification`: object:\n    * `verified`: boolean\n    * `reason`: string\n    * `signature`: string or null\n    * `payload`: string or null\n    * `verified_at`: string or null\n\n\n\n#### Example for updating a file\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PUT \\\n  https://api.github.com/repos/OWNER/REPO/contents/PATH \\\n  -d '{\n  \"message\": \"a new commit message\",\n  \"committer\": {\n    \"name\": \"Monalisa Octocat\",\n    \"email\": \"octocat@github.com\"\n  },\n  \"content\": \"bXkgdXBkYXRlZCBmaWxlIGNvbnRlbnRz\",\n  \"sha\": \"95b966ae1c166bd92f8ae7d1c313e738c731dfc3\"\n}'\n```\n\n**Response schema (Status: 200):**\n\n* `content`: required, object or null:\n  * `name`: string\n  * `path`: string\n  * `sha`: string\n  * `size`: integer\n  * `url`: string\n  * `html_url`: string\n  * `git_url`: string\n  * `download_url`: string\n  * `type`: string\n  * `_links`: object:\n    * `self`: string\n    * `git`: string\n    * `html`: string\n* `commit`: required, object:\n  * `sha`: string\n  * `node_id`: string\n  * `url`: string\n  * `html_url`: string\n  * `author`: object:\n    * `date`: string\n    * `name`: string\n    * `email`: string\n  * `committer`: object:\n    * `date`: string\n    * `name`: string\n    * `email`: string\n  * `message`: string\n  * `tree`: object:\n    * `url`: string\n    * `sha`: string\n  * `parents`: array of objects:\n    * `url`: string\n    * `html_url`: string\n    * `sha`: string\n  * `verification`: object:\n    * `verified`: boolean\n    * `reason`: string\n    * `signature`: string or null\n    * `payload`: string or null\n    * `verified_at`: string or null\n\n\n\n\n\n## Delete a file\n\n```\nDELETE /repos/{owner}/{repo}/contents/{path}\n```\n\nDeletes a file in a repository.\nYou can provide an additional committer parameter, which is an object containing information about the committer. Or, you can provide an author parameter, which is an object containing information about the author.\nThe author section is optional and is filled in with the committer information if omitted. If the committer information is omitted, the authenticated user's information is used.\nYou must provide values for both name and email, whether you choose to use author or committer. Otherwise, you'll receive a 422 status code.\nNote\n\nIf you use this endpoint and the \"Create or update file contents\" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\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- **`path`** (string) (required)\n  path parameter\n\n\n\n\n#### Body parameters\n\n- **`message`** (string) (required)\n  The commit message.\n\n- **`sha`** (string) (required)\n  The blob SHA of the file being deleted.\n\n- **`branch`** (string)\n  The branch name. Default: the repository’s default branch\n\n- **`committer`** (object)\n  object containing information about the committer.\n  - **`name`** (string)\n    The name of the author (or committer) of the commit\n  - **`email`** (string)\n    The email of the author (or committer) of the commit\n\n- **`author`** (object)\n  object containing information about the author.\n  - **`name`** (string)\n    The name of the author (or committer) of the commit\n  - **`email`** (string)\n    The email of the author (or committer) of the commit\n\n\n\n\n\n### HTTP response status codes\n\n\n- **200** - OK\n\n\n- **404** - Resource not found\n\n\n- **409** - Conflict\n\n\n- **422** - Validation failed, or the endpoint has been spammed.\n\n\n- **503** - Service unavailable\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/repos/OWNER/REPO/contents/PATH \\\n  -d '{\n  \"message\": \"my commit message\",\n  \"committer\": {\n    \"name\": \"Monalisa Octocat\",\n    \"email\": \"octocat@github.com\"\n  },\n  \"sha\": \"329688480d39049927147c162b9d2deaf885005f\"\n}'\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [Create or update file contents](#create-or-update-file-contents).\n\n\n\n\n\n## Get a repository README\n\n```\nGET /repos/{owner}/{repo}/readme\n```\n\nGets the preferred README for a repository.\nThis endpoint supports the following custom media types. For more information, see \"Media types.\"\n\napplication/vnd.github.raw+json: Returns the raw file contents. This is the default if you do not specify a media type.\napplication/vnd.github.html+json: Returns the README in HTML. Markup languages are rendered to HTML using GitHub's open-source Markup library.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\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- **`ref`** (string)\n  The name of the commit/branch/tag. Default: the repository’s default branch.\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **200** - OK\n\n\n- **304** - Not modified\n\n\n- **404** - Resource not found\n\n\n- **422** - Validation failed, or the endpoint has been spammed.\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/readme\n```\n\n**Response schema (Status: 200):**\n\n* `type`: required, string, enum: `file`\n* `encoding`: required, string\n* `size`: required, integer\n* `name`: required, string\n* `path`: required, string\n* `content`: required, string\n* `sha`: required, string\n* `url`: required, string, format: uri\n* `git_url`: required, string or null, format: uri\n* `html_url`: required, string or null, format: uri\n* `download_url`: required, string or null, format: uri\n* `_links`: required, object:\n  * `git`: required, string or null, format: uri\n  * `html`: required, string or null, format: uri\n  * `self`: required, string, format: uri\n* `target`: string\n* `submodule_git_url`: string\n\n\n\n\n\n## Get a repository README for a directory\n\n```\nGET /repos/{owner}/{repo}/readme/{dir}\n```\n\nGets the README from a repository directory.\nThis endpoint supports the following custom media types. For more information, see \"Media types.\"\n\napplication/vnd.github.raw+json: Returns the raw file contents. This is the default if you do not specify a media type.\napplication/vnd.github.html+json: Returns the README in HTML. Markup languages are rendered to HTML using GitHub's open-source Markup library.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\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- **`dir`** (string) (required)\n  The alternate path to look for a README file\n\n- **`ref`** (string)\n  The name of the commit/branch/tag. Default: the repository’s default branch.\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **200** - OK\n\n\n- **404** - Resource not found\n\n\n- **422** - Validation failed, or the endpoint has been spammed.\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/readme/DIR\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [Get a repository README](#get-a-repository-readme).\n\n\n\n\n\n## Download a repository archive (tar)\n\n```\nGET /repos/{owner}/{repo}/tarball/{ref}\n```\n\nGets a redirect URL to download a tar archive for a repository. If you omit :ref, the repository’s default branch (usually\nmain) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use\nthe Location header to make a second GET request.\nNote\n\nFor private repositories, these links are temporary and expire after five minutes.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\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- **`ref`** (string) (required)\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **302** - Found\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/tarball/REF\n```\n\n**Response schema (Status: 302):**\n\n\n\n\n\n## Download a repository archive (zip)\n\n```\nGET /repos/{owner}/{repo}/zipball/{ref}\n```\n\nGets a redirect URL to download a zip archive for a repository. If you omit :ref, the repository’s default branch (usually\nmain) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use\nthe Location header to make a second GET request.\nNote\n\nFor private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\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- **`ref`** (string) (required)\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **302** - Found\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/zipball/REF\n```\n\n**Response schema (Status: 302):**"}