-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Expand file tree
/
Copy pathopenapi.json
More file actions
5936 lines (5936 loc) · 203 KB
/
openapi.json
File metadata and controls
5936 lines (5936 loc) · 203 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"openapi": "3.1.0",
"info": {
"title": "Sim API",
"description": "API for executing workflows, querying logs, and managing resources in Sim.",
"version": "1.0.0",
"contact": {
"name": "Sim Support",
"email": "help@sim.ai",
"url": "https://www.sim.ai"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"servers": [
{
"url": "https://www.sim.ai",
"description": "Production"
}
],
"tags": [
{
"name": "Workflows",
"description": "Execute workflows and manage workflow resources"
},
{
"name": "Logs",
"description": "Query execution logs and retrieve details"
},
{
"name": "Usage",
"description": "Check rate limits and billing usage"
},
{
"name": "Audit Logs",
"description": "View audit trail of workspace activity"
},
{
"name": "Tables",
"description": "Manage tables and rows for structured data storage"
},
{
"name": "Files",
"description": "Upload, download, and manage workspace files"
},
{
"name": "Knowledge Bases",
"description": "Manage knowledge bases, documents, and vector search"
}
],
"security": [
{
"apiKey": []
}
],
"paths": {
"/api/workflows/{id}/execute": {
"post": {
"operationId": "executeWorkflow",
"summary": "Execute Workflow",
"description": "Execute a deployed workflow. Supports synchronous, asynchronous, and streaming modes. For async execution, the response includes a statusUrl you can poll for results.",
"tags": ["Workflows"],
"x-codeSamples": [
{
"id": "curl",
"label": "cURL",
"lang": "bash",
"source": "curl -X POST \\\n \"https://www.sim.ai/api/workflows/{id}/execute\" \\\n -H \"X-API-Key: YOUR_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"input\": {\n \"key\": \"value\"\n }\n }'"
}
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"description": "The unique identifier of the deployed workflow to execute.",
"schema": {
"type": "string",
"example": "wf_1a2b3c4d5e"
}
}
],
"requestBody": {
"description": "Execution configuration including input values and execution mode options.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"input": {
"type": "object",
"description": "Key-value pairs matching the workflow's defined input fields. Use the Get Workflow endpoint to discover available input fields.",
"additionalProperties": true
},
"triggerType": {
"type": "string",
"description": "How this execution was triggered. Defaults to api when called via the REST API. Recorded in execution logs for filtering."
},
"stream": {
"type": "boolean",
"description": "When true, returns results as Server-Sent Events (SSE) for real-time block-by-block output streaming."
},
"selectedOutputs": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of specific block IDs whose outputs to include in the response. When omitted, all block outputs are returned."
}
}
},
"example": {
"input": {
"query": "What is the weather in Tokyo?"
}
}
}
}
},
"responses": {
"200": {
"description": "Synchronous execution completed successfully.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ExecutionResult"
},
"example": {
"success": true,
"executionId": "exec_abc123",
"output": {
"content": "The weather in Tokyo is sunny, 22\u00b0C."
},
"error": null,
"metadata": {
"startTime": "2026-01-15T10:30:00Z",
"endTime": "2026-01-15T10:30:01Z",
"duration": 1250
}
}
}
}
},
"202": {
"description": "Asynchronous execution has been queued. Poll the statusUrl for results.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AsyncExecutionResult"
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/RateLimited"
}
}
}
},
"/api/workflows/{id}/executions/{executionId}/cancel": {
"post": {
"operationId": "cancelExecution",
"summary": "Cancel Execution",
"description": "Cancel a running workflow execution. Only effective for executions that are still in progress.",
"tags": ["Workflows"],
"x-codeSamples": [
{
"id": "curl",
"label": "cURL",
"lang": "bash",
"source": "curl -X POST \\\n \"https://www.sim.ai/api/workflows/{id}/executions/{executionId}/cancel\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
}
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"description": "The unique identifier of the workflow.",
"schema": {
"type": "string",
"example": "wf_1a2b3c4d5e"
}
},
{
"name": "executionId",
"in": "path",
"required": true,
"description": "The unique identifier of the execution to cancel.",
"schema": {
"type": "string",
"example": "exec_9f8e7d6c5b"
}
}
],
"responses": {
"200": {
"description": "Execution was successfully cancelled.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Whether the cancellation was successful."
},
"executionId": {
"type": "string",
"description": "The ID of the cancelled execution."
}
}
},
"example": {
"success": true,
"executionId": "exec_abc123"
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
}
},
"/api/v1/workflows": {
"get": {
"operationId": "listWorkflows",
"summary": "List Workflows",
"description": "Retrieve all workflows in a workspace with cursor-based pagination.",
"tags": ["Workflows"],
"x-codeSamples": [
{
"id": "curl",
"label": "cURL",
"lang": "bash",
"source": "curl -X GET \\\n \"https://www.sim.ai/api/v1/workflows?workspaceId=YOUR_WORKSPACE_ID\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
}
],
"parameters": [
{
"$ref": "#/components/parameters/WorkspaceId"
},
{
"name": "folderId",
"in": "query",
"description": "Filter results to only include workflows within this folder.",
"schema": {
"type": "string"
}
},
{
"name": "deployedOnly",
"in": "query",
"description": "When true, only return workflows that have been deployed. Useful for listing workflows available for API execution.",
"schema": {
"type": "boolean"
}
},
{
"name": "limit",
"in": "query",
"description": "Maximum number of workflows to return per page. Must be between 1 and 100.",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
{
"name": "cursor",
"in": "query",
"description": "Pagination cursor returned from a previous request's nextCursor field. Omit for the first page.",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "A paginated list of workflows.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "array",
"description": "Array of workflow summary objects for the current page.",
"items": {
"$ref": "#/components/schemas/WorkflowSummary"
}
},
"nextCursor": {
"type": "string",
"nullable": true,
"description": "Cursor for fetching the next page of results. null when there are no more results."
},
"limits": {
"$ref": "#/components/schemas/Limits",
"description": "Rate limit and usage information for the current API key."
}
}
},
"example": {
"data": [
{
"id": "wf_abc123",
"name": "Weather Bot",
"isDeployed": true,
"createdAt": "2026-01-15T10:30:00Z",
"updatedAt": "2026-01-15T10:30:00Z"
}
],
"nextCursor": null
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"429": {
"$ref": "#/components/responses/RateLimited"
}
}
}
},
"/api/v1/workflows/{id}": {
"get": {
"operationId": "getWorkflow",
"summary": "Get Workflow",
"description": "Retrieve details for a single workflow, including its input fields and deployment status.",
"tags": ["Workflows"],
"x-codeSamples": [
{
"id": "curl",
"label": "cURL",
"lang": "bash",
"source": "curl -X GET \\\n \"https://www.sim.ai/api/v1/workflows/{id}\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
}
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"description": "The unique workflow identifier.",
"schema": {
"type": "string",
"example": "wf_1a2b3c4d5e"
}
}
],
"responses": {
"200": {
"description": "Workflow details including input field definitions.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"description": "The full workflow detail object.",
"$ref": "#/components/schemas/WorkflowDetail"
},
"limits": {
"$ref": "#/components/schemas/Limits",
"description": "Rate limit and usage information for the current API key."
}
}
},
"example": {
"data": {
"id": "wf_abc123",
"name": "Weather Bot",
"description": "A workflow that fetches weather data",
"isDeployed": true,
"createdAt": "2026-01-15T10:30:00Z",
"updatedAt": "2026-01-15T10:30:00Z"
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/RateLimited"
}
}
}
},
"/api/jobs/{jobId}": {
"get": {
"operationId": "getJobStatus",
"summary": "Get Job Status",
"description": "Poll the status of an asynchronous workflow execution. Use the jobId returned from the Execute Workflow endpoint when the execution is queued asynchronously.",
"tags": ["Workflows"],
"x-codeSamples": [
{
"id": "curl",
"label": "cURL",
"lang": "bash",
"source": "curl -X GET \\\n \"https://www.sim.ai/api/jobs/{jobId}\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
}
],
"parameters": [
{
"name": "jobId",
"in": "path",
"required": true,
"description": "The job identifier returned in the async execution response.",
"schema": {
"type": "string",
"example": "job_4a3b2c1d0e"
}
}
],
"responses": {
"200": {
"description": "Current status of the job. When completed, includes the execution output.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JobStatus"
},
"example": {
"success": true,
"taskId": "job_abc123",
"status": "completed",
"output": {
"content": "Done"
},
"metadata": {
"startTime": "2026-01-15T10:30:00Z"
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
}
}
},
"/api/v1/logs": {
"get": {
"operationId": "queryLogs",
"summary": "Query Logs",
"description": "List workflow execution logs with advanced filtering and cursor-based pagination. Supports filtering by workflow, trigger type, date range, duration, cost, and more.",
"tags": ["Logs"],
"x-codeSamples": [
{
"id": "curl",
"label": "cURL",
"lang": "bash",
"source": "curl -X GET \\\n \"https://www.sim.ai/api/v1/logs?workspaceId=YOUR_WORKSPACE_ID\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
}
],
"parameters": [
{
"$ref": "#/components/parameters/WorkspaceId"
},
{
"name": "workflowIds",
"in": "query",
"description": "Comma-separated list of workflow IDs to filter by. Only logs from these workflows will be returned.",
"schema": {
"type": "string"
}
},
{
"name": "folderIds",
"in": "query",
"description": "Comma-separated list of folder IDs. Returns logs for all workflows within these folders.",
"schema": {
"type": "string"
}
},
{
"name": "triggers",
"in": "query",
"description": "Comma-separated trigger types to filter by: api, webhook, schedule, manual, chat.",
"schema": {
"type": "string"
}
},
{
"name": "level",
"in": "query",
"description": "Filter logs by severity level. info for successful executions, error for failed ones.",
"schema": {
"type": "string"
}
},
{
"name": "startDate",
"in": "query",
"description": "Only return logs after this ISO 8601 timestamp (inclusive).",
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "endDate",
"in": "query",
"description": "Only return logs before this ISO 8601 timestamp (inclusive).",
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "executionId",
"in": "query",
"description": "Filter by an exact execution ID. Useful for looking up a specific run.",
"schema": {
"type": "string"
}
},
{
"name": "minDurationMs",
"in": "query",
"description": "Only return logs where execution took at least this many milliseconds.",
"schema": {
"type": "integer"
}
},
{
"name": "maxDurationMs",
"in": "query",
"description": "Only return logs where execution took at most this many milliseconds.",
"schema": {
"type": "integer"
}
},
{
"name": "minCost",
"in": "query",
"description": "Only return logs where execution cost at least this amount in USD.",
"schema": {
"type": "number"
}
},
{
"name": "maxCost",
"in": "query",
"description": "Only return logs where execution cost at most this amount in USD.",
"schema": {
"type": "number"
}
},
{
"name": "model",
"in": "query",
"description": "Filter by the AI model used during execution (e.g., gpt-4o, claude-sonnet-4-20250514).",
"schema": {
"type": "string"
}
},
{
"name": "details",
"in": "query",
"description": "Response detail level. basic returns summary fields only. full includes execution data, trace spans, and outputs.",
"schema": {
"type": "string"
}
},
{
"name": "includeTraceSpans",
"in": "query",
"description": "When true, includes block-level execution trace spans with timing and input/output data.",
"schema": {
"type": "boolean"
}
},
{
"name": "includeFinalOutput",
"in": "query",
"description": "When true, includes the workflow's final output in each log entry.",
"schema": {
"type": "boolean"
}
},
{
"name": "limit",
"in": "query",
"description": "Maximum number of log entries to return per page.",
"schema": {
"type": "integer"
}
},
{
"name": "cursor",
"in": "query",
"description": "Pagination cursor returned from a previous request's nextCursor field.",
"schema": {
"type": "string"
}
},
{
"name": "order",
"in": "query",
"description": "Sort order by execution start time. desc returns newest first.",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "A paginated list of execution logs matching the filter criteria.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "array",
"description": "Array of log entries for the current page.",
"items": {
"$ref": "#/components/schemas/LogEntry"
}
},
"nextCursor": {
"type": "string",
"nullable": true,
"description": "Cursor for fetching the next page. null when there are no more results."
},
"limits": {
"$ref": "#/components/schemas/Limits"
}
}
},
"example": {
"data": [
{
"id": "log_abc123",
"workflowId": "wf_abc123",
"level": "info",
"trigger": "api",
"createdAt": "2026-01-15T10:30:00Z"
}
],
"nextCursor": null
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"429": {
"$ref": "#/components/responses/RateLimited"
}
}
}
},
"/api/v1/logs/{id}": {
"get": {
"operationId": "getLogDetails",
"summary": "Get Log Details",
"description": "Retrieve detailed information about a specific log entry, including workflow metadata, execution data, and cost breakdown.",
"tags": ["Logs"],
"x-codeSamples": [
{
"id": "curl",
"label": "cURL",
"lang": "bash",
"source": "curl -X GET \\\n \"https://www.sim.ai/api/v1/logs/{id}\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
}
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"description": "The unique identifier of the log entry.",
"schema": {
"type": "string",
"example": "log_7x8y9z0a1b"
}
}
],
"responses": {
"200": {
"description": "Detailed log entry with full execution data and cost breakdown.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"description": "The full log detail object.",
"$ref": "#/components/schemas/LogDetail"
},
"limits": {
"$ref": "#/components/schemas/Limits"
}
}
},
"example": {
"data": {
"id": "log_abc123",
"workflowId": "wf_abc123",
"executionId": "exec_abc123",
"level": "info",
"trigger": "api",
"totalDurationMs": 1250,
"startedAt": "2026-01-15T10:30:00Z",
"endedAt": "2026-01-15T10:30:01Z",
"createdAt": "2026-01-15T10:30:00Z"
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/RateLimited"
}
}
}
},
"/api/v1/logs/executions/{executionId}": {
"get": {
"operationId": "getExecutionDetails",
"summary": "Get Execution Details",
"description": "Retrieve the full execution state snapshot, including the workflow state at time of execution and detailed metadata.",
"tags": ["Logs"],
"x-codeSamples": [
{
"id": "curl",
"label": "cURL",
"lang": "bash",
"source": "curl -X GET \\\n \"https://www.sim.ai/api/v1/logs/executions/{executionId}\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
}
],
"parameters": [
{
"name": "executionId",
"in": "path",
"required": true,
"description": "The unique execution identifier.",
"schema": {
"type": "string",
"example": "exec_9f8e7d6c5b"
}
}
],
"responses": {
"200": {
"description": "Full execution state snapshot with workflow state and metadata.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"executionId": {
"type": "string",
"description": "The unique identifier for this execution."
},
"workflowId": {
"type": "string",
"description": "The workflow that was executed."
},
"workflowState": {
"type": "object",
"description": "Snapshot of the workflow configuration at the time of execution.",
"properties": {
"blocks": {
"type": "object",
"description": "Map of block IDs to their configuration and state during execution."
},
"edges": {
"type": "array",
"description": "List of connections between blocks defining the execution flow.",
"items": {
"type": "object"
}
},
"loops": {
"type": "object",
"description": "Loop configurations defining iterative execution patterns."
},
"parallels": {
"type": "object",
"description": "Parallel execution group configurations."
}
}
},
"executionMetadata": {
"type": "object",
"description": "Metadata about the execution including timing and cost information.",
"properties": {
"trigger": {
"type": "string",
"description": "How the execution was triggered (e.g., api, manual, schedule)."
},
"startedAt": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp when execution started."
},
"endedAt": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp when execution completed."
},
"totalDurationMs": {
"type": "integer",
"description": "Total execution duration in milliseconds."
},
"cost": {
"type": "object",
"description": "Cost breakdown for this execution including per-model details."
}
}
},
"limits": {
"$ref": "#/components/schemas/Limits"
}
}
},
"example": {
"executionId": "exec_abc123",
"workflowId": "wf_abc123",
"workflowState": {},
"executionMetadata": {}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/RateLimited"
}
}
}
},
"/api/v1/audit-logs": {
"get": {
"operationId": "listAuditLogs",
"summary": "List Audit Logs",
"description": "Retrieve audit logs for your organization with cursor-based pagination. Requires an Enterprise subscription and organization admin or owner role.",
"tags": ["Audit Logs"],
"x-codeSamples": [
{
"id": "curl",
"label": "cURL",
"lang": "bash",
"source": "curl -X GET \\\n \"https://www.sim.ai/api/v1/audit-logs?workspaceId=YOUR_WORKSPACE_ID\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
}
],
"parameters": [
{
"name": "action",
"in": "query",
"description": "Filter by action type (e.g., workflow.created, workflow.deployed, member.invited).",
"schema": {
"type": "string"
}
},
{
"name": "resourceType",
"in": "query",
"description": "Filter by resource type (e.g., workflow, workspace, member).",
"schema": {
"type": "string"
}
},
{
"name": "resourceId",
"in": "query",
"description": "Filter by a specific resource ID.",
"schema": {
"type": "string"
}
},
{
"$ref": "#/components/parameters/WorkspaceId"
},
{
"name": "actorId",
"in": "query",
"description": "Filter by the user who performed the action. Must be a member of your organization.",
"schema": {
"type": "string"
}
},
{
"name": "startDate",
"in": "query",
"description": "Only return logs after this ISO 8601 timestamp (inclusive).",
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "endDate",
"in": "query",
"description": "Only return logs before this ISO 8601 timestamp (inclusive).",
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "includeDeparted",
"in": "query",
"description": "When true, includes audit logs from users who have left the organization.",
"schema": {
"type": "boolean"
}
},
{
"name": "limit",
"in": "query",
"description": "Maximum number of audit log entries to return per page. Must be between 1 and 100.",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
{
"name": "cursor",
"in": "query",
"description": "Pagination cursor returned from a previous request's nextCursor field.",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "A paginated list of audit log entries.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "array",
"description": "Array of audit log entries for the current page.",
"items": {
"$ref": "#/components/schemas/AuditLogEntry"
}
},
"nextCursor": {
"type": "string",
"nullable": true,
"description": "Cursor for fetching the next page. null when there are no more results."
},
"limits": {
"$ref": "#/components/schemas/Limits"
}
}