# Конечные точки REST API для метаданных

Используйте REST API для получения мета-информации о GitHub, включая IP-адреса GitHub сервисов.

> [!NOTE]
> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2022-11-28`. Curl examples below omit these standard headers for brevity.

## GitHub API Root

```
GET /
```

Get Hypermedia links to resources accessible in GitHub's REST API

### HTTP response status codes

- **200** - OK

### Code examples

#### Example

**Request:**

```curl
curl -L \
  -X GET \
  http(s)://HOSTNAME/api/v3/
```

**Response schema (Status: 200):**

* `current_user_url`: required, string, format: uri-template
* `current_user_authorizations_html_url`: required, string, format: uri-template
* `authorizations_url`: required, string, format: uri-template
* `code_search_url`: required, string, format: uri-template
* `commit_search_url`: required, string, format: uri-template
* `emails_url`: required, string, format: uri-template
* `emojis_url`: required, string, format: uri-template
* `events_url`: required, string, format: uri-template
* `feeds_url`: required, string, format: uri-template
* `followers_url`: required, string, format: uri-template
* `following_url`: required, string, format: uri-template
* `gists_url`: required, string, format: uri-template
* `hub_url`: string, format: uri-template, deprecated
* `issue_search_url`: required, string, format: uri-template
* `issues_url`: required, string, format: uri-template
* `keys_url`: required, string, format: uri-template
* `label_search_url`: required, string, format: uri-template
* `notifications_url`: required, string, format: uri-template
* `organization_url`: required, string, format: uri-template
* `organization_repositories_url`: required, string, format: uri-template
* `organization_teams_url`: required, string, format: uri-template
* `public_gists_url`: required, string, format: uri-template
* `rate_limit_url`: required, string, format: uri-template
* `repository_url`: required, string, format: uri-template
* `repository_search_url`: required, string, format: uri-template
* `current_user_repositories_url`: required, string, format: uri-template
* `starred_url`: required, string, format: uri-template
* `starred_gists_url`: required, string, format: uri-template
* `topic_search_url`: string, format: uri-template
* `user_url`: required, string, format: uri-template
* `user_organizations_url`: required, string, format: uri-template
* `user_repositories_url`: required, string, format: uri-template
* `user_search_url`: required, string, format: uri-template

## Get GitHub Enterprise Server meta information

```
GET /meta
```

### HTTP response status codes

- **200** - OK

- **304** - Not modified

### Code examples

#### Example

**Request:**

```curl
curl -L \
  -X GET \
  http(s)://HOSTNAME/api/v3/meta
```

**Response schema (Status: 200):**

* `verifiable_password_authentication`: required, boolean
* `packages`: array of string
* `domains`: object:
  * `website`: array of string
  * `codespaces`: array of string
  * `copilot`: array of string
  * `packages`: array of string
  * `actions`: array of string
  * `actions_inbound`: object:
    * `full_domains`: array of string
    * `wildcard_domains`: array of string
  * `artifact_attestations`: object:
    * `trust_domain`: string
    * `services`: array of string
* `installed_version`: string

## Get Octocat

```
GET /octocat
```

Get the octocat as ASCII art

### Parameters

#### Headers

- **`accept`** (string)
  Setting to `application/vnd.github+json` is recommended.

#### Path and query parameters

- **`s`** (string)
  The words to show in Octocat's speech bubble

### HTTP response status codes

- **200** - OK

### Code examples

#### Example

**Request:**

```curl
curl -L \
  -X GET \
  http(s)://HOSTNAME/api/v3/octocat
```

**Response schema (Status: 200):**

string

## Get the Zen of GitHub

```
GET /zen
```

Get a random sentence from the Zen of GitHub

### HTTP response status codes

- **200** - OK

### Code examples

#### Example

**Request:**

```curl
curl -L \
  -X GET \
  http(s)://HOSTNAME/api/v3/zen
```

**Response schema (Status: 200):**

Same response schema as [Get Octocat](#get-octocat).