openapi: 3.2.0 info: title: Dagger HTTP GraphQL API version: v0.x description: 'Dagger exposes its build/run/test engine as a GraphQL API served by a per-session local endpoint.' contact: name: Dagger url: https://docs.dagger.io license: name: Apache-2.0 servers: - url: http://127.0.0.1:{DAGGER_SESSION_PORT} description: Per-session local Dagger engine endpoint. variables: DAGGER_SESSION_PORT: default: '8080' description: 'Value of the DAGGER_SESSION_PORT environment variable that the Dagger engine sets for each session. ' security: - SessionTokenBasic: [] tags: - name: Graph QL paths: /query: post: tags: - Graph QL summary: Execute a GraphQL query or mutation against the Dagger engine description: 'Standard GraphQL-over-HTTP POST. Sends a JSON body with `query`, optional `variables`, and optional `operationName`. The core Dagger schema covers container, directory, file, secret, git, http, host, cacheVolume, currentModule, currentEnv, defaultPlatform, and many `loadXFromID` resolvers, plus any fields contributed by loaded Dagger modules.' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GraphQLRequest' examples: container-from: summary: Pull an image and inspect a file value: query: "query {\n container {\n from(address: \"alpine:latest\") {\n file(path: \"/etc/os-release\") { contents }\n }\n }\n}\n" git-clone: summary: Clone a Git repo value: query: "query($url: String!) {\n git(url: $url) {\n head { tree { entries } }\n }\n}\n" variables: url: https://github.com/dagger/dagger responses: '200': description: GraphQL response (always 200 — errors carried inside the body) content: application/json: schema: $ref: '#/components/schemas/GraphQLResponse' '401': description: Missing or invalid session token operationId: postQuery x-operation-id-source: derived get: tags: - Graph QL summary: Execute a GraphQL query via GET description: GET variant of the GraphQL endpoint (query-string encoded). parameters: - in: query name: query required: true schema: type: string - in: query name: variables schema: type: string description: JSON-encoded variables. - in: query name: operationName schema: type: string responses: '200': description: GraphQL response content: application/json: schema: $ref: '#/components/schemas/GraphQLResponse' operationId: getQuery x-operation-id-source: derived components: schemas: GraphQLError: type: object properties: message: type: string path: type: array items: type: string locations: type: array items: type: object properties: line: type: integer column: type: integer extensions: type: object additionalProperties: true GraphQLResponse: type: object properties: data: type: object additionalProperties: true nullable: true errors: type: array items: $ref: '#/components/schemas/GraphQLError' extensions: type: object additionalProperties: true GraphQLRequest: type: object required: - query properties: query: type: string description: GraphQL query or mutation document. variables: type: object additionalProperties: true description: Variables supplied to the operation. operationName: type: string nullable: true description: Name of the operation to execute when the document has multiple. securitySchemes: SessionTokenBasic: type: http scheme: basic description: 'HTTP Basic auth where the username is the value of the DAGGER_SESSION_TOKEN environment variable and the password is empty. ' externalDocs: description: Dagger HTTP / GraphQL API documentation url: https://docs.dagger.io/api/