スケールで組織とアカウントのプロビジョニング¶
大きめの顧客をオンボードするとき — 数千のOUとメンバーアカウントが1つで、** bulk** と paginated API を呼び出します。 これらは、不正確であり、バックプレッシャーを適用し、あなたが予算の回復をすることができます公開されたレイテンシーターゲットが付属しています。
All paths are under the public gateway at https://api.flexgalaxy.ai, signed with
FGAI-HMAC-SHA256 (see Integrate an external app with AK/SK).
Management-account context is supplied with the X-Account-Id header. The wire
is snake_case.
一括でOUを作成¶
POST /organizations/v1/{org}/ous/batch — synchronous, 呼び出しあたり最大500 OUs.
アイテムはトポロジカルにソートされるので、1つのリクエストでサブツリー全体を作成し、
parent_refによる未作成の親を参照することができます。各項目は、独自のトランザクションでコミットします。1つの悪い項目(名前の衝突、クォータ旅行、悪い親)は、独自の方法で拒否され、残りの部分を破棄しません。 許可/拒否された結果セットを1項目ずつ取得します。
Idempotency-Keyヘッダーが必要です。 重複の作成ではなく、同じキーを再投稿する。
一括で会員アカウントをインポート¶
POST /accounts/v1/provision/batch — asynchronous, 最大 1000 呼び出しあたりのアカウント.
アップフロント拒否(クォーターヘッドルーム、メールの重複、不明なOU)は、応答ですぐに戻ってきます。
受け入れられるすべては耐久のリレーで満たされ、
batch_idを戻します。Poll
GET /accounts/v1/provision/batch/{batch_id}for{total, pending, completed, failed, items[]}.また、
Idempotency-Key-保護されています。
Account のプロビジョニングは 設計による非同期 — 各アカウントはバックグラウンドで立ち上がります(アイデンティティの領域、ルートユーザー、orgアクセスロール)。 202 /enqueueは高速です。アカウントは数秒後にライブします。 単一のバーストではなく、**の持続的なバックグラウンドインポートとして大きなオンボードを駆動: 提出し、バッチを投票し、Retry-After(下)を表彰する。 GET /accounts/v1/provision/jobsとのあらゆる機内単一約束の仕事を調整して下さい。
Enterprise onboarding — placeholder accounts & lazy materialization¶
For an enterprise import where most accounts will not be used immediately (a franchise rolling out thousands of locations, say), use the onboarding path instead of provisioning every account up front. It creates cheap placeholder accounts now and defers the expensive per-account setup — identity realm, authz projection — to first use.
POST /organizations/v1/{org}/account-batches — synchronous 202, bulk
placeholder create.
{ "ou_node_id": "<ou>", "accounts": [ { "name": "warehouse-01" }, { "name": "warehouse-02" } ] }
Each returned account is { "status": "PLACEHOLDER", "realm_status": "NONE" } — a
row, nothing more. A 20K-account import is just that many rows and stays fast.
Accounts materialize lazily on first use:
Call |
Transition |
|---|---|
|
first operator grant → |
|
first service user → materializes the account realm |
Teardown mirrors it:
Call |
Effect |
|---|---|
|
transition to terminal |
Hard-delete (purge) is not a partner verb — it is classified platform-operator
in the edge declaration; a placeholder created in error is removed by operator tooling.
Read the roster with the lifecycle view, optionally filtered by status:
GET /organizations/v1/{org}/account-lifecycle?status=PLACEHOLDER|MATERIALIZING|ACTIVE|CLOSED
The status values, the full lifecycle row shape and the filter semantics are in Account lifecycle status.
All of the above is available on the CLI as fgai org onboard-accounts,
onboard-grant-operator, onboard-provision-service-user, onboard-terminate,
and account-lifecycle (see
CLI reference).
森全体を引っ張らずに読む¶
エンドポイントが org ツリー全体を返します。 読み込みページとスコープ:
GET /organizations/v1/{org}/ous?page=&size=→OuSummary(sizeは200でおおわれた)。 各項目はchild_count/has_childrenを運びます、従ってあなたは子孫を取除くことなく**レイジーツリーをレンダリングできます。?parentId=<ou>を 1 つの OU の直接の子供だけを捕獲するために加えて下さい。GET /organizations/v1/{org}/accounts?page=&size=とGET /organizations/v1/{org}/ous/{ou}/accounts?page=&size=→ paginated (OU フィルターはデータベースで実行)。The nested
GET /organizations/v1/{org}/treedoor is bearer-only (a human session; an FGAI-HMAC service user receives401by design — 175-W2 ruling A, DotID#1762 / DotID#1899). A service user walks the tree branch-by-branch instead:ous?parentId=<ou>for one level, followingchild_count/has_children, orfgai org ou-list --parent-id <ou>/fgai org ou-geton the CLI.
バックプレッシャー&レート制限¶
Backpressure. When the provisioning backlog is over its high-water mark,
POST /accounts/v1/provisionand/provision/batchreturn429with aRetry-Afterheader and the standard error envelope (error_code = "provisioning-backpressure", withdetails.backlog / highWaterMark / retryAfterSeconds). Batches are rejected whole — never partially enqueued — so a retry is clean.Rate limit. A single
POST /accounts/v1/provisionis capped per management account. Over the cap →429,error_code = "rate-limited",Retry-After. Use/provision/batchfor bulk.
These errors use the platform problem envelope (application/problem+json):
{ "type", "title", "status", "detail", "error_code", "code", "details"?, "request_id" }.
The machine code to branch on is error_code; code is the stable catalogued error
identifier (FG-DOT-…) to quote when reporting a problem; the human sentence is detail, and
any structured payload is details. request_id is the same value as the X-Request-Id
response header.
Retry-Afterを常に尊重し、同じIdempotency-Keyと再試行します。
// 429 backpressure response (application/problem+json)
{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "Provisioning queue is over capacity (backlog … >= high-water mark …); retry after 30s.",
"error_code": "provisioning-backpressure",
"code": "FG-DOT-…",
"details": { "backlog": 5000, "highWaterMark": 5000, "retryAfterSeconds": 30 },
"request_id": "…"
}
レイテンシーターゲット(SLO)¶
クライアントのタイムアウトとリトライバックオフの予算:
オペレーション |
ターゲット |
|---|---|
OU作成(単一) |
p95〜200ミリ秒 |
OU |
p95〜2秒 |
開始された木/リストは読みました(サイズ ≤ 200)を |
p95〜300ミリ秒 |
会員規定 — accept ( |
p95〜400ミリ秒 |
会員規定 — complete (アカウントライブ) |
~7 s (非同期) |
非常に大きなオンボードの場合、** の持続的なバックグラウンドインポートの計画** バッチ + リレーパスとRetry-Afterへのペース投稿 - それは、大量のオンボーディングのためのサポートされているパスです。