# Queries (/api/queries)



{/* AUTO-GENERATED by scripts/generate-graphql-docs.mjs from @alternatefutures/backend@0.1.2. Do not edit by hand. */}

<Callout type="info">
  Generated from the API server source (@alternatefutures/backend 0.1.2) on every merge. Endpoint
  `https://api.alternatefutures.ai/graphql`, header `Authorization: Bearer <personal access token>`.
  See the [GraphQL API overview](/api) for how to call it. Left out on purpose: provider-specific types, fields and arguments; operations of the retired hosting product (sites, IPFS storage, functions) and admin-only operations.
</Callout>

## Version [#version]

### version [#version-1]

Returns `Version!` · [Version](/api/objects#version).

## Templates [#templates]

### templates [#templates-1]

| Argument   | Type                                                                 | Description |
| ---------- | -------------------------------------------------------------------- | ----------- |
| `category` | `TemplateCategory` · [TemplateCategory](/api/enums#templatecategory) |             |

Returns `[Template!]!` · [Template](/api/objects#template).

### template [#template]

| Argument | Type  | Description |
| -------- | ----- | ----------- |
| `id`     | `ID!` |             |

Returns `Template` · [Template](/api/objects#template).

## User & auth [#user--auth]

### me [#me]

Returns `User` · [User](/api/objects#user).

### personalAccessTokens [#personalaccesstokens]

Returns `PersonalAccessTokenList!` · [PersonalAccessTokenList](/api/objects#personalaccesstokenlist).

### apiKeyRateLimit [#apikeyratelimit]

Returns `ApiKeyRateLimit!` · [ApiKeyRateLimit](/api/objects#apikeyratelimit).

## Projects [#projects]

### project [#project]

| Argument | Type  | Description |
| -------- | ----- | ----------- |
| `id`     | `ID!` |             |

Returns `Project` · [Project](/api/objects#project).

### resolveProject [#resolveproject]

Resolve an accessible project by exact ID, name, or slug; ambiguous names/slugs fail closed.

| Argument | Type      | Description |
| -------- | --------- | ----------- |
| `ref`    | `String!` |             |

Returns `Project` · [Project](/api/objects#project).

### projects [#projects-1]

Returns `ProjectList!` · [ProjectList](/api/objects#projectlist).

## Service registry [#service-registry]

### serviceRegistry [#serviceregistry]

| Argument    | Type | Description |
| ----------- | ---- | ----------- |
| `projectId` | `ID` |             |

Returns `[Service!]!` · [Service](/api/objects#service).

## Workspace metrics (aggregated compute, storage, traffic) [#workspace-metrics-aggregated-compute-storage-traffic]

### workspaceMetrics [#workspacemetrics]

| Argument    | Type | Description |
| ----------- | ---- | ----------- |
| `projectId` | `ID` |             |

Returns `WorkspaceMetrics!` · [WorkspaceMetrics](/api/objects#workspacemetrics).

## Unified deployments (all deployment types across all services) [#unified-deployments-all-deployment-types-across-all-services]

### allDeployments [#alldeployments]

| Argument    | Type  | Description |
| ----------- | ----- | ----------- |
| `projectId` | `ID`  |             |
| `limit`     | `Int` |             |

Returns `[UnifiedDeployment!]!` · [UnifiedDeployment](/api/objects#unifieddeployment).

## System health [#system-health]

### subscriptionHealth [#subscriptionhealth]

Returns `SubscriptionHealth!` · [SubscriptionHealth](/api/objects#subscriptionhealth).

## Agent chat [#agent-chat]

### agent [#agent]

| Argument | Type  | Description |
| -------- | ----- | ----------- |
| `id`     | `ID!` |             |

Returns `Agent` · [Agent](/api/objects#agent).

### agentBySlug [#agentbyslug]

| Argument | Type      | Description |
| -------- | --------- | ----------- |
| `slug`   | `String!` |             |

Returns `Agent` · [Agent](/api/objects#agent).

### agents [#agents]

Returns `[Agent!]!` · [Agent](/api/objects#agent).

### chat [#chat]

| Argument | Type  | Description |
| -------- | ----- | ----------- |
| `id`     | `ID!` |             |

Returns `Chat` · [Chat](/api/objects#chat).

### chats [#chats]

Returns `[Chat!]!` · [Chat](/api/objects#chat).

### messages [#messages]

| Argument | Type     | Description |
| -------- | -------- | ----------- |
| `chatId` | `ID!`    |             |
| `limit`  | `Int`    |             |
| `before` | `String` |             |

Returns `[Message!]!` · [Message](/api/objects#message).

## Observability / APM [#observability--apm]

### traces [#traces]

| Argument | Type                                                                | Description |
| -------- | ------------------------------------------------------------------- | ----------- |
| `input`  | `TraceQueryInput!` · [TraceQueryInput](/api/inputs#tracequeryinput) |             |

Returns `[Trace!]!` · [Trace](/api/objects#trace).

### trace [#trace]

| Argument    | Type      | Description |
| ----------- | --------- | ----------- |
| `projectId` | `ID!`     |             |
| `traceId`   | `String!` |             |

Returns `Trace` · [Trace](/api/objects#trace).

### metrics [#metrics]

| Argument | Type                                                                   | Description |
| -------- | ---------------------------------------------------------------------- | ----------- |
| `input`  | `MetricQueryInput!` · [MetricQueryInput](/api/inputs#metricqueryinput) |             |

Returns `[MetricSeries!]!` · [MetricSeries](/api/objects#metricseries).

### logs [#logs]

| Argument | Type                                                          | Description |
| -------- | ------------------------------------------------------------- | ----------- |
| `input`  | `LogQueryInput!` · [LogQueryInput](/api/inputs#logqueryinput) |             |

Returns `[LogEntry!]!` · [LogEntry](/api/objects#logentry).

### services [#services]

| Argument    | Type    | Description |
| ----------- | ------- | ----------- |
| `projectId` | `ID!`   |             |
| `startTime` | `Date!` |             |
| `endTime`   | `Date!` |             |

Returns `[ServiceStats!]!` · [ServiceStats](/api/objects#servicestats).

### observabilitySettings [#observabilitysettings]

| Argument    | Type  | Description |
| ----------- | ----- | ----------- |
| `projectId` | `ID!` |             |

Returns `ObservabilitySettings` · [ObservabilitySettings](/api/objects#observabilitysettings).

### telemetryUsage [#telemetryusage]

| Argument    | Type    | Description |
| ----------- | ------- | ----------- |
| `projectId` | `ID!`   |             |
| `startDate` | `Date!` |             |
| `endDate`   | `Date!` |             |

Returns `TelemetryUsageSummary!` · [TelemetryUsageSummary](/api/objects#telemetryusagesummary).

## Live container health from provider [#live-container-health-from-provider]

### deploymentHealth [#deploymenthealth]

| Argument    | Type  | Description |
| ----------- | ----- | ----------- |
| `serviceId` | `ID!` |             |

Returns `DeploymentHealth` · [DeploymentHealth](/api/objects#deploymenthealth).

## Service container logs [#service-container-logs]

### serviceLogs [#servicelogs]

| Argument    | Type     | Description |
| ----------- | -------- | ----------- |
| `serviceId` | `ID!`    |             |
| `tail`      | `Int`    |             |
| `service`   | `String` |             |

Returns `ServiceLogResult!` · [ServiceLogResult](/api/objects#servicelogresult).

### attestationMeasurements [#attestationmeasurements]

The active organization's attestation measurement allowlist.

Returns `[AttestationMeasurement!]!` · [AttestationMeasurement](/api/objects#attestationmeasurement).

### serviceAttestedIdentities [#serviceattestedidentities]

Registry identities linked to this service, newest first. status is
the EFFECTIVE status (a revoked measurement retires its identities): the same verdict the public REST lookup serves.

| Argument    | Type  | Description |
| ----------- | ----- | ----------- |
| `serviceId` | `ID!` |             |

Returns `[AttestedIdentity!]!` · [AttestedIdentity](/api/objects#attestedidentity).

## Deployment file access (files tab) [#deployment-file-access-files-tab]

### serviceFiles [#servicefiles]

| Argument    | Type      | Description |
| ----------- | --------- | ----------- |
| `serviceId` | `ID!`     |             |
| `path`      | `String!` |             |

Returns `ServiceFileList!` · [ServiceFileList](/api/objects#servicefilelist).

### serviceFileContent [#servicefilecontent]

| Argument    | Type      | Description |
| ----------- | --------- | ----------- |
| `serviceId` | `ID!`     |             |
| `path`      | `String!` |             |

Returns `ServiceFileContent!` · [ServiceFileContent](/api/objects#servicefilecontent).

### serviceFileAccessPolicy [#servicefileaccesspolicy]

| Argument    | Type  | Description |
| ----------- | ----- | ----------- |
| `serviceId` | `ID!` |             |

Returns `ServiceFileAccessPolicy!` · [ServiceFileAccessPolicy](/api/objects#servicefileaccesspolicy).

## Service links (connections between services) [#service-links-connections-between-services]

### serviceLinks [#servicelinks]

| Argument    | Type  | Description |
| ----------- | ----- | ----------- |
| `projectId` | `ID!` |             |

Returns `[ServiceLink!]!` · [ServiceLink](/api/objects#servicelink).

## Org billing runway (how long until funds run out) [#org-billing-runway-how-long-until-funds-run-out]

### orgBillingRunway [#orgbillingrunway]

Returns `OrgBillingRunway` · [OrgBillingRunway](/api/objects#orgbillingrunway).

## GitHub deploy [#github-deploy]

### githubAppEnabled [#githubappenabled]

Returns `Boolean!`.

### githubAppSlug [#githubappslug]

Returns `String`.

### githubInstallations [#githubinstallations]

| Argument | Type | Description |
| -------- | ---- | ----------- |
| `orgId`  | `ID` |             |

Returns `[GithubInstallation!]!` · [GithubInstallation](/api/objects#githubinstallation).

### githubInstallationRepos [#githubinstallationrepos]

| Argument         | Type  | Description |
| ---------------- | ----- | ----------- |
| `installationId` | `ID!` |             |

Returns `[GithubRepoSummary!]!` · [GithubRepoSummary](/api/objects#githubreposummary).

### githubRepoBranches [#githubrepobranches]

| Argument         | Type      | Description |
| ---------------- | --------- | ----------- |
| `installationId` | `ID!`     |             |
| `owner`          | `String!` |             |
| `repo`           | `String!` |             |

Returns `[GithubBranchSummary!]!` · [GithubBranchSummary](/api/objects#githubbranchsummary).

## Builds [#builds]

### buildJob [#buildjob]

Fetch a single BuildJob by id (auth: caller must have access to the parent service's project). Used by the Source-tab build-history UI to lazy-load the logs blob on row expand.

| Argument | Type  | Description |
| -------- | ----- | ----------- |
| `id`     | `ID!` |             |

Returns `BuildJob` · [BuildJob](/api/objects#buildjob).

### serviceBuildJobs [#servicebuildjobs]

List recent BuildJobs for a service, newest first. Logs blob omitted: fetch it via buildJob(id) on demand. Used by the Source-tab build-history list (polled every 3s while a build is in flight).

| Argument    | Type  | Description |
| ----------- | ----- | ----------- |
| `serviceId` | `ID!` |             |
| `limit`     | `Int` |             |

Returns `[BuildJob!]!` · [BuildJob](/api/objects#buildjob).

## Regions [#regions]

### regions [#regions-1]

Return curated region buckets with live availability + pricing for the picker. Defaults to the standard compute tier when provider is omitted. The gpuModelHint argument is reserved for future per-model price emphasis;
ignored today.

| Argument       | Type     | Description |
| -------------- | -------- | ----------- |
| `gpuModelHint` | `String` |             |

Some arguments are omitted. †

Returns `[Region!]!` · [Region](/api/objects#region).

† Some fields, arguments or return types are omitted from this page: provider-specific ones, or ones that belong to retired or admin-only surfaces.
