Status: proposed baseline; issue #736 owns review/freeze
Date: 2026-09-23
Program: #713
This specification defines cross-cutting conventions for IDKMesh HTTP product APIs. Domain specifications remain authoritative for domain semantics.
Product endpoints use:
/api/v1/...
Operational probes use:
/healthz/readyzURL compatibility version and object schema version are separate.
Every IDKMesh API object should expose an explicit version field appropriate to its contract, for example:
{
"kind": "idkmesh-control-tower-snapshot",
"schema_version": "0.1"
}
A URL v1 breaking semantic change requires explicit migration/version review.
Default media type:
application/json
A domain may additionally define a versioned vendor media type.
Requirements:
Resource IDs must be:
Content identity uses canonical digests where required:
sha256:<64-lowercase-hex>
A filename, branch name, UI row number, or mutable provider URL is not a substitute for immutable content identity.
Domain resources may be returned directly when a schema explicitly defines that shape.
Operation/result envelopes should carry:
Do not add request-specific timestamps/random values to otherwise deterministic evidence projections.
All JSON API errors should follow one stable structure:
{
"api_version": "v1",
"schema_version": "0.1",
"kind": "idkmesh-api-error",
"ok": false,
"error": {
"code": "stable_machine_code",
"message": "human-readable explanation",
"retryable": false,
"details": {}
}
}
Rules:
code is compatibility-sensitive;message is explanatory, not a parsing contract;details contains bounded structured recovery information;Baseline meanings:
Allow;Retry-After when meaningful;Retry-After when meaningful.Issue #736 freezes any final mapping changes.
Accept safe caller X-Request-ID; replace invalid/unbounded values.
Every response exposes the effective request ID.
Request IDs:
Services should expose stable bounded headers such as:
X-IDKMesh-Service;X-IDKMesh-Service-Version;X-IDKMesh-API-Version;X-IDKMesh-Read-Only where applicable.Evidence projections may expose:
X-IDKMesh-Content-Digest;ETag.No-store policy may coexist with ETag when ETag is an integrity/equality signal rather than cache permission.
A loopback session token may protect a local browser/API service.
It is not a human/service principal.
A request that can access project state or mutate durable state must carry a trusted authenticated principal and pass policy authorization.
Endpoint specifications declare required scopes/actions.
Authority must never be inferred from:
List endpoints require:
Proposed response shape:
{
"kind": "idkmesh-list",
"schema_version": "0.1",
"items": [],
"page": {
"next_cursor": null,
"limit": 50
}
}
Offset pagination should be avoided for mutable event/run streams unless a domain demonstrates safe semantics.
Filters must be explicitly enumerated and bounded.
Do not expose arbitrary expression languages in v1.
Unknown filters fail explicitly rather than being silently ignored.
Every externally retried mutation defines whether it is idempotent.
For creation/dispatch/decision-recording APIs, prefer requiring:
Idempotency-Key
Semantics:
same key + same canonical request digest
-> return/refer to the original logical result
same key + different canonical request digest
-> 409 conflict
Persist the idempotency record before invoking an external side effect when required by the operation.
Mutable resources define an optimistic-concurrency strategy before release.
Preferred forms:
If-Match.A retry must not silently overwrite a newer human or policy decision.
A Human Decision Record:
Integration execution is a separate operation and policy boundary.
Canonical events are immutable and append-only.
Events should include:
Historical query uses cursor pagination.
Live read delivery begins with resumable SSE.
/healthz answers whether the process is alive.
/readyz answers whether the service is ready for its declared profile.
Neither endpoint exposes project/evidence/secrets.
Readiness may report bounded dependency state in the network profile.
Every deployment profile documents:
Use 429/503 explicitly; do not allow uncontrolled memory growth.
Logs/telemetry must not contain:
Network profile should support W3C traceparent.
Telemetry identifiers are not authority/evidence.
OpenAPI is a discovery/transport contract, not the sole source of domain truth.
Requirements:
Stable API deprecation must be explicit.
Final policy is owned by #736, but should include:
Nothing is removed merely because a newer UI stopped using it.
If/when network browser mutations exist, define:
Local token behavior must not be copied blindly into network mode.
Every API change should be labeled internally as one of:
Breaking changes require the process defined by #736 and release/migration evidence.
These conventions standardize transport behavior.
They do not grant:
Authority remains owned by domain policy and explicit actor/governance decisions.