Query
Variables
Headers
Response
1query GetDeployments ($limit: Int = 5) {
2 deployments($limit) {
3 id
4 name
5 url
6 status
7 createdAt
8 repository {
9 name
10 branches
11 }
12 }
13}
1{
2 "limit": 5,
3 "repositoryId": "repo_8x92k1m3",
4 "env": "production"
5}
1{
2 "Authorization": "Bearer <your_api_key>",
3 "Content-Type": "application/json",
4 "X-.git-Version": "2025-04"
5}
HTTP 200 Duration: --ms Size: --B
{\n "data": {\n "deployments": [\n {\n "id": "dep_9a2b3c4d",\n "name": "main",\n "url": "https://app.git.dev/prod",\n "status": "SUCCESS",\n "createdAt": "2025-06-15T10:32:00Z",\n "repository": {\n "name": "core-platform",\n "branches": ["main", "develop", "staging"]\n }\n },\n {\n "id": "dep_1e5f6g7h",\n "name": "feature/auth",\n "url": "https://app.git.dev/preview/124",\n "status": "PENDING",\n "createdAt": "2025-06-15T11:15:00Z",\n "repository": {\n "name": "core-platform",\n "branches": ["main", "develop", "staging"]\n }\n }\n ]\n }\n}

🔑 Authentication

All requests require an API key via the Authorization header. Keys are scoped to organizations and can be restricted by environment.

curl https://api.git.dev/graphql \ -H 'Authorization: Bearer sk_live_***' \ -H 'Content-Type: application/json'

📄 Pagination & Filters

Use cursor-based pagination with first and after. Filter deployments by status, branch, or date range.

query {\n deployments(first: 10, after: "YXJyYXk=", status: SUCCESS) {\n edges { node { id url } }\n pageInfo { hasNextPage endCursor }\n }\n}

🔄 Real-time Subscriptions

Subscribe to deployment lifecycle events via WebSocket. Automatically notify your CI/CD pipelines on status changes.

subscription {\n deploymentChanged(repoId: "repo_abc") {\n id status url commitHash\n }\n}

⚡ Mutations

Trigger deployments, rollbacks, and configuration updates directly through the API. Idempotency keys prevent duplicate actions.

mutation {\n createDeployment(\n repoId: "repo_abc",\n branch: "main",\n env: "production",\n idempotencyKey: "txn_9921"\n ) {\n id status url\n }\n}