Skip to content

Commit 7cc22a7

Browse files
committed
Merge remote-tracking branch 'origin/staging' into feat/v2-execute-version-pin-paused-detail
2 parents a6f07f0 + 02293a9 commit 7cc22a7

202 files changed

Lines changed: 34517 additions & 256 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/docs/content/docs/api-reference/authentication.mdx‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Workspace Admins can turn off **Allow personal API keys**. The workspace policy
2424
## Create and store a key [#generating-api-keys]
2525

2626
1. Open **Account settings → Sim API keys** to create a personal key, or **Workspace settings → Sim API keys** to create a workspace key.
27-
2. Select **Create API key**, enter a name, and create it. Workspace-key creation requires workspace **Admin** access and the applicable key-management permission.
27+
2. Select **Create API key** and enter a name. Choose its **Access** and when it **Expires**, then create it. Workspace-key creation requires workspace **Admin** access and the applicable key-management permission.
2828
3. Copy the key and store it in a server-side environment variable such as `SIM_API_KEY`.
2929

3030
<Callout type="warn">
@@ -33,6 +33,23 @@ Sim shows the complete key once, immediately after creation. Copy it before clos
3333

3434
Delete a key from the same settings page to revoke it. Update applications that used it with a replacement key.
3535

36+
### Access [#key-access]
37+
38+
| Access | Allows |
39+
| --- | --- |
40+
| **Full access** | Everything the key's identity can do: reads, changes, deploys, and workflow runs |
41+
| **Read only** | The operations the [`api:read` scope](#oauth-access-tokens) allows, including searches sent as POST requests and search chat |
42+
43+
A read-only key cannot change workspace resources or run, resume, or cancel workflows. Reads can still cost credits: searches use embedding credits, and search chat uses model credits and keeps a private conversation history. Selector lookups call third-party services with your connected accounts.
44+
45+
A refused request fails with `403` and the message `This API key is read-only and cannot perform this operation`. Where the surface carries a code, it is `READ_ONLY_API_KEY`: in `error.details.code` on the v2 API and the Sim MCP server, in `details.code` on the v1 API and workflow execution, and in `error.data.code` on a workflow MCP server.
46+
47+
Access narrows a key; it never grants more than the key's identity already has. Access is fixed at creation, so create a new key to change it. Keys created before access levels existed have full access. Keys created from the deploy modal or for a workflow MCP server always have full access, because they exist to run workflows. If **Access** isn't shown when you create a key, read-only keys aren't available on your deployment yet.
48+
49+
### Expiration [#key-expiration]
50+
51+
A key expires 30 days, 90 days, or 1 year after creation, or never. The settings page defaults to never. After it expires, every request with the key fails with `401`. The v1 and v2 APIs, both MCP servers, and workflow execution answer with the message `API key has expired`. Create a replacement before then. The key list shows each key's expiration date. `GET /api/v2/meta` reports the calling key's `expiresAt` and `scopes`.
52+
3653
## Send an API key [#using-api-keys]
3754

3855
Send the key in `X-API-Key`. The v2 API accepts `Authorization: Bearer` only for [OAuth access tokens](#oauth-access-tokens), not API keys. For example, with `SIM_API_KEY` and `WORKFLOW_ID` set:

‎apps/docs/content/docs/cli/authentication.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export SIM_WORKSPACE="2f6d0b1c-8a34-4d92-b7e5-31c8a0f45d67"
154154
sim workflows run 3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8 --input '{"source":"nightly"}' --output json
155155
```
156156

157-
The environment key overrides stored authentication. Use a workspace key only for supported workspace-scoped operations; organization audit logs and fork administration require a personal credential. Never commit credentials. `SIM_CONFIG_DIR` relocates local state when a runner has no writable home directory.
157+
The environment key overrides stored authentication. Use a workspace key only for supported workspace-scoped operations; organization audit logs and fork administration require a personal credential. A job that runs workflows needs a **Full access** key; a **Read only** key suits jobs that only read, such as exporting logs. Choose an expiration your secret rotation covers: an expired key fails with `401` and `API key has expired`. See [key access and expiration](/api-reference/authentication#key-access). Never commit credentials. `SIM_CONFIG_DIR` relocates local state when a runner has no writable home directory.
158158

159159
### GitHub Actions
160160

‎apps/docs/content/docs/mcp/authentication.mdx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ A personal key uses your current access in the workspaces you can reach. A works
5555

5656
The Cursor process must receive `SIM_API_KEY` for its environment interpolation to work. For a self-hosted deployment, replace the Cloud URL in both examples with your server URL.
5757

58+
For an agent that only reads, create a **Read only** key: it reaches the operations `api:read` allows, and a tool call that changes something or runs a workflow fails with `403` and the code `READ_ONLY_API_KEY`. Search and search chat still use credits. See [key access](/api-reference/authentication#key-access).
59+
5860
<Callout type="warn">
59-
Keys created in Sim settings have no default expiration. Revoke a key when it is no longer needed. Prefer OAuth for an app that
61+
Keys created in Sim settings never expire unless you choose an expiration. Revoke a key when it is no longer needed. Prefer OAuth for an app that
6062
supports browser sign-in, and store keys in your app's secret or environment
6163
settings rather than in a shared config file.
6264
</Callout>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@
566566
"PERMISSION_GROUP_CAPABILITY_BLOCKED",
567567
"INTEGRATION_NOT_ALLOWED",
568568
"INSUFFICIENT_SCOPE",
569+
"READ_ONLY_API_KEY",
569570
"SCIM_MANAGED_MEMBERSHIP"
570571
],
571572
"title": "Forbidden detail code",

‎apps/docs/openapi-v2-files-audit.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4713,6 +4713,7 @@
47134713
"PERMISSION_GROUP_CAPABILITY_BLOCKED",
47144714
"INTEGRATION_NOT_ALLOWED",
47154715
"INSUFFICIENT_SCOPE",
4716+
"READ_ONLY_API_KEY",
47164717
"SCIM_MANAGED_MEMBERSHIP"
47174718
],
47184719
"title": "Forbidden detail code",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6018,6 +6018,7 @@
60186018
"PERMISSION_GROUP_CAPABILITY_BLOCKED",
60196019
"INTEGRATION_NOT_ALLOWED",
60206020
"INSUFFICIENT_SCOPE",
6021+
"READ_ONLY_API_KEY",
60216022
"SCIM_MANAGED_MEMBERSHIP"
60226023
],
60236024
"title": "Forbidden detail code",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,7 @@
10651065
"PERMISSION_GROUP_CAPABILITY_BLOCKED",
10661066
"INTEGRATION_NOT_ALLOWED",
10671067
"INSUFFICIENT_SCOPE",
1068+
"READ_ONLY_API_KEY",
10681069
"SCIM_MANAGED_MEMBERSHIP"
10691070
],
10701071
"title": "Forbidden detail code",

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

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4947,7 +4947,7 @@
49474947
"get": {
49484948
"operationId": "getApiMeta",
49494949
"summary": "Get API status",
4950-
"description": "Get the calling credential’s type and expiry. Requires a valid API key or OAuth access token. `v2Enabled` is true whenever this endpoint is served; the response does not enumerate resource permissions.\n\nOAuth scope: `api:read`.",
4950+
"description": "Get the calling credential’s type, expiry, and API scopes. Requires a valid API key or OAuth access token. `v2Enabled` is true whenever this endpoint is served; the response does not enumerate resource permissions.\n\nOAuth scope: `api:read`.",
49514951
"x-sim-operation": "meta.capabilities.read",
49524952
"x-oauth-scope": "api:read",
49534953
"tags": ["Meta"],
@@ -4985,7 +4985,8 @@
49854985
"data": {
49864986
"v2Enabled": true,
49874987
"keyType": "personal",
4988-
"expiresAt": null
4988+
"expiresAt": null,
4989+
"scopes": ["api:read", "api:write"]
49894990
}
49904991
}
49914992
}
@@ -14807,6 +14808,7 @@
1480714808
"PERMISSION_GROUP_CAPABILITY_BLOCKED",
1480814809
"INTEGRATION_NOT_ALLOWED",
1480914810
"INSUFFICIENT_SCOPE",
14811+
"READ_ONLY_API_KEY",
1481014812
"SCIM_MANAGED_MEMBERSHIP"
1481114813
],
1481214814
"title": "Forbidden detail code",
@@ -18642,9 +18644,17 @@
1864218644
}
1864318645
],
1864418646
"description": "ISO 8601 timestamp when the calling credential expires, or null when it does not."
18647+
},
18648+
"scopes": {
18649+
"type": "array",
18650+
"items": {
18651+
"type": "string",
18652+
"enum": ["api:read", "api:write", "search:read"]
18653+
},
18654+
"description": "API scopes the calling credential holds. A read-only API key holds only api:read: it is refused every operation that changes state and every operation that declares no API scope, so api:read alone does not authorize those. A full-access key holds api:read and api:write; an OAuth access token holds what it was granted."
1864518655
}
1864618656
},
18647-
"required": ["v2Enabled", "keyType", "expiresAt"],
18657+
"required": ["v2Enabled", "keyType", "expiresAt", "scopes"],
1864818658
"additionalProperties": false,
1864918659
"title": "API status",
1865018660
"description": "API availability and lifecycle facts about the calling credential."
@@ -18660,13 +18670,14 @@
1866018670
"required": ["data"],
1866118671
"additionalProperties": false,
1866218672
"title": "API status response",
18663-
"description": "API availability, credential type, and expiry for the caller.",
18673+
"description": "API availability, credential type, expiry, and scopes for the caller.",
1866418674
"examples": [
1866518675
{
1866618676
"data": {
1866718677
"v2Enabled": true,
1866818678
"keyType": "personal",
18669-
"expiresAt": null
18679+
"expiresAt": null,
18680+
"scopes": ["api:read", "api:write"]
1867018681
}
1867118682
}
1867218683
]

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5977,6 +5977,7 @@
59775977
"PERMISSION_GROUP_CAPABILITY_BLOCKED",
59785978
"INTEGRATION_NOT_ALLOWED",
59795979
"INSUFFICIENT_SCOPE",
5980+
"READ_ONLY_API_KEY",
59805981
"SCIM_MANAGED_MEMBERSHIP"
59815982
],
59825983
"title": "Forbidden detail code",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7785,6 +7785,7 @@
77857785
"PERMISSION_GROUP_CAPABILITY_BLOCKED",
77867786
"INTEGRATION_NOT_ALLOWED",
77877787
"INSUFFICIENT_SCOPE",
7788+
"READ_ONLY_API_KEY",
77887789
"SCIM_MANAGED_MEMBERSHIP"
77897790
],
77907791
"title": "Forbidden detail code",

0 commit comments

Comments
 (0)