GET /repos/{owner}/{repo}/license
Operation ID: licenses/get-for-repo
Auth: bearer_token
Description
This method returns the contents of the repository's license file, if one is detected. This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." - **`application/vnd.github.raw+json`**: Returns the raw contents of the license. - **`application/vnd.github.html+json`**: Returns the license contents in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup).
Parameters (3)
(string, path, required)
The account owner of the repository. The name is not case sensitive.
(?, query, optional)
The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`.
(string, path, required)
The name of the repository without the `.git` extension. The name is not case sensitive.
No probe data for this endpoint yet.