---
agentTools:
  projectIndex: https://docs.rollbar.com/llms.txt
---

# Get a deploy

`deploy_id` must be an ID for a deploy in the project. These IDs are returned as the id field in other API calls, and can be found in the Rollbar UI on URLs like `https://rollbar.com/deploy/12345/` (`12345` is the Deploy ID).

# OpenAPI definition

````json
{
  "openapi": "3.1.0",
  "servers": [
    {
      "url": "https://api.rollbar.com"
    }
  ],
  "tags": [
    {
      "name": "Occurrence"
    },
    {
      "name": "Deploy"
    }
  ],
  "info": {
    "title": "Rollbar API",
    "version": "1.0",
    "description": "# Getting Started\nThe Rollbar API provides a RESTful interface to much of the data in the\nsystem. It is used by our official libraries to report exceptions,\ndeploys, and other messages. It can be used to create notifiers for\nadditional languages, get data out to integrate with other systems, or\nwhatever else you can imagine. If the API is missing something you'd\nlike to see, please [let us know](support@rollbar.com).\n\n# Ping\nTo test whether you're able to ping the API server, you can simply run the\nfollowing command:\n\n```\ncurl 'https://api.rollbar.com/api/1/status/ping'\n```\n\nYou will get back pong from our server if your request was successful.\n\n# Timestamps\nAll timestamps (inputs and outputs) are GMT unix timestamps.\n\n# Authentication\nAuthentication is done via access token included as a header parameter. For authenticated requests, pass your access token\nthrough the `X-Rollbar-Access-Token` parameter in the header.\n\n```\ncurl -H \"X-Rollbar-Access-Token: YOUR_ACCESS_TOKEN\" 'https://api.rollbar.com/api/1/item/12345'\n```\n\n## Project access tokens\nMany operations require a project-specific access token. You can find and administer your\naccess tokens in Settings -> Project Access Tokens. Access tokens can have any or\nall of the following scopes:\n\n### post_server_item\nCan perform all POST requests to /deploy/ and /item/. Can also be used to upload source maps (JS, proguard, dSym, flutter)\n\n### post_client_item\nCan perform POST requests to /item/, but only if the item has a client-side platform (browser, mobile)\n\n### read\nCan perform all GET requests\n\n### write\nCan perform PATCH and DELETE requests\n\n## Account Access Tokens\nOperations performed at the level of the account require an account-specific\naccess token. These can be found and managed at\n{Account name} Settings -> Account Access Tokens.\nAccount access tokens can have the following scopes:\n\n### read\nSupports all GET operations at the account level.\n\n### write\nSupports all POST, PUT, PATCH, and DELETE operations at the account level.\n\n# HTTP responses\nThe API can return the following HTTP response codes:\n\n### 200\tOK\nOperation was completed successfully\n\n### 400\tBad request\nThe request was malformed and could not be parsed.\n\n### 403\tAccess denied\nAccess token was missing, invalid, or does not have the necessary permissions.\n\n### 404\tNot found\nThe requested resource was not found. This response will be returned if the URL is entirely invalid (i.e. /asdf), or if it is a URL that could be valid but is referencing something that does not exist (i.e. /item/12345).\n\n### 413\tRequest entity too large\nThe request exceeded the maximum size of 128KB.\n\n### 422\tUnprocessable Entity\nThe request was parseable (i.e. valid JSON), but some parameters were missing or otherwise invalid.\n\n### 429\tToo Many Requests\nIf rate limiting is enabled for your access token, this return code signifies that\n\n# Examples\n\n### [api-examples](https://github.com/rollbar/api-examples)\nAuthor: Rollbar\n\nLanguage: Python\n\nExamples using RQL, deploys, occurrences, and reports\n\n### [api-people-example](https://github.com/rollbar/api-people-example)\nAuthor: Rollbar\n\nLanguage: Python\n\nShows how to gather the Person data for each occurrence of a list of items\n\n### [rolltools](https://github.com/jslate/rolltools)\nAuthor: Jonathan Slate\n\nLanguage: Ruby\n\nA few utilities using the Rollbar API\n"
  },
  "paths": {
    "/api/1/instances": {
      "get": {
        "tags": [
          "Occurrence"
        ],
        "summary": "List all occurrences in a project",
        "description": "Returns all occurrences in the project, in pages of 20. Order is descending by occurrence ID (which is approximately descending by timestamp).\n",
        "parameters": [
          {
            "name": "X-Rollbar-Access-Token",
            "in": "header",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            },
            "description": "Use a Project or Account Access Token with 'read' scope (Account tokens require a project_id to be specified)"
          },
          {
            "name": "last_id",
            "in": "query",
            "description": "Instead of using the page number, you can pass the ID of the last occurrence listed on the page and it will be return the next 20 instances after that last occurrence ID. Overrides the page number if both are present.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": null
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number, starting from 1. The default number of elements returned per page is 20. Set the limit parameter to update that.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Sets the limit for number of items returned per page. Default is 20 and the max is 5000.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "description": "Project ID, required when using an Account Access Token with this endpoint.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "err": {
                      "type": "integer",
                      "enum": [
                        0
                      ]
                    },
                    "result": {
                      "type": "object",
                      "$ref": "#/components/schemas/PaginatedOccurrenceInstances"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/1/deploy/{deploy_id}": {
      "get": {
        "tags": [
          "Deploy"
        ],
        "summary": "Get a deploy",
        "description": "`deploy_id` must be an ID for a deploy in the project. These IDs are returned as the id field in other API calls, and can be found in the Rollbar UI on URLs like `https://rollbar.com/deploy/12345/` (`12345` is the Deploy ID).\n",
        "operationId": "get-a-deploy",
        "parameters": [
          {
            "name": "deploy_id",
            "in": "path",
            "description": "System-wide id of the deploy",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "$ref": "#/paths/~1api~11~1instances/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1api~11~1instances/get/parameters/4"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "err": {
                      "type": "integer",
                      "example": 0
                    },
                    "result": {
                      "type": "object",
                      "$ref": "#/paths/~1api~11~1deploys/get/responses/200/content/application~1json/schema/properties/result/properties/deploys/items"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    },
    "/api/1/deploys": {
      "get": {
        "tags": [
          "Deploy"
        ],
        "summary": "List all deploys",
        "description": "Returns all deploys in the project, most recent first, in pages of 20.\n",
        "operationId": "list-all-deploys",
        "parameters": [
          {
            "$ref": "#/paths/~1api~11~1instances/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1api~11~1instances/get/parameters/4"
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number, starting from 1. Twenty deploys are returned per page by default.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "$ref": "#/paths/~1api~11~1instances/get/parameters/3"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "err": {
                      "type": "integer",
                      "example": 1
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "example": 1
                        },
                        "deploys": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "environment": {
                                "type": "string",
                                "description": "Environment to which the revision was deployed"
                              },
                              "revision": {
                                "type": "string",
                                "description": "Git SHA of revision being deployed"
                              },
                              "local_username": {
                                "type": "string",
                                "description": "Local username of person who deployed.  Displayed in web app if no `rollbar_username` was specified."
                              },
                              "comment": {
                                "type": "string",
                                "description": "Additional text to include with the deploy"
                              },
                              "status": {
                                "type": "string",
                                "description": "Status of the deployment - `started`, `succeeded` _(default)_, `failed`, or `timed_out`."
                              },
                              "id": {
                                "type": "integer",
                                "example": 1234567
                              },
                              "project_id": {
                                "type": "integer",
                                "example": 234321
                              },
                              "user_id": {
                                "type": "integer",
                                "description": "ID of user looked up by rollbar_username, if passed, when deploy was created."
                              },
                              "start_time": {
                                "type": "integer",
                                "description": "Timestamp of when the deploy started",
                                "example": 1659048901
                              },
                              "finish_time": {
                                "type": "integer",
                                "description": "Timestamp of when the deploy finished",
                                "example": 1659048901
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 98,
      "1": 222,
      "2": 158,
      "3": 27,
      "4": 99,
      "5": 22,
      "6": 195,
      "7": 4,
      "8": 3,
      "9": 77,
      "10": 0,
      "11": 106
    }
  }
}
````