From be8e1dc1e893d7034faf2d250973e9f0df1a2784 Mon Sep 17 00:00:00 2001 From: Vrushank Vyas Date: Fri, 18 Sep 2026 15:20:12 +0530 Subject: [PATCH] Drop the scope segment from the API key create path POST /api-keys/{type}/{sub-type} put the scope in the URL, so every workspace-scoped call rendered as /api-keys/workspace/{sub-type}. The scope comes from the calling token, the same reasoning that removed organisation_id as a parameter, so the segment was saying twice what the request already carries -- and saying it in a public URL. The path is now POST /api-keys/{sub-type}, sub-type still user|service. Its docs URL moves with it, from post-api-keys-by-type-by-sub-type to post-api-keys-by-sub-type. Co-Authored-By: Claude Opus 5 --- _project/hrefs.yaml | 2 +- _project/planes.yaml | 2 +- build-report.txt | 2 +- docs-navigation.json | 2 +- openapi.yaml | 12 ++---------- overlays/docs-prose.yaml | 2 +- 6 files changed, 7 insertions(+), 15 deletions(-) diff --git a/_project/hrefs.yaml b/_project/hrefs.yaml index 1b0c5cd..8ce1c61 100644 --- a/_project/hrefs.yaml +++ b/_project/hrefs.yaml @@ -159,7 +159,7 @@ hrefs: DELETE /mcp-servers/{mcpServerId}/connections: /aigw/api-reference/mcp-servers/connections/mcp-server-connections-delete POST /logs: /aigw/api-reference/logs/post-logs GET /logs/{logId}: /aigw/api-reference/logs/get-logs-by-log-id - POST /api-keys/{type}/{sub-type}: /aigw/api-reference/api-keys/post-api-keys-by-type-by-sub-type + POST /api-keys/{sub-type}: /aigw/api-reference/api-keys/post-api-keys-by-sub-type GET /api-keys: /aigw/api-reference/api-keys/get-api-keys PUT /api-keys/{id}: /aigw/api-reference/api-keys/put-api-keys-by-id GET /api-keys/{id}: /aigw/api-reference/api-keys/get-api-keys-by-id diff --git a/_project/planes.yaml b/_project/planes.yaml index 0427c30..8bfcf82 100644 --- a/_project/planes.yaml +++ b/_project/planes.yaml @@ -62,7 +62,7 @@ control-plane: "/api-keys": inherited "/api-keys/{id}": inherited "/api-keys/{id}/rotate": inherited - "/api-keys/{type}/{sub-type}": inherited + "/api-keys/{sub-type}": inherited "/configs": inherited "/configs/{slug}": inherited "/configs/{slug}/versions": inherited diff --git a/build-report.txt b/build-report.txt index 2930e60..b418139 100644 --- a/build-report.txt +++ b/build-report.txt @@ -88,7 +88,7 @@ operations lacking operationId 45 GET /providers GET /providers/{slug} POST /api-keys/{id}/rotate - POST /api-keys/{type}/{sub-type} + POST /api-keys/{sub-type} POST /integrations POST /logs POST /providers diff --git a/docs-navigation.json b/docs-navigation.json index 053f94e..7473b2b 100644 --- a/docs-navigation.json +++ b/docs-navigation.json @@ -447,7 +447,7 @@ "directory": "api-reference" }, "pages": [ - "POST /api-keys/{type}/{sub-type}", + "POST /api-keys/{sub-type}", "GET /api-keys", "PUT /api-keys/{id}", "GET /api-keys/{id}", diff --git a/openapi.yaml b/openapi.yaml index 05a576e..e486613 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4863,19 +4863,11 @@ paths: text_digest: '' x-mint: href: /aigw/api-reference/logs/get-logs-by-log-id - /api-keys/{type}/{sub-type}: + /api-keys/{sub-type}: post: tags: - API Keys parameters: - - name: type - in: path - schema: - type: string - enum: - - organisation - - workspace - required: true - name: sub-type in: path schema: @@ -4917,7 +4909,7 @@ paths: origin_kind: human text_digest: '' x-mint: - href: /aigw/api-reference/api-keys/post-api-keys-by-type-by-sub-type + href: /aigw/api-reference/api-keys/post-api-keys-by-sub-type servers: - url: https://api.apps.paloaltonetworks.com/ai_gw/v2 description: Managed diff --git a/overlays/docs-prose.yaml b/overlays/docs-prose.yaml index 3b5d320..3d2a1fa 100644 --- a/overlays/docs-prose.yaml +++ b/overlays/docs-prose.yaml @@ -1147,7 +1147,7 @@ actions: claims: [] origin_kind: human text_digest: '' -- target: $.paths['/api-keys/{type}/{sub-type}'].post +- target: $.paths['/api-keys/{sub-type}'].post update: summary: '' description: ''