Skip to Content
We are live but in Staging 🎉

Drafts — API Reference

Package: dodil.ignite.v1 · Service: ComputeService

The draft is version 0 — the single mutable code slot on an app. This is the code workflow: attach code with SaveDraft, optionally CompileDraft (Rust), then PublishDraft to freeze it into an immutable, numbered version. The app metadata and config live on the app; the draft’s source comes from a CodeSource.

gRPC reaches every method at dodil.ignite.v1.ComputeService/<Method> on $IGNITE_GRPC; the HTTP gateway mirrors each one. See Conventions → Using gRPC for grpcurl setup. gRPC requests use the proto field names (snake_case); HTTP uses pbjson (camelCase). Responses render camelCase.

RPCHTTP
SaveDraftPOST /v1/ignite/app/{organization_name}/{app_name}/draft
GetDraftInfoGET /v1/ignite/app/{organization_name}/{app_name}/draft
CompileDraftPOST /v1/ignite/app/{organization_name}/{app_name}/draft/compile
PublishDraftPOST /v1/ignite/app/{organization_name}/{app_name}/draft/publish
TestDraftPOST /v1/ignite/app/{organization_name}/{app_name}/draft/test

SaveDraft

Saves code to the mutable draft slot — no compilation, no version number. The compile-vs-image branch is decided by which variant of CodeSource.source the caller picks: compile (the platform builds your source) or image (BYOI, or built from a code archive / git by Kaniko or Buildpacks).

Request

# `sourceCode` is base64-encoded source bytes (truncated placeholder below). curl -sS -X POST "https://api.dev.dodil.io/v1/ignite/app/acme-corp/my-data-processor/draft" \ -H "Authorization: Bearer $DODIL_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "code": { "compile": { "runtime": { "rust": { "target": "RUST_COMPILATION_TARGET_NATIVE", "toolchainVersion": "1.82" } }, "sourceCode": "dXNlIGlnbml0ZTo6cHJlbHVkZTo6Kjsg..." } } }'

Response

{ "draft": { "status": "VERSION_STATUS_DRAFT", "codeHash": "9f1c2a7e", "createdAtMs": "1716900000000", "codeKind": "CODE_KIND_SDK" } }

Next: Rust drafts must CompileDraft before they can be tested or published; Python skips straight to PublishDraft.

GetDraftInfo

Returns the current draft’s status and compile breadcrumbs. The draft’s runtime / mode / limits / scaling are authoritative here — do not read them from AppMeta (which reflects the active version while a draft is open).

Request

curl -sS "https://api.dev.dodil.io/v1/ignite/app/acme-corp/my-data-processor/draft" \ -H "Authorization: Bearer $DODIL_TOKEN"

Response

{ "draft": { "status": "VERSION_STATUS_DRAFT", "codeHash": "9f1c2a7e", "createdAtMs": "1716900000000", "lastDeploymentAtMs": "1716900300000", "runtime": { "rust": { "target": "RUST_COMPILATION_TARGET_NATIVE", "toolchainVersion": "1.82" } }, "codeKind": "CODE_KIND_SDK" } }

CompileDraft

Triggers a managed compile of the current draft. Only needed for Rust (native or wasm) — Python drafts skip compilation. The returned deploy_id streams build logs; poll GetDraftInfo for COMPILINGDRAFT / FAILED.

Request

curl -sS -X POST "https://api.dev.dodil.io/v1/ignite/app/acme-corp/my-data-processor/draft/compile" \ -H "Authorization: Bearer $DODIL_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'

Response

{ "draft": { "status": "VERSION_STATUS_COMPILING", "deployId": "deploy-7c3a91", "codeKind": "CODE_KIND_SDK" }, "deployId": "deploy-7c3a91" }

PublishDraft

Freezes the current draft into a new immutable, numbered version and makes the app invocable. If mcp_enabled is set, the app appears as a callable MCP tool shortly after.

Request

curl -sS -X POST "https://api.dev.dodil.io/v1/ignite/app/acme-corp/my-data-processor/draft/publish" \ -H "Authorization: Bearer $DODIL_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'

Response

{ "app": { "id": "acme-corp/my-data-processor", "name": "my-data-processor", "activeVersion": 4 }, "publishedVersion": 4 }

TestDraft

Runs the current draft against a payload without publishing it. Returns an execution_id — use GetExecution to retrieve status and output.

Request

# `payload` is the JSON input, base64-encoded (here: {"name":"world"}). curl -sS -X POST "https://api.dev.dodil.io/v1/ignite/app/acme-corp/my-data-processor/draft/test" \ -H "Authorization: Bearer $DODIL_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "payload": "eyJuYW1lIjoid29ybGQifQ==" }'

Response

{ "executionId": "exec-3f9a12", "appId": "acme-corp/my-data-processor" }

See also