# Get deployment

Source: https://docs.orbytelabs.com/api-reference/deployments/getDeployment

## GET /v1/deployments/{id}

```json
{
  "operationId": "getDeployment",
  "tags": [
    "Deployments"
  ],
  "summary": "Get a deployment and its sync status",
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "parameters": [
    {
      "schema": {
        "type": "string"
      },
      "required": true,
      "name": "id",
      "in": "path"
    },
    {
      "schema": {
        "type": "string",
        "minLength": 1,
        "description": "Required for environment-scoped OAuth operations. API keys remain bound to their own environment."
      },
      "required": false,
      "description": "Required for environment-scoped OAuth operations. API keys remain bound to their own environment.",
      "name": "X-Orbyte-Environment",
      "in": "header"
    }
  ],
  "responses": {
    "200": {
      "description": "Deployment snapshot",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "environmentId": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "in_progress",
                  "ready",
                  "failed"
                ]
              },
              "error": {
                "type": "string"
              },
              "features": {
                "default": {},
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[a-z][a-z0-9_-]*$"
                },
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 3,
                      "maxLength": 128
                    },
                    "aggregation": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "sum"
                            },
                            "field": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "count"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "distinct"
                            },
                            "by": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "window": {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 9999
                                },
                                "unit": {
                                  "type": "string",
                                  "enum": [
                                    "minute",
                                    "hour",
                                    "day",
                                    "week",
                                    "month"
                                  ]
                                }
                              },
                              "required": [
                                "value",
                                "unit"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "cost": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "fixed"
                            },
                            "amount": {
                              "type": "string",
                              "pattern": "^-?(0|[1-9][0-9]*)$",
                              "maxLength": 20
                            },
                            "perUnit": {
                              "default": 1,
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "type",
                            "amount",
                            "perUnit"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "percentage"
                            },
                            "percentageBps": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 10000
                            }
                          },
                          "required": [
                            "type",
                            "percentageBps"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "markup"
                            },
                            "markupBps": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "type",
                            "markupBps"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": [
                    "name",
                    "aggregation",
                    "cost"
                  ],
                  "additionalProperties": false
                }
              },
              "plans": {
                "default": {},
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[a-z][a-z0-9_-]*$"
                },
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 3,
                      "maxLength": 128
                    },
                    "costUsdInNanos": {
                      "type": "string",
                      "pattern": "^-?(0|[1-9][0-9]*)$",
                      "maxLength": 20
                    },
                    "trialDays": {
                      "default": 0,
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "creditGrant": {
                      "type": "string",
                      "pattern": "^-?(0|[1-9][0-9]*)$",
                      "maxLength": 20
                    },
                    "rollover": {
                      "type": "object",
                      "properties": {
                        "maxCredits": {
                          "type": "string",
                          "pattern": "^-?(0|[1-9][0-9]*)$",
                          "maxLength": 20
                        },
                        "maxPercentage": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100,
                          "description": "Maximum rollover as a percentage of the period's credit grant."
                        },
                        "expiresAfterDays": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991,
                          "description": "Extra days after the paid billing period ends."
                        }
                      },
                      "required": [
                        "expiresAfterDays"
                      ],
                      "additionalProperties": false
                    },
                    "period": {
                      "type": "object",
                      "properties": {
                        "interval": {
                          "default": "MONTHLY",
                          "type": "string",
                          "enum": [
                            "YEARLY",
                            "MONTHLY",
                            "WEEKLY",
                            "DAILY"
                          ]
                        },
                        "intervalCount": {
                          "default": 1,
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "interval",
                        "intervalCount"
                      ],
                      "additionalProperties": false
                    },
                    "featureKeys": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128,
                        "pattern": "^[a-z][a-z0-9_-]*$"
                      }
                    }
                  },
                  "required": [
                    "name",
                    "costUsdInNanos",
                    "trialDays",
                    "creditGrant",
                    "period"
                  ],
                  "additionalProperties": false
                }
              },
              "grantPolicies": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[a-z][a-z0-9_-]*$"
                },
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "on": {
                      "anyOf": [
                        {
                          "type": "string",
                          "const": "customer.created"
                        }
                      ]
                    },
                    "credits": {
                      "type": "string",
                      "pattern": "^-?(0|[1-9][0-9]*)$",
                      "maxLength": 20
                    },
                    "expiresAfterDays": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "featureKeys": {
                      "minItems": 1,
                      "maxItems": 500,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128,
                        "pattern": "^[a-z][a-z0-9_-]*$"
                      }
                    }
                  },
                  "required": [
                    "on",
                    "credits"
                  ],
                  "additionalProperties": false
                }
              },
              "id": {
                "type": "string"
              },
              "createdAt": {
                "type": "number"
              }
            },
            "required": [
              "environmentId",
              "status",
              "features",
              "plans",
              "id",
              "createdAt"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "400": {
      "description": "Invalid request",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "error": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "error",
              "message"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "401": {
      "description": "Unauthorized",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "error": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "error",
              "message"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "403": {
      "description": "Insufficient permission",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "error": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "error",
              "message"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "404": {
      "description": "Resource not found",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "error": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "error",
              "message"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "409": {
      "description": "Resource or request conflict",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "error": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "error",
              "message"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "413": {
      "description": "Content too large",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "error": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "error",
              "message"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "415": {
      "description": "Unsupported media type",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "error": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "error",
              "message"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "500": {
      "description": "Unexpected server error",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "error": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "error",
              "message"
            ],
            "additionalProperties": false
          }
        }
      }
    }
  }
}
```

Complete schema: [OpenAPI 3.1 document](https://docs.orbytelabs.com/openapi.json)