Schemas

A repository's README as its author wrote it: the markdown (or other markup) text, its format, path and links.

Endpoints

1 endpoint returns readmes on GitHub.

Schema

Every endpoint above returns this object as data. The standard meta comes with every response.

platformstring

Platform that hosts the repository.

repositoryobject

The repository the README belongs to: its full name and page, and its ID when the platform's answer gives it.

ShowHide 3 child fields
idstringnullable

Platform-native repository ID, as Repository.id; null when the platform names the repository without it.

full_namestring

Owner and name as in its link (torvalds/linux).

urlstring uri

Canonical repository page URL.

urlstring uri

The README's page on the platform: the file's own page, or the repository's page where the README has none.

raw_urlstring urinullable

Link to the file itself, unrendered, that works without a login; null when the platform serves none.

pathstringnullable

The file's path from the repository's root (README.md, docs/README.rst); its last segment is the file's name. Null when the platform does not say which file it is.

refstringnullable

The branch or tag the README was read at (GitHub: the default branch, master or main); null when the platform does not say.

formatstringnullable

The markup the text is written in, which decides how to render it: markdown, rst (reStructuredText), asciidoc, org, text (plain), other. Null when the platform does not say. New values may be added.

One ofmarkdownrstasciidocorgtextother

textstringnullable

The README's full text as written, in its markup (not rendered to HTML), front matter included; null when the file is empty.

platform_specificobject

Fields only this platform has, under its ID (platform_specific.<platform>); each null when unknown.

approximate_fieldsstring[]

JSON paths of values the platform rounds; a README has none, so always [].

unknown_fieldsstring[]

JSON paths of lists whose [] means unknown rather than none; a README has no lists, so always [].

Item errors

Besides the request-level errors every endpoint can return, readme endpoints return:

CodeHTTPRetryMeaningWhat to do
not_found404NoThe item does not exist or was deleted. On GET /v1/requests/{id}/response: the response was not kept (details.reason says why).Check the link or ID. Do not retry.
private_or_unavailable403NoThe item exists but is not public: it is private, age- or region-restricted, or needs a login to view. It shares 403 with forbidden (which is about the key), so branch on the code.Only public items can be fetched. Do not retry.
no_readme404NoThe repository exists but has no README: no file the platform shows as its README.Do not retry. Fetch the repository itself for its description.

Last updated