Ensure knowledge pack
Idempotently create the knowledge pack at the given scope, or return the existing one.
Restrictions
Usage
- Idempotent: if a pack already exists at (
scope,scope_id), it is returned unchanged. - For
accountscope,scope_idis ignored (the account ID is used) and a defaultDUTY.mdis seeded on first creation. - Creating the account-scope pack requires account owner/admin; creating into a team requires membership of that team.
- Every call is recorded in the account audit log.
Authorizations
App key issued from the Flashduty console. Required on every public API call. Keep it secret — it grants the same access as the owning account.
Body
Scope at which to ensure a knowledge pack exists.
Scope of the pack to ensure. One of: account (account-level pack; scope_id is forced to the caller's account ID and only account admins may create it; first creation seeds a default DUTY.md), team (team-level pack; the scope_id team ID is required and the caller must belong to that team).
account, team Team ID; required for team scope, ignored for account scope.
Response
Success
Standard response envelope used by every Flashduty public API. On success data contains the endpoint-specific payload and error is absent. On failure error is present and data is absent. request_id is always present and is also mirrored in the Flashcat-Request-Id response header.
Unique ID for this request. Mirrored in the Flashcat-Request-Id header. Include it when reporting issues.
"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
Error payload inside the response envelope. Present only on non-2xx responses.
A knowledge pack — a versioned file tree staged into every AI SRE sandbox at session start. One pack exists per (account, scope, scope_id).