# \LicensesApi All URIs are relative to *https://api.github.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**licenses_slash_get**](LicensesApi.md#licenses_slash_get) | **GET** /licenses/{license} | Get a license [**licenses_slash_get_all_commonly_used**](LicensesApi.md#licenses_slash_get_all_commonly_used) | **GET** /licenses | Get all commonly used licenses [**licenses_slash_get_for_repo**](LicensesApi.md#licenses_slash_get_for_repo) | **GET** /repos/{owner}/{repo}/license | Get the license for a repository ## licenses_slash_get > models::License licenses_slash_get(license) Get a license Gets information about a specific license. For more information, see \"[Licensing a repository ](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository).\" ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **license** | **String** | | [required] | ### Return type [**models::License**](license.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## licenses_slash_get_all_commonly_used > Vec licenses_slash_get_all_commonly_used(featured, per_page, page) Get all commonly used licenses Lists the most commonly used licenses on GitHub. For more information, see \"[Licensing a repository ](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository).\" ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **featured** | Option<**bool**> | | | **per_page** | Option<**i32**> | The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\" | |[default to 30] **page** | Option<**i32**> | The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\" | |[default to 1] ### Return type [**Vec**](license-simple.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## licenses_slash_get_for_repo > models::LicenseContent licenses_slash_get_for_repo(owner, repo, r#ref) Get the license for a repository 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 Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **owner** | **String** | The account owner of the repository. The name is not case sensitive. | [required] | **repo** | **String** | The name of the repository without the `.git` extension. The name is not case sensitive. | [required] | **r#ref** | Option<**String**> | The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. | | ### Return type [**models::LicenseContent**](license-content.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)