Skip to content

Commit 0f31294

Browse files
Merge branch 'improvement/v2-endpoints' into feat/sim-cli
2 parents 89b4d9b + 5692261 commit 0f31294

160 files changed

Lines changed: 37208 additions & 2489 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/openapi-v2-files-audit.json‎

Lines changed: 160 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,38 @@
7979
},
8080
{
8181
"$ref": "#/components/parameters/Cursor"
82+
},
83+
{
84+
"name": "folderId",
85+
"in": "query",
86+
"required": false,
87+
"description": "Restrict the list to one folder. Omit to list every file in the workspace.",
88+
"schema": { "type": "string", "minLength": 1 }
89+
},
90+
{
91+
"name": "search",
92+
"in": "query",
93+
"required": false,
94+
"description": "Case-insensitive substring match against the file `name`. Matches nothing else — not ids, descriptions, or content. `%` and `_` are matched literally. Must be non-empty; omit the parameter instead of sending a blank one.",
95+
"schema": { "type": "string", "minLength": 1, "maxLength": 200 }
96+
},
97+
{
98+
"name": "sortBy",
99+
"in": "query",
100+
"required": false,
101+
"description": "Field to sort by. The cursor is a keyset over the active sort, so it carries the sort it was minted under. Replaying a cursor after changing `sortBy` or `sortOrder` returns `400`; restart pagination without a cursor instead.",
102+
"schema": {
103+
"type": "string",
104+
"enum": ["name", "size", "uploadedAt", "updatedAt"],
105+
"default": "uploadedAt"
106+
}
107+
},
108+
{
109+
"name": "sortOrder",
110+
"in": "query",
111+
"required": false,
112+
"description": "Sort direction. The cursor is a keyset over the active sort, so it carries the sort it was minted under. Replaying a cursor after changing `sortBy` or `sortOrder` returns `400`; restart pagination without a cursor instead.",
113+
"schema": { "type": "string", "enum": ["asc", "desc"], "default": "asc" }
82114
}
83115
],
84116
"responses": {
@@ -137,7 +169,7 @@
137169
}
138170
}
139171
},
140-
"post": {
172+
"x-removed-buffered-post": {
141173
"operationId": "uploadFile",
142174
"summary": "Upload File",
143175
"description": "Upload a file to a workspace as `multipart/form-data` with a single `file` field. The workspace — and the optional target `folderId` — are supplied as query parameters (not form fields) so authorization runs before the request body is buffered. Maximum file size is 100MB. A name already taken in the destination folder is **not** an error: the name is auto-suffixed (`data.csv` -> `data (1).csv`), matching the in-app uploader, so a `201` can come back with a `name` different from the one you sent — always read `name` from the response rather than assuming it. `409` is returned only if a unique name cannot be allocated after several attempts. Use `PATCH /api/v2/files/{fileId}` if you need a specific name to be exact-or-fail. Returns `201 Created`.\n\nPresigned upload is not part of the public API: it debits the storage quota only in a separate register step, so a caller that never registers would leave unaccounted bytes in storage. This buffered path debits inside the upload transaction.",
@@ -283,6 +315,126 @@
283315
}
284316
}
285317
},
318+
"/api/v2/files/uploads": {
319+
"post": {
320+
"operationId": "createFileUpload",
321+
"summary": "Create File Upload",
322+
"description": "Create a stateless multipart upload session and signed upload token. Every file uses this flow; a small file is a single part. The maximum file size is 5 GB.",
323+
"tags": ["Files"],
324+
"requestBody": {
325+
"required": true,
326+
"content": { "application/json": { "schema": {} } }
327+
},
328+
"responses": {
329+
"201": {
330+
"description": "The upload session.",
331+
"content": { "application/json": { "schema": {} } }
332+
},
333+
"400": { "$ref": "#/components/responses/BadRequest" },
334+
"401": { "$ref": "#/components/responses/Unauthorized" },
335+
"403": { "$ref": "#/components/responses/Forbidden" },
336+
"429": { "$ref": "#/components/responses/RateLimited" },
337+
"500": { "$ref": "#/components/responses/InternalError" }
338+
}
339+
}
340+
},
341+
"/api/v2/files/uploads/{uploadId}": {
342+
"delete": {
343+
"operationId": "abortFileUpload",
344+
"summary": "Abort File Upload",
345+
"description": "Abort an incomplete upload and discard its provider parts.",
346+
"tags": ["Files"],
347+
"parameters": [
348+
{
349+
"name": "uploadId",
350+
"in": "path",
351+
"required": true,
352+
"schema": { "type": "string" }
353+
},
354+
{ "$ref": "#/components/parameters/WorkspaceIdQuery" },
355+
{ "$ref": "#/components/parameters/UploadTokenHeader" }
356+
],
357+
"responses": {
358+
"200": {
359+
"description": "The aborted upload session.",
360+
"content": { "application/json": { "schema": {} } }
361+
},
362+
"401": { "$ref": "#/components/responses/Unauthorized" },
363+
"404": { "$ref": "#/components/responses/NotFound" },
364+
"409": { "$ref": "#/components/responses/Conflict" },
365+
"429": { "$ref": "#/components/responses/RateLimited" },
366+
"500": { "$ref": "#/components/responses/InternalError" }
367+
}
368+
}
369+
},
370+
"/api/v2/files/uploads/{uploadId}/parts": {
371+
"post": {
372+
"operationId": "createFileUploadPartUrls",
373+
"summary": "Create File Upload Part URLs",
374+
"description": "Issue short-lived signed PUT URLs for a bounded set of upload part numbers.",
375+
"tags": ["Files"],
376+
"parameters": [
377+
{
378+
"name": "uploadId",
379+
"in": "path",
380+
"required": true,
381+
"schema": { "type": "string" }
382+
},
383+
{ "$ref": "#/components/parameters/WorkspaceIdQuery" },
384+
{ "$ref": "#/components/parameters/UploadTokenHeader" }
385+
],
386+
"requestBody": {
387+
"required": true,
388+
"content": { "application/json": { "schema": {} } }
389+
},
390+
"responses": {
391+
"200": {
392+
"description": "Signed URLs for the requested parts.",
393+
"content": { "application/json": { "schema": {} } }
394+
},
395+
"400": { "$ref": "#/components/responses/BadRequest" },
396+
"401": { "$ref": "#/components/responses/Unauthorized" },
397+
"404": { "$ref": "#/components/responses/NotFound" },
398+
"409": { "$ref": "#/components/responses/Conflict" },
399+
"429": { "$ref": "#/components/responses/RateLimited" },
400+
"500": { "$ref": "#/components/responses/InternalError" }
401+
}
402+
}
403+
},
404+
"/api/v2/files/uploads/{uploadId}/complete": {
405+
"post": {
406+
"operationId": "completeFileUpload",
407+
"summary": "Complete File Upload",
408+
"description": "Verify every part, assemble the object, and atomically register the workspace file.",
409+
"tags": ["Files"],
410+
"parameters": [
411+
{
412+
"name": "uploadId",
413+
"in": "path",
414+
"required": true,
415+
"schema": { "type": "string" }
416+
},
417+
{ "$ref": "#/components/parameters/WorkspaceIdQuery" },
418+
{ "$ref": "#/components/parameters/UploadTokenHeader" }
419+
],
420+
"requestBody": {
421+
"required": true,
422+
"content": { "application/json": { "schema": {} } }
423+
},
424+
"responses": {
425+
"200": {
426+
"description": "The completed upload and registered file.",
427+
"content": { "application/json": { "schema": {} } }
428+
},
429+
"400": { "$ref": "#/components/responses/BadRequest" },
430+
"401": { "$ref": "#/components/responses/Unauthorized" },
431+
"404": { "$ref": "#/components/responses/NotFound" },
432+
"409": { "$ref": "#/components/responses/Conflict" },
433+
"429": { "$ref": "#/components/responses/RateLimited" },
434+
"500": { "$ref": "#/components/responses/InternalError" }
435+
}
436+
}
437+
},
286438
"/api/v2/files/{fileId}": {
287439
"get": {
288440
"operationId": "downloadFile",
@@ -1525,6 +1677,13 @@
15251677
"example": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64"
15261678
}
15271679
},
1680+
"UploadTokenHeader": {
1681+
"name": "upload-token",
1682+
"in": "header",
1683+
"required": true,
1684+
"description": "The signed token returned when the multipart upload was created.",
1685+
"schema": { "type": "string", "minLength": 1 }
1686+
},
15281687
"FileIdPath": {
15291688
"name": "fileId",
15301689
"in": "path",

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,38 @@
4848
"parameters": [
4949
{
5050
"$ref": "#/components/parameters/WorkspaceIdQuery"
51+
},
52+
{
53+
"name": "folderId",
54+
"in": "query",
55+
"required": false,
56+
"description": "Restrict the list to one folder. Omit to list every knowledge base in the workspace.",
57+
"schema": { "type": "string", "minLength": 1 }
58+
},
59+
{
60+
"name": "search",
61+
"in": "query",
62+
"required": false,
63+
"description": "Case-insensitive substring match against the knowledge base `name`. Matches nothing else — not ids, descriptions, or content. `%` and `_` are matched literally. Must be non-empty; omit the parameter instead of sending a blank one.",
64+
"schema": { "type": "string", "minLength": 1, "maxLength": 200 }
65+
},
66+
{
67+
"name": "sortBy",
68+
"in": "query",
69+
"required": false,
70+
"description": "Field to sort by.",
71+
"schema": {
72+
"type": "string",
73+
"enum": ["name", "createdAt", "updatedAt"],
74+
"default": "createdAt"
75+
}
76+
},
77+
{
78+
"name": "sortOrder",
79+
"in": "query",
80+
"required": false,
81+
"description": "Sort direction.",
82+
"schema": { "type": "string", "enum": ["asc", "desc"], "default": "asc" }
5183
}
5284
],
5385
"responses": {

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

Lines changed: 134 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,34 @@
6161
"source": "curl \\\n \"https://www.sim.ai/api/v2/mcp-servers?workspaceId=YOUR_WORKSPACE_ID\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
6262
}
6363
],
64-
"parameters": [{ "$ref": "#/components/parameters/WorkspaceIdQuery" }],
64+
"parameters": [
65+
{ "$ref": "#/components/parameters/WorkspaceIdQuery" },
66+
{
67+
"name": "search",
68+
"in": "query",
69+
"required": false,
70+
"description": "Case-insensitive substring match against the MCP server `name`. Matches nothing else — not ids, descriptions, or content. `%` and `_` are matched literally. Must be non-empty; omit the parameter instead of sending a blank one.",
71+
"schema": { "type": "string", "minLength": 1, "maxLength": 200 }
72+
},
73+
{
74+
"name": "sortBy",
75+
"in": "query",
76+
"required": false,
77+
"description": "Field to sort by.",
78+
"schema": {
79+
"type": "string",
80+
"enum": ["name", "createdAt", "updatedAt"],
81+
"default": "createdAt"
82+
}
83+
},
84+
{
85+
"name": "sortOrder",
86+
"in": "query",
87+
"required": false,
88+
"description": "Sort direction.",
89+
"schema": { "type": "string", "enum": ["asc", "desc"], "default": "desc" }
90+
}
91+
],
6592
"responses": {
6693
"200": {
6794
"description": "MCP servers registered in the workspace.",
@@ -405,7 +432,34 @@
405432
"source": "curl \\\n \"https://www.sim.ai/api/v2/skills?workspaceId=YOUR_WORKSPACE_ID\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
406433
}
407434
],
408-
"parameters": [{ "$ref": "#/components/parameters/WorkspaceIdQuery" }],
435+
"parameters": [
436+
{ "$ref": "#/components/parameters/WorkspaceIdQuery" },
437+
{
438+
"name": "search",
439+
"in": "query",
440+
"required": false,
441+
"description": "Case-insensitive substring match against the skill `name`. Matches nothing else — not ids, descriptions, or content. `%` and `_` are matched literally. Must be non-empty; omit the parameter instead of sending a blank one.",
442+
"schema": { "type": "string", "minLength": 1, "maxLength": 200 }
443+
},
444+
{
445+
"name": "sortBy",
446+
"in": "query",
447+
"required": false,
448+
"description": "Field to sort by. Built-in skills have no stored timestamps and sort as if created at the Unix epoch.",
449+
"schema": {
450+
"type": "string",
451+
"enum": ["name", "createdAt", "updatedAt"],
452+
"default": "createdAt"
453+
}
454+
},
455+
{
456+
"name": "sortOrder",
457+
"in": "query",
458+
"required": false,
459+
"description": "Sort direction.",
460+
"schema": { "type": "string", "enum": ["asc", "desc"], "default": "desc" }
461+
}
462+
],
409463
"responses": {
410464
"200": {
411465
"description": "Skills available in the workspace.",
@@ -706,7 +760,34 @@
706760
"source": "curl \\\n \"https://www.sim.ai/api/v2/custom-tools?workspaceId=YOUR_WORKSPACE_ID\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
707761
}
708762
],
709-
"parameters": [{ "$ref": "#/components/parameters/WorkspaceIdQuery" }],
763+
"parameters": [
764+
{ "$ref": "#/components/parameters/WorkspaceIdQuery" },
765+
{
766+
"name": "search",
767+
"in": "query",
768+
"required": false,
769+
"description": "Case-insensitive substring match against the custom tool `title`. Matches nothing else — not ids, descriptions, or content. `%` and `_` are matched literally. Must be non-empty; omit the parameter instead of sending a blank one.",
770+
"schema": { "type": "string", "minLength": 1, "maxLength": 200 }
771+
},
772+
{
773+
"name": "sortBy",
774+
"in": "query",
775+
"required": false,
776+
"description": "Field to sort by.",
777+
"schema": {
778+
"type": "string",
779+
"enum": ["title", "createdAt", "updatedAt"],
780+
"default": "createdAt"
781+
}
782+
},
783+
{
784+
"name": "sortOrder",
785+
"in": "query",
786+
"required": false,
787+
"description": "Sort direction.",
788+
"schema": { "type": "string", "enum": ["asc", "desc"], "default": "desc" }
789+
}
790+
],
710791
"responses": {
711792
"200": {
712793
"description": "Custom tools defined in the workspace.",
@@ -1057,6 +1138,31 @@
10571138
"required": false,
10581139
"description": "`active` (default) lists live folders; `archived` lists Recently Deleted.",
10591140
"schema": { "type": "string", "enum": ["active", "archived"], "default": "active" }
1141+
},
1142+
{
1143+
"name": "search",
1144+
"in": "query",
1145+
"required": false,
1146+
"description": "Case-insensitive substring match against the folder `name`. Matches nothing else — not ids, descriptions, or content. `%` and `_` are matched literally. Must be non-empty; omit the parameter instead of sending a blank one.",
1147+
"schema": { "type": "string", "minLength": 1, "maxLength": 200 }
1148+
},
1149+
{
1150+
"name": "sortBy",
1151+
"in": "query",
1152+
"required": false,
1153+
"description": "Field to sort by. `position` is the tree's own manual arrangement, which is the default order.",
1154+
"schema": {
1155+
"type": "string",
1156+
"enum": ["position", "name", "createdAt", "updatedAt"],
1157+
"default": "position"
1158+
}
1159+
},
1160+
{
1161+
"name": "sortOrder",
1162+
"in": "query",
1163+
"required": false,
1164+
"description": "Sort direction.",
1165+
"schema": { "type": "string", "enum": ["asc", "desc"], "default": "asc" }
10601166
}
10611167
],
10621168
"responses": {
@@ -1407,6 +1513,31 @@
14071513
"required": false,
14081514
"description": "Only return credentials for this integration.",
14091515
"schema": { "type": "string", "minLength": 1, "example": "slack" }
1516+
},
1517+
{
1518+
"name": "search",
1519+
"in": "query",
1520+
"required": false,
1521+
"description": "Case-insensitive substring match against the credential `displayName`. Matches nothing else — not ids, descriptions, or content. `%` and `_` are matched literally. Must be non-empty; omit the parameter instead of sending a blank one.",
1522+
"schema": { "type": "string", "minLength": 1, "maxLength": 200 }
1523+
},
1524+
{
1525+
"name": "sortBy",
1526+
"in": "query",
1527+
"required": false,
1528+
"description": "Field to sort by.",
1529+
"schema": {
1530+
"type": "string",
1531+
"enum": ["displayName", "createdAt", "updatedAt"],
1532+
"default": "createdAt"
1533+
}
1534+
},
1535+
{
1536+
"name": "sortOrder",
1537+
"in": "query",
1538+
"required": false,
1539+
"description": "Sort direction.",
1540+
"schema": { "type": "string", "enum": ["asc", "desc"], "default": "desc" }
14101541
}
14111542
],
14121543
"responses": {

0 commit comments

Comments
 (0)