Skip to content

Commit b5206f6

Browse files
committed
docs(api): say v2 execute options need a full-access key or api:write
run.version, async and waitTimeoutSeconds refuse read-only keys; the meta example lists search:read with the full-access scopes.
1 parent ba17d53 commit b5206f6

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎apps/docs/openapi-v2-resources.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4986,7 +4986,7 @@
49864986
"v2Enabled": true,
49874987
"keyType": "personal",
49884988
"expiresAt": null,
4989-
"scopes": ["api:read", "api:write"]
4989+
"scopes": ["api:read", "api:write", "search:read"]
49904990
}
49914991
}
49924992
}
@@ -18677,7 +18677,7 @@
1867718677
"v2Enabled": true,
1867818678
"keyType": "personal",
1867918679
"expiresAt": null,
18680-
"scopes": ["api:read", "api:write"]
18680+
"scopes": ["api:read", "api:write", "search:read"]
1868118681
}
1868218682
}
1868318683
]

‎apps/docs/openapi-v2-workflows.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14928,7 +14928,7 @@
1492814928
"description": "Execute a deployed workflow version."
1492914929
},
1493014930
"version": {
14931-
"description": "Deployment version to execute instead of the active one. Requires an API key or OAuth access token with workspace write access, and the workflow must be deployed. An unknown version returns `404`.",
14931+
"description": "Deployment version to execute instead of the active one. Requires a full-access API key or an OAuth access token with `api:write`, plus workspace write access, and the workflow must be deployed. An unknown version returns `404`.",
1493214932
"type": "integer",
1493314933
"minimum": 1,
1493414934
"maximum": 2147483647
@@ -15006,7 +15006,7 @@
1500615006
},
1500715007
"async": {
1500815008
"default": false,
15009-
"description": "Queue the run and return a 202 receipt. Requires an API key or OAuth access token and a deployed run source. Cannot stream, select outputs, enable thinking/tool events, or include file-inlining options (`includeFileBase64` or `base64MaxBytes`).",
15009+
"description": "Queue the run and return a 202 receipt. Requires a full-access API key or an OAuth access token with `api:write`, and a deployed run source. Cannot stream, select outputs, enable thinking/tool events, or include file-inlining options (`includeFileBase64` or `base64MaxBytes`).",
1501015010
"type": "boolean"
1501115011
},
1501215012
"executionTimeoutSeconds": {
@@ -15016,7 +15016,7 @@
1501615016
"maximum": 604800
1501715017
},
1501815018
"waitTimeoutSeconds": {
15019-
"description": "Wait at most this many seconds for a synchronous run; `0` waits until it settles. A run still going then continues in the background and the response carries its run receipt instead of its result: `202` on a JSON response, or a closing `detached` frame on an `application/x-ndjson` result stream, which keeps its `200`. The receipt is sent only once the run can be read on the runs resource, where it can also be cancelled. The run is admitted under asynchronous limits, and a dropped connection no longer cancels it. Requires an API key or OAuth access token. Cannot be combined with `async` or `stream`.",
15019+
"description": "Wait at most this many seconds for a synchronous run; `0` waits until it settles. A run still going then continues in the background and the response carries its run receipt instead of its result: `202` on a JSON response, or a closing `detached` frame on an `application/x-ndjson` result stream, which keeps its `200`. The receipt is sent only once the run can be read on the runs resource, where it can also be cancelled. The run is admitted under asynchronous limits, and a dropped connection no longer cancels it. Requires a full-access API key or an OAuth access token with `api:write`. Cannot be combined with `async` or `stream`.",
1502015020
"type": "integer",
1502115021
"minimum": 0,
1502215022
"maximum": 604800

‎apps/sim/lib/api/contracts/v2/openapi/resources.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1939,7 +1939,7 @@ const declaredRoutes = [
19391939
v2Enabled: true,
19401940
keyType: 'personal',
19411941
expiresAt: null,
1942-
scopes: ['api:read', 'api:write'],
1942+
scopes: ['api:read', 'api:write', 'search:read'],
19431943
},
19441944
},
19451945
]

‎apps/sim/lib/api/contracts/v2/workflows.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,7 +1508,7 @@ export const v2WorkflowRunSelectionSchema = z.discriminatedUnion('source', [
15081508
version: versionNumberSchema
15091509
.optional()
15101510
.describe(
1511-
'Deployment version to execute instead of the active one. Requires an API key or OAuth access token with workspace write access, and the workflow must be deployed. An unknown version returns `404`.'
1511+
'Deployment version to execute instead of the active one. Requires a full-access API key or an OAuth access token with `api:write`, plus workspace write access, and the workflow must be deployed. An unknown version returns `404`.'
15121512
),
15131513
})
15141514
.strict(),
@@ -1599,7 +1599,7 @@ export const v2ExecuteWorkflowBodySchema = z
15991599
.optional()
16001600
.default(false)
16011601
.describe(
1602-
'Queue the run and return a 202 receipt. Requires an API key or OAuth access token and a deployed run source. Cannot stream, select outputs, enable thinking/tool events, or include file-inlining options (`includeFileBase64` or `base64MaxBytes`).'
1602+
'Queue the run and return a 202 receipt. Requires a full-access API key or an OAuth access token with `api:write`, and a deployed run source. Cannot stream, select outputs, enable thinking/tool events, or include file-inlining options (`includeFileBase64` or `base64MaxBytes`).'
16031603
),
16041604
/**
16051605
* An upper bound on the request, not the effective timeout: the server
@@ -1628,7 +1628,7 @@ export const v2ExecuteWorkflowBodySchema = z
16281628
.max(MAX_WORKFLOW_EXECUTION_TIMEOUT_SECONDS)
16291629
.optional()
16301630
.describe(
1631-
'Wait at most this many seconds for a synchronous run; `0` waits until it settles. A run still going then continues in the background and the response carries its run receipt instead of its result: `202` on a JSON response, or a closing `detached` frame on an `application/x-ndjson` result stream, which keeps its `200`. The receipt is sent only once the run can be read on the runs resource, where it can also be cancelled. The run is admitted under asynchronous limits, and a dropped connection no longer cancels it. Requires an API key or OAuth access token. Cannot be combined with `async` or `stream`.'
1631+
'Wait at most this many seconds for a synchronous run; `0` waits until it settles. A run still going then continues in the background and the response carries its run receipt instead of its result: `202` on a JSON response, or a closing `detached` frame on an `application/x-ndjson` result stream, which keeps its `200`. The receipt is sent only once the run can be read on the runs resource, where it can also be cancelled. The run is admitted under asynchronous limits, and a dropped connection no longer cancels it. Requires a full-access API key or an OAuth access token with `api:write`. Cannot be combined with `async` or `stream`.'
16321632
),
16331633
stream: z
16341634
.boolean()

‎packages/sim-cli/src/generated/v2-api.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18702,7 +18702,7 @@ export const V2_OPERATIONS = {
1870218702
kind: 'boolean',
1870318703
default: false,
1870418704
describe:
18705-
'Queue the run and return a 202 receipt. Requires an API key or OAuth access token and a deployed run source. Cannot stream, select outputs, enable thinking/tool events, or include file-inlining options (`includeFileBase64` or `base64MaxBytes`).',
18705+
'Queue the run and return a 202 receipt. Requires a full-access API key or an OAuth access token with `api:write`, and a deployed run source. Cannot stream, select outputs, enable thinking/tool events, or include file-inlining options (`includeFileBase64` or `base64MaxBytes`).',
1870618706
},
1870718707
executionTimeoutSeconds: {
1870818708
kind: 'integer',
@@ -18712,7 +18712,7 @@ export const V2_OPERATIONS = {
1871218712
waitTimeoutSeconds: {
1871318713
kind: 'integer',
1871418714
describe:
18715-
'Wait at most this many seconds for a synchronous run; `0` waits until it settles. A run still going then continues in the background and the response carries its run receipt instead of its result: `202` on a JSON response, or a closing `detached` frame on an `application/x-ndjson` result stream, which keeps its `200`. The receipt is sent only once the run can be read on the runs resource, where it can also be cancelled. The run is admitted under asynchronous limits, and a dropped connection no longer cancels it. Requires an API key or OAuth access token. Cannot be combined with `async` or `stream`.',
18715+
'Wait at most this many seconds for a synchronous run; `0` waits until it settles. A run still going then continues in the background and the response carries its run receipt instead of its result: `202` on a JSON response, or a closing `detached` frame on an `application/x-ndjson` result stream, which keeps its `200`. The receipt is sent only once the run can be read on the runs resource, where it can also be cancelled. The run is admitted under asynchronous limits, and a dropped connection no longer cancels it. Requires a full-access API key or an OAuth access token with `api:write`. Cannot be combined with `async` or `stream`.',
1871618716
},
1871718717
stream: {
1871818718
kind: 'boolean',

0 commit comments

Comments
 (0)