# Get a deployment

From **GitHub v3 REST API**.

`GET /repos/{owner}/{repo}/deployments/{deployment_id}`

Get a deployment

## Parameters

### `owner`

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

### `repo`

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

### `deployment_id`

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

deployment_id parameter

## Responses

### `200`

Response

### `application/json`

- Type: `object`

A request for a specific ref(branch,sha,tag) to be deployed

```json
{
  "created_at": "2012-07-20T01:19:13Z",
  "creator": {
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "events_url": "https://api.github.com/users/octocat/events{/privacy}",
    "followers_url": "https://api.github.com/users/octocat/followers",
    "following_url": "https://api.github.com/users/octocat/following{/other_user}",
    "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
    "gravatar_id": "",
    "html_url": "https://github.com/octocat",
    "id": 1,
    "login": "octocat",
    "node_id": "MDQ6VXNlcjE=",
    "organizations_url": "https://api.github.com/users/octocat/orgs",
    "received_events_url": "https://api.github.com/users/octocat/received_events",
    "repos_url": "https://api.github.com/users/octocat/repos",
    "site_admin": false,
    "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
    "type": "User",
    "url": "https://api.github.com/users/octocat"
  },
  "description": "Deploy request from hubot",
  "environment": "production",
  "id": 1,
  "node_id": "MDEwOkRlcGxveW1lbnQx",
  "original_environment": "staging",
  "payload": {},
  "production_environment": true,
  "ref": "topic-branch",
  "repository_url": "https://api.github.com/repos/octocat/example",
  "sha": "a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d",
  "statuses_url": "https://api.github.com/repos/octocat/example/deployments/1/statuses",
  "task": "deploy",
  "transient_environment": false,
  "updated_at": "2012-07-20T01:19:13Z",
  "url": "https://api.github.com/repos/octocat/example/deployments/1"
}
```

```json
{"description":"A request for a specific ref(branch,sha,tag) to be deployed","properties":{"created_at":{"example":"2012-07-20T01:19:13Z","format":"date-time","type":"string"},"creator":{"$ref":"#/components/schemas/nullable-simple-user"},"description":{"example":"Deploy request from hubot","nullable":true,"type":"string"},"environment":{"description":"Name for the target deployment environment.","example":"production","type":"string"},"id":{"description":"Unique identifier of the deployment","example":42,"type":"integer"},"node_id":{"example":"MDEwOkRlcGxveW1lbnQx","type":"string"},"original_environment":{"example":"staging","type":"string"},"payload":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}]},"performed_via_github_app":{"$ref":"#/components/schemas/nullable-integration"},"production_environment":{"description":"Specifies if the given environment is one that end-users directly interact with. Default: false.","example":true,"type":"boolean"},"ref":{"description":"The ref to deploy. This can be a branch, tag, or sha.","example":"topic-branch","type":"string"},"repository_url":{"example":"https://api.github.com/repos/octocat/example","format":"uri","type":"string"},"sha":{"example":"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d","type":"string"},"statuses_url":{"example":"https://api.github.com/repos/octocat/example/deployments/1/statuses","format":"uri","type":"string"},"task":{"description":"Parameter to specify a task to execute","example":"deploy","type":"string"},"transient_environment":{"description":"Specifies if the given environment is will no longer exist at some point in the future. Default: false.","example":true,"type":"boolean"},"updated_at":{"example":"2012-07-20T01:19:13Z","format":"date-time","type":"string"},"url":{"example":"https://api.github.com/repos/octocat/example/deployments/1","format":"uri","type":"string"}},"required":["id","node_id","sha","ref","task","environment","creator","payload","description","statuses_url","repository_url","url","created_at","updated_at"],"title":"Deployment","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/repos/{owner}/{repo}/deployments/{deployment_id}
```
