Get the license for a repository
This method returns the contents of the repository's license file, if one is detected. Similar to [Get repository content](https://docs.github.com/[email protected]/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/[email protected]/rest/overview/media-types) for retrieving the raw license content or rendered license HTML.
GET
/repos/{owner}/{repo}/license- Source
github-v3-rest.json- Revision
f5f067c1e6f6- Active snapshot
85e53e3d0d65
Request
Path Parameters
- owner stringrequired
- repo stringrequired
Responses
application/json License Content object
Response
_links objectrequired
_links object
requiredgit string<uri>
requirednullable html string<uri>
requirednullable self string<uri>
requiredcontent string
requireddownload_url string<uri>
requirednullable encoding string
requiredgit_url string<uri>
requirednullable html_url string<uri>
requirednullable license License Simple objectrequirednullable License Simple
license License Simple object
requirednullable License Simple
html_url string<uri>
optionalkey string
requiredExample: mit
name string
requiredExample: MIT License
node_id string
requiredExample: MDc6TGljZW5zZW1pdA==
spdx_id string
requirednullable Example: MIT
url string<uri>
requirednullable Example: https://api.github.com/licenses/mit
name string
requiredpath string
requiredsha string
requiredsize integer
requiredtype string
requiredurl string<uri>
required