# Get a gist

From **GitHub v3 REST API**.

`GET /gists/{gist_id}`

Get a gist

## Parameters

### `gist_id`

- Location: path
- Required: true
- Type: `string`

gist_id parameter

## Responses

### `200`

Response

### `application/json`

- Type: `object`

Gist Simple

```json
{
  "comments": 0,
  "comments_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/comments/",
  "commits_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/commits",
  "created_at": "2010-04-14T02:15:15Z",
  "description": "Hello World Examples",
  "forks_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/forks",
  "git_pull_url": "https://gist.github.com/aa5a315d61ae9438b18d.git",
  "git_push_url": "https://gist.github.com/aa5a315d61ae9438b18d.git",
  "html_url": "https://gist.github.com/aa5a315d61ae9438b18d",
  "id": "aa5a315d61ae9438b18d",
  "node_id": "MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk",
  "updated_at": "2011-06-20T11:34:15Z",
  "url": "https://api.github.com/gists/aa5a315d61ae9438b18d"
}
```

```json
{"description":"Gist Simple","properties":{"comments":{"type":"integer"},"comments_url":{"type":"string"},"commits_url":{"type":"string"},"created_at":{"type":"string"},"description":{"nullable":true,"type":"string"},"files":{"additionalProperties":{"nullable":true,"properties":{"content":{"type":"string"},"filename":{"type":"string"},"language":{"type":"string"},"raw_url":{"type":"string"},"size":{"type":"integer"},"truncated":{"type":"boolean"},"type":{"type":"string"}},"type":"object"},"type":"object"},"fork_of":{"description":"Gist","nullable":true,"properties":{"comments":{"type":"integer"},"comments_url":{"format":"uri","type":"string"},"commits_url":{"format":"uri","type":"string"},"created_at":{"format":"date-time","type":"string"},"description":{"nullable":true,"type":"string"},"files":{"additionalProperties":{"properties":{"filename":{"type":"string"},"language":{"type":"string"},"raw_url":{"type":"string"},"size":{"type":"integer"},"type":{"type":"string"}},"type":"object"},"type":"object"},"forks":{"items":{},"type":"array"},"forks_url":{"format":"uri","type":"string"},"git_pull_url":{"format":"uri","type":"string"},"git_push_url":{"format":"uri","type":"string"},"history":{"items":{},"type":"array"},"html_url":{"format":"uri","type":"string"},"id":{"type":"string"},"node_id":{"type":"string"},"owner":{"$ref":"#/components/schemas/nullable-simple-user"},"public":{"type":"boolean"},"truncated":{"type":"boolean"},"updated_at":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"},"user":{"$ref":"#/components/schemas/nullable-simple-user"}},"required":["id","node_id","url","forks_url","commits_url","git_pull_url","git_push_url","html_url","comments_url","public","description","comments","user","files","created_at","updated_at"],"title":"Gist","type":"object"},"forks":{"deprecated":true,"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"},"user":{"$ref":"#/components/schemas/public-user"}},"type":"object"},"nullable":true,"type":"array"},"forks_url":{"type":"string"},"git_pull_url":{"type":"string"},"git_push_url":{"type":"string"},"history":{"deprecated":true,"items":{"$ref":"#/components/schemas/gist-history"},"nullable":true,"type":"array"},"html_url":{"type":"string"},"id":{"type":"string"},"node_id":{"type":"string"},"owner":{"$ref":"#/components/schemas/simple-user"},"public":{"type":"boolean"},"truncated":{"type":"boolean"},"updated_at":{"type":"string"},"url":{"type":"string"},"user":{"nullable":true,"type":"string"}},"title":"Gist Simple","type":"object"}
```

### `304`

Not modified

### `403`

Forbidden Gist

### `application/json`

- Type: `object`

```json
{"properties":{"block":{"properties":{"created_at":{"type":"string"},"html_url":{"nullable":true,"type":"string"},"reason":{"type":"string"}},"type":"object"},"documentation_url":{"type":"string"},"message":{"type":"string"}},"type":"object"}
```

### `404`

Resource not found

### `application/json`

- Type: `object`

Basic Error

```json
{"description":"Basic Error","properties":{"documentation_url":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"title":"Basic Error","type":"object"}
```

## Request examples

### cURL

```shell
curl --request GET \
  --url {protocol}://{hostname}/api/v3/gists/{gist_id}
```
