1
0
mirror of synced 2026-01-06 06:02:35 -05:00
Files
docs/content/rest/repos/contents.md

1.6 KiB

title, allowTitleToDifferFromFilename, shortTitle, intro, versions, topics, autogenerated
title allowTitleToDifferFromFilename shortTitle intro versions topics autogenerated
Repository contents true Contents Use the REST API to create, modify, and delete Base64 encoded content in a repository.
fpt ghae ghec ghes
* * * *
API
rest

About repository contents

To request the raw format or rendered HTML (when supported), use custom media types for repository contents.

Custom media types for repository contents

READMEs, files, and symlinks support the following custom media types:

application/vnd.github.raw
application/vnd.github.html

Use the .raw media type to retrieve the contents of the file.

For markup files such as Markdown or AsciiDoc, you can retrieve the rendered HTML using the .html media type. Markup languages are rendered to HTML using our open-source Markup library.

All objects support the following custom media type:

application/vnd.github.object

Use the object media type parameter to retrieve 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.

You can read more about the use of media types in the API here.