@epilot/sdk 2.3.9 → 2.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/definitions/access-token-runtime.json +1 -0
  2. package/definitions/access-token.json +663 -0
  3. package/definitions/address-runtime.json +1 -0
  4. package/definitions/address-suggestions-runtime.json +1 -0
  5. package/definitions/address-suggestions.json +582 -0
  6. package/definitions/address.json +578 -0
  7. package/definitions/ai-agents-runtime.json +1 -0
  8. package/definitions/ai-agents.json +1711 -0
  9. package/definitions/app-runtime.json +1 -0
  10. package/definitions/app.json +4493 -0
  11. package/definitions/audit-logs-runtime.json +1 -0
  12. package/definitions/audit-logs.json +305 -0
  13. package/definitions/automation-runtime.json +1 -0
  14. package/definitions/automation.json +5028 -0
  15. package/definitions/billing-runtime.json +1 -0
  16. package/definitions/billing.json +837 -0
  17. package/definitions/blueprint-manifest-runtime.json +1 -0
  18. package/definitions/blueprint-manifest.json +4846 -0
  19. package/definitions/configuration-hub-runtime.json +1 -0
  20. package/definitions/configuration-hub.json +611 -0
  21. package/definitions/consent-runtime.json +1 -0
  22. package/definitions/consent.json +344 -0
  23. package/definitions/customer-portal-runtime.json +1 -0
  24. package/definitions/customer-portal.json +16045 -0
  25. package/definitions/dashboard-runtime.json +1 -0
  26. package/definitions/dashboard.json +484 -0
  27. package/definitions/data-governance-runtime.json +1 -0
  28. package/definitions/data-governance.json +1126 -0
  29. package/definitions/deduplication-runtime.json +1 -0
  30. package/definitions/deduplication.json +314 -0
  31. package/definitions/design-runtime.json +1 -0
  32. package/definitions/design.json +1722 -0
  33. package/definitions/document-runtime.json +1 -0
  34. package/definitions/document.json +758 -0
  35. package/definitions/email-settings-runtime.json +1 -0
  36. package/definitions/email-settings.json +2777 -0
  37. package/definitions/email-template-runtime.json +1 -0
  38. package/definitions/email-template.json +1441 -0
  39. package/definitions/entity-mapping-runtime.json +1 -0
  40. package/definitions/entity-mapping.json +1642 -0
  41. package/definitions/entity-runtime.json +1 -0
  42. package/definitions/entity.json +10474 -0
  43. package/definitions/environments-runtime.json +1 -0
  44. package/definitions/environments.json +539 -0
  45. package/definitions/event-catalog-runtime.json +1 -0
  46. package/definitions/event-catalog.json +1051 -0
  47. package/definitions/file-runtime.json +1 -0
  48. package/definitions/file.json +2842 -0
  49. package/definitions/iban-runtime.json +1 -0
  50. package/definitions/iban.json +132 -0
  51. package/definitions/integration-toolkit-runtime.json +1 -0
  52. package/definitions/integration-toolkit.json +7998 -0
  53. package/definitions/journey-runtime.json +1 -0
  54. package/definitions/journey.json +2603 -0
  55. package/definitions/kanban-runtime.json +1 -0
  56. package/definitions/kanban.json +1505 -0
  57. package/definitions/message-runtime.json +1 -0
  58. package/definitions/message.json +2872 -0
  59. package/definitions/metering-runtime.json +1 -0
  60. package/definitions/metering.json +2321 -0
  61. package/definitions/notes-runtime.json +1 -0
  62. package/definitions/notes.json +1531 -0
  63. package/definitions/notification-runtime.json +1 -0
  64. package/definitions/notification.json +1425 -0
  65. package/definitions/organization-runtime.json +1 -0
  66. package/definitions/organization.json +1192 -0
  67. package/definitions/partner-directory-runtime.json +1 -0
  68. package/definitions/partner-directory.json +2284 -0
  69. package/definitions/permissions-runtime.json +1 -0
  70. package/definitions/permissions.json +1515 -0
  71. package/definitions/pricing-runtime.json +1 -0
  72. package/definitions/pricing-tier-runtime.json +1 -0
  73. package/definitions/pricing-tier.json +105 -0
  74. package/definitions/pricing.json +9884 -0
  75. package/definitions/purpose-runtime.json +1 -0
  76. package/definitions/purpose.json +524 -0
  77. package/definitions/query-runtime.json +1 -0
  78. package/definitions/query.json +3178 -0
  79. package/definitions/sandbox-runtime.json +1 -0
  80. package/definitions/sandbox.json +453 -0
  81. package/definitions/sharing-runtime.json +1 -0
  82. package/definitions/sharing.json +956 -0
  83. package/definitions/submission-runtime.json +1 -0
  84. package/definitions/submission.json +313 -0
  85. package/definitions/targeting-runtime.json +1 -0
  86. package/definitions/targeting.json +1474 -0
  87. package/definitions/template-variables-runtime.json +1 -0
  88. package/definitions/template-variables.json +1416 -0
  89. package/definitions/user-runtime.json +1 -0
  90. package/definitions/user.json +2460 -0
  91. package/definitions/validation-rules-runtime.json +1 -0
  92. package/definitions/validation-rules.json +1491 -0
  93. package/definitions/webhooks-runtime.json +1 -0
  94. package/definitions/webhooks.json +1634 -0
  95. package/definitions/workflow-definition-runtime.json +1 -0
  96. package/definitions/workflow-definition.json +3354 -0
  97. package/definitions/workflow-runtime.json +1 -0
  98. package/definitions/workflow.json +4272 -0
  99. package/dist/apis/access-token.cjs +6 -6
  100. package/dist/apis/access-token.js +1 -1
  101. package/dist/apis/address-suggestions.cjs +6 -6
  102. package/dist/apis/address-suggestions.js +1 -1
  103. package/dist/apis/address.cjs +6 -6
  104. package/dist/apis/address.js +1 -1
  105. package/dist/apis/ai-agents.cjs +6 -6
  106. package/dist/apis/ai-agents.js +1 -1
  107. package/dist/apis/app.cjs +6 -6
  108. package/dist/apis/app.js +1 -1
  109. package/dist/apis/audit-logs.cjs +6 -6
  110. package/dist/apis/audit-logs.js +1 -1
  111. package/dist/apis/automation.cjs +6 -6
  112. package/dist/apis/automation.js +1 -1
  113. package/dist/apis/billing.cjs +6 -6
  114. package/dist/apis/billing.js +1 -1
  115. package/dist/apis/blueprint-manifest.cjs +6 -6
  116. package/dist/apis/blueprint-manifest.js +1 -1
  117. package/dist/apis/configuration-hub.cjs +8 -8
  118. package/dist/apis/configuration-hub.d.cts +2 -2
  119. package/dist/apis/configuration-hub.d.ts +2 -2
  120. package/dist/apis/configuration-hub.js +2 -2
  121. package/dist/apis/consent.cjs +6 -6
  122. package/dist/apis/consent.js +1 -1
  123. package/dist/apis/customer-portal.cjs +6 -6
  124. package/dist/apis/customer-portal.js +1 -1
  125. package/dist/apis/dashboard.cjs +6 -6
  126. package/dist/apis/dashboard.js +1 -1
  127. package/dist/apis/data-governance.cjs +6 -6
  128. package/dist/apis/data-governance.js +1 -1
  129. package/dist/apis/deduplication.cjs +6 -6
  130. package/dist/apis/deduplication.js +1 -1
  131. package/dist/apis/design.cjs +6 -6
  132. package/dist/apis/design.js +1 -1
  133. package/dist/apis/document.cjs +6 -6
  134. package/dist/apis/document.js +1 -1
  135. package/dist/apis/email-settings.cjs +6 -6
  136. package/dist/apis/email-settings.js +1 -1
  137. package/dist/apis/email-template.cjs +6 -6
  138. package/dist/apis/email-template.js +1 -1
  139. package/dist/apis/entity-mapping.cjs +6 -6
  140. package/dist/apis/entity-mapping.js +1 -1
  141. package/dist/apis/entity.cjs +6 -6
  142. package/dist/apis/entity.js +1 -1
  143. package/dist/apis/environments.cjs +6 -6
  144. package/dist/apis/environments.js +1 -1
  145. package/dist/apis/event-catalog.cjs +6 -6
  146. package/dist/apis/event-catalog.js +1 -1
  147. package/dist/apis/file.cjs +6 -6
  148. package/dist/apis/file.js +1 -1
  149. package/dist/apis/iban.cjs +6 -6
  150. package/dist/apis/iban.js +1 -1
  151. package/dist/apis/integration-toolkit.cjs +6 -6
  152. package/dist/apis/integration-toolkit.js +1 -1
  153. package/dist/apis/journey.cjs +6 -6
  154. package/dist/apis/journey.js +1 -1
  155. package/dist/apis/kanban.cjs +6 -6
  156. package/dist/apis/kanban.js +1 -1
  157. package/dist/apis/message.cjs +6 -6
  158. package/dist/apis/message.js +1 -1
  159. package/dist/apis/metering.cjs +6 -6
  160. package/dist/apis/metering.js +1 -1
  161. package/dist/apis/notes.cjs +6 -6
  162. package/dist/apis/notes.js +1 -1
  163. package/dist/apis/notification.cjs +6 -6
  164. package/dist/apis/notification.js +1 -1
  165. package/dist/apis/organization.cjs +6 -6
  166. package/dist/apis/organization.js +1 -1
  167. package/dist/apis/partner-directory.cjs +6 -6
  168. package/dist/apis/partner-directory.js +1 -1
  169. package/dist/apis/permissions.cjs +6 -6
  170. package/dist/apis/permissions.js +1 -1
  171. package/dist/apis/pricing-tier.cjs +6 -6
  172. package/dist/apis/pricing-tier.js +1 -1
  173. package/dist/apis/pricing.cjs +6 -6
  174. package/dist/apis/pricing.js +1 -1
  175. package/dist/apis/purpose.cjs +6 -6
  176. package/dist/apis/purpose.js +1 -1
  177. package/dist/apis/query.cjs +6 -6
  178. package/dist/apis/query.js +1 -1
  179. package/dist/apis/sandbox.cjs +6 -6
  180. package/dist/apis/sandbox.js +1 -1
  181. package/dist/apis/sharing.cjs +6 -6
  182. package/dist/apis/sharing.js +1 -1
  183. package/dist/apis/submission.cjs +6 -6
  184. package/dist/apis/submission.js +1 -1
  185. package/dist/apis/target.cjs +6 -6
  186. package/dist/apis/target.js +1 -1
  187. package/dist/apis/targeting.cjs +6 -6
  188. package/dist/apis/targeting.js +1 -1
  189. package/dist/apis/template-variables.cjs +6 -6
  190. package/dist/apis/template-variables.js +1 -1
  191. package/dist/apis/user.cjs +6 -6
  192. package/dist/apis/user.js +1 -1
  193. package/dist/apis/validation-rules.cjs +6 -6
  194. package/dist/apis/validation-rules.js +1 -1
  195. package/dist/apis/webhooks.cjs +6 -6
  196. package/dist/apis/webhooks.js +1 -1
  197. package/dist/apis/workflow-definition.cjs +6 -6
  198. package/dist/apis/workflow-definition.d.cts +2 -2
  199. package/dist/apis/workflow-definition.d.ts +2 -2
  200. package/dist/apis/workflow-definition.js +1 -1
  201. package/dist/apis/workflow.cjs +6 -6
  202. package/dist/apis/workflow.d.cts +2 -2
  203. package/dist/apis/workflow.d.ts +2 -2
  204. package/dist/apis/workflow.js +1 -1
  205. package/dist/{chunk-L37V2R32.cjs → chunk-MDLNRFJV.cjs} +4 -4
  206. package/dist/chunk-ONOGGR6Q.js +14 -0
  207. package/dist/{chunk-OMNMMMRJ.js → chunk-W7YCS4FU.js} +4 -4
  208. package/dist/{chunk-VFCH5IEL.cjs → chunk-ZSONBZIF.cjs} +1 -1
  209. package/dist/configuration-hub-A3S6ND6R.cjs +7 -0
  210. package/dist/configuration-hub-PMAW44U5.js +7 -0
  211. package/dist/{configuration-hub-runtime-TY2X2ECO.cjs → configuration-hub-runtime-I5Y67CXD.cjs} +2 -2
  212. package/dist/{configuration-hub-runtime-5R6Y4KF7.js → configuration-hub-runtime-L6IOERSP.js} +1 -1
  213. package/dist/{configuration-hub.d-DZE3wTQE.d.cts → configuration-hub.d-Cqaq2F-W.d.cts} +111 -8
  214. package/dist/{configuration-hub.d-DZE3wTQE.d.ts → configuration-hub.d-Cqaq2F-W.d.ts} +111 -8
  215. package/dist/index.cjs +10 -10
  216. package/dist/index.d.cts +3 -3
  217. package/dist/index.d.ts +3 -3
  218. package/dist/index.js +2 -2
  219. package/dist/workflow-3WBD74WR.js +7 -0
  220. package/dist/workflow-WIUZ5TOX.cjs +7 -0
  221. package/dist/workflow-definition-2VF7S23G.js +7 -0
  222. package/dist/workflow-definition-U6YXD42W.cjs +7 -0
  223. package/dist/{workflow-definition.d-ByCJK9_x.d.ts → workflow-definition.d-DOeb0KVV.d.cts} +37 -1
  224. package/dist/{workflow-definition.d-ByCJK9_x.d.cts → workflow-definition.d-DOeb0KVV.d.ts} +37 -1
  225. package/dist/{workflow.d-pD8ISOg-.d.ts → workflow.d-CMSKt8oN.d.cts} +22 -1
  226. package/dist/{workflow.d-pD8ISOg-.d.cts → workflow.d-CMSKt8oN.d.ts} +22 -1
  227. package/docs/configuration-hub.md +112 -15
  228. package/docs/workflow-definition.md +40 -8
  229. package/docs/workflow.md +57 -11
  230. package/package.json +1 -1
  231. package/dist/chunk-AOFZDDXN.js +0 -14
  232. package/dist/configuration-hub-2F636SNK.js +0 -7
  233. package/dist/configuration-hub-XQGJK2JA.cjs +0 -7
  234. package/dist/workflow-CQOBZ25C.cjs +0 -7
  235. package/dist/workflow-G7VFCXY7.js +0 -7
  236. package/dist/workflow-definition-CVBYKAUY.cjs +0 -7
  237. package/dist/workflow-definition-GNAKDNG7.js +0 -7
@@ -0,0 +1,3178 @@
1
+ {
2
+ "openapi": "3.0.0",
3
+ "info": {
4
+ "title": "Query API",
5
+ "description": "The Query API provides access to epilot's business analytics capabilities, enabling teams to query entity operations, workflow executions, and automation data stored in the epilot data lake.\n\n**Key capabilities**\n\n- **Entity queries** – Aggregate and filter entity operation events (create, update, delete) and point-in-time entity snapshots using `executeEntitiesQuery`.\n- **Workflow analytics** – Query workflow execution counts, time series, phase durations, and task overviews using `executeWorkflowsQuery`.\n- **Automation analytics** – Inspect automation execution history and list automation definitions via `executeAutomationQuery`.\n- **Datalake V2 views** – Create and manage materialized SQL views over epilot data using `createOrUpdateView` and related endpoints.\n- **BI tool integration** – Generate and manage ClickHouse credentials for connecting external BI tools (e.g. Tableau, Power BI) directly to the epilot data warehouse.\n- **Semantic model** – Retrieve the semantic data model for agent/tool consumption via `getSemanticModel`.\n\n**Concepts**\n\n- **Measures** – Quantitative values to aggregate (e.g. `count_operations`, `count_entities`).\n- **Dimensions** – Categorical groupings (e.g. `entity_attribute`, `time_with_granularity`).\n- **Filters** – Constraints narrowing the dataset (e.g. time range, entity schema, workflow state).\n- **Datasets** – Named data sources available for querying. Discover them with `listAvailableDatasetsV2`.\n\n**Authentication**\n\nAll endpoints require a valid epilot Bearer token.\n",
6
+ "version": "0.2.0"
7
+ },
8
+ "tags": [
9
+ {
10
+ "name": "Datasets",
11
+ "description": "Endpoints for discovering available datasets grouped by domain (entity, workflow, etc.)"
12
+ },
13
+ {
14
+ "name": "Query",
15
+ "description": "Execute analytical queries against epilot entity and workflow datasets.\n\nUse measures, dimensions, and filters to aggregate and slice data for dashboards, reports, and business intelligence.\n"
16
+ },
17
+ {
18
+ "name": "V1",
19
+ "description": "V1 query endpoints (maintained for backwards compatibility – prefer V2 endpoints for new integrations)"
20
+ },
21
+ {
22
+ "name": "V2",
23
+ "description": "V2 query endpoints including semantic model, autocomplete, and direct SQL-like query execution"
24
+ },
25
+ {
26
+ "name": "Datalake V2",
27
+ "description": "Manage materialized SQL views and table relationships in the epilot data lake.\n\nViews expose entity, taxonomy, and workflow data as queryable tables that can be used by BI tools connecting via ClickHouse credentials.\n"
28
+ },
29
+ {
30
+ "name": "CredentialsV2",
31
+ "description": "Manage ClickHouse credentials for connecting external BI tools directly to the epilot data warehouse"
32
+ }
33
+ ],
34
+ "security": [
35
+ {
36
+ "EpilotAuth": []
37
+ }
38
+ ],
39
+ "paths": {
40
+ "/datalake/views": {
41
+ "post": {
42
+ "summary": "createOrUpdateView",
43
+ "operationId": "createOrUpdateView",
44
+ "description": "Create or update a materialized SQL view in the epilot data lake.\n\nViews expose epilot data (entities, taxonomies, workflow executions) as queryable tables that can be used by BI tools or queried directly. If a view with the same `view_name` already exists, it is updated.\n",
45
+ "tags": [
46
+ "Datalake V2"
47
+ ],
48
+ "requestBody": {
49
+ "required": true,
50
+ "content": {
51
+ "application/json": {
52
+ "schema": {
53
+ "$ref": "#/components/schemas/ViewRequest"
54
+ },
55
+ "examples": {
56
+ "Current Entities View": {
57
+ "summary": "Create a view for current entities",
58
+ "value": {
59
+ "view_name": "some_view",
60
+ "source_dataset": "current_entities",
61
+ "config": {
62
+ "schema": "some_schema",
63
+ "include_purpose_view": true,
64
+ "include_label_view": true,
65
+ "include_relation_view": true,
66
+ "relationship_attribute": [
67
+ "some_relationship_attribute"
68
+ ]
69
+ }
70
+ }
71
+ },
72
+ "Taxonomies View": {
73
+ "summary": "Create a view for taxonomies",
74
+ "value": {
75
+ "view_name": "some_view",
76
+ "source_dataset": "taxonomies"
77
+ }
78
+ },
79
+ "Workflow Executions View": {
80
+ "summary": "Create a view for workflow executions",
81
+ "value": {
82
+ "view_name": "some_view",
83
+ "source_dataset": "workflow_executions"
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+ },
90
+ "responses": {
91
+ "200": {
92
+ "description": "View created or updated successfully",
93
+ "content": {
94
+ "application/json": {
95
+ "schema": {
96
+ "$ref": "#/components/schemas/ViewResponse"
97
+ }
98
+ }
99
+ }
100
+ },
101
+ "400": {
102
+ "$ref": "#/components/responses/BadRequestResponse"
103
+ },
104
+ "401": {
105
+ "$ref": "#/components/responses/UnauthorizedResponse"
106
+ },
107
+ "403": {
108
+ "$ref": "#/components/responses/ForbiddenResponse"
109
+ },
110
+ "500": {
111
+ "$ref": "#/components/responses/InternalServerErrorResponse"
112
+ }
113
+ }
114
+ },
115
+ "get": {
116
+ "summary": "getAllViews",
117
+ "operationId": "getAllViews",
118
+ "description": "Retrieve all materialized data lake views configured for the organization.",
119
+ "tags": [
120
+ "Datalake V2"
121
+ ],
122
+ "responses": {
123
+ "200": {
124
+ "description": "List of views retrieved successfully",
125
+ "content": {
126
+ "application/json": {
127
+ "schema": {
128
+ "$ref": "#/components/schemas/ViewsListResponse"
129
+ }
130
+ }
131
+ }
132
+ },
133
+ "401": {
134
+ "$ref": "#/components/responses/UnauthorizedResponse"
135
+ },
136
+ "500": {
137
+ "$ref": "#/components/responses/InternalServerErrorResponse"
138
+ }
139
+ }
140
+ }
141
+ },
142
+ "/datalake/views/{view_slug}": {
143
+ "get": {
144
+ "summary": "getView",
145
+ "operationId": "getView",
146
+ "description": "Retrieve the definition and attributes of a specific data lake view by its slug.",
147
+ "tags": [
148
+ "Datalake V2"
149
+ ],
150
+ "parameters": [
151
+ {
152
+ "name": "view_slug",
153
+ "in": "path",
154
+ "required": true,
155
+ "description": "The URL-safe slug identifier of the view",
156
+ "schema": {
157
+ "type": "string"
158
+ },
159
+ "example": "some_view"
160
+ }
161
+ ],
162
+ "responses": {
163
+ "200": {
164
+ "description": "View details retrieved successfully",
165
+ "content": {
166
+ "application/json": {
167
+ "schema": {
168
+ "$ref": "#/components/schemas/ViewResponse"
169
+ }
170
+ }
171
+ }
172
+ },
173
+ "401": {
174
+ "$ref": "#/components/responses/UnauthorizedResponse"
175
+ },
176
+ "404": {
177
+ "$ref": "#/components/responses/NotFoundResponse"
178
+ },
179
+ "500": {
180
+ "$ref": "#/components/responses/InternalServerErrorResponse"
181
+ }
182
+ }
183
+ }
184
+ },
185
+ "/datalake/relationships": {
186
+ "post": {
187
+ "summary": "createOrUpdateRelationship",
188
+ "operationId": "createOrUpdateRelationship",
189
+ "description": "Define or update a relationship between two tables in the data lake.\n\nRelationships enable JOIN operations in views and queries. If a relationship with the same `relationship_name` already exists, it is updated.\n",
190
+ "tags": [
191
+ "Datalake V2"
192
+ ],
193
+ "requestBody": {
194
+ "required": true,
195
+ "content": {
196
+ "application/json": {
197
+ "schema": {
198
+ "$ref": "#/components/schemas/RelationshipRequest"
199
+ },
200
+ "example": {
201
+ "relationship_name": "some_relationship",
202
+ "from_table": "some_table",
203
+ "to_table": "some_table",
204
+ "from_column": "some_column",
205
+ "to_column": "some_column",
206
+ "type": "one_to_many"
207
+ }
208
+ }
209
+ }
210
+ },
211
+ "responses": {
212
+ "200": {
213
+ "description": "Relationship created or updated successfully",
214
+ "content": {
215
+ "application/json": {
216
+ "schema": {
217
+ "$ref": "#/components/schemas/RelationshipResponse"
218
+ }
219
+ }
220
+ }
221
+ },
222
+ "400": {
223
+ "$ref": "#/components/responses/BadRequestResponse"
224
+ },
225
+ "401": {
226
+ "$ref": "#/components/responses/UnauthorizedResponse"
227
+ },
228
+ "403": {
229
+ "$ref": "#/components/responses/ForbiddenResponse"
230
+ },
231
+ "500": {
232
+ "$ref": "#/components/responses/InternalServerErrorResponse"
233
+ }
234
+ }
235
+ },
236
+ "get": {
237
+ "summary": "getAllRelationships",
238
+ "operationId": "getAllRelationships",
239
+ "description": "Retrieve all table relationships configured for the organization's data lake.",
240
+ "tags": [
241
+ "Datalake V2"
242
+ ],
243
+ "responses": {
244
+ "200": {
245
+ "description": "List of relationships retrieved successfully",
246
+ "content": {
247
+ "application/json": {
248
+ "schema": {
249
+ "$ref": "#/components/schemas/RelationshipsListResponse"
250
+ }
251
+ }
252
+ }
253
+ },
254
+ "401": {
255
+ "$ref": "#/components/responses/UnauthorizedResponse"
256
+ },
257
+ "500": {
258
+ "$ref": "#/components/responses/InternalServerErrorResponse"
259
+ }
260
+ }
261
+ }
262
+ },
263
+ "/v2/query/datasets": {
264
+ "get": {
265
+ "operationId": "listAvailableDatasetsV2",
266
+ "summary": "listAvailableDatasetsV2",
267
+ "description": "Lists all available datasets grouped by domain\n\nCurrent domains are:\n - Entity\n - Workflow\n",
268
+ "tags": [
269
+ "Datasets"
270
+ ],
271
+ "responses": {
272
+ "200": {
273
+ "description": "List of available datasets for the user",
274
+ "content": {
275
+ "application/json": {
276
+ "schema": {
277
+ "type": "object",
278
+ "properties": {
279
+ "results": {
280
+ "type": "array",
281
+ "items": {
282
+ "$ref": "#/components/schemas/Dataset"
283
+ },
284
+ "example": [
285
+ {
286
+ "domain": "entities",
287
+ "dataset": "entity_operations",
288
+ "endpoint": "/v2/query/domain/entities:execute"
289
+ },
290
+ {
291
+ "domain": "workflows",
292
+ "dataset": "workflow_execution_time_series",
293
+ "endpoint": "/v2/query/domain/workflows:execute"
294
+ },
295
+ {
296
+ "domain": "workflows",
297
+ "dataset": "phases_duration",
298
+ "endpoint": "/v2/query/domain/workflows:execute"
299
+ }
300
+ ]
301
+ }
302
+ }
303
+ }
304
+ }
305
+ }
306
+ },
307
+ "401": {
308
+ "$ref": "#/components/responses/UnauthorizedResponse"
309
+ },
310
+ "500": {
311
+ "$ref": "#/components/responses/InternalServerErrorResponse"
312
+ }
313
+ }
314
+ }
315
+ },
316
+ "/v2/query/domain/entities:execute": {
317
+ "post": {
318
+ "operationId": "executeEntitiesQuery",
319
+ "summary": "executeEntitiesQuery",
320
+ "description": "Execute queries against entities datasets.\n\n**Measures** are referred to as quantitative data, such as number of unique entities, operations, sum of profit, and so on.\n\n**Dimensions** are referred to as categorical data, such as workflow status, product name, or units of time (e.g., day, week, month).\n\n**Filters** are used to narrow down the dataset to be more specific e.g. only to a time range or specific entity schemas.\n",
321
+ "tags": [
322
+ "Query"
323
+ ],
324
+ "parameters": [
325
+ {
326
+ "in": "query",
327
+ "name": "cache_expiration",
328
+ "schema": {
329
+ "$ref": "#/components/schemas/CacheExpiration"
330
+ }
331
+ },
332
+ {
333
+ "in": "query",
334
+ "name": "no_cache",
335
+ "schema": {
336
+ "$ref": "#/components/schemas/NoCache"
337
+ }
338
+ }
339
+ ],
340
+ "requestBody": {
341
+ "required": false,
342
+ "content": {
343
+ "application/json": {
344
+ "schema": {
345
+ "type": "object",
346
+ "properties": {
347
+ "query": {
348
+ "$ref": "#/components/schemas/DatalakeQuery"
349
+ }
350
+ }
351
+ },
352
+ "examples": {
353
+ "Number of new submissions this month": {
354
+ "value": {
355
+ "query": {
356
+ "dataset": "entity_operations",
357
+ "measure": "count_operations",
358
+ "filters": [
359
+ {
360
+ "operation": [
361
+ "createEntity"
362
+ ]
363
+ },
364
+ {
365
+ "entity_schema": [
366
+ "submission"
367
+ ]
368
+ },
369
+ {
370
+ "time_between": [
371
+ "2022-05-01T00:00:00Z",
372
+ "2022-08-01T00:00:00Z"
373
+ ]
374
+ }
375
+ ],
376
+ "exclude_deleted": true
377
+ }
378
+ }
379
+ },
380
+ "Opportunities created by journeys by month": {
381
+ "value": {
382
+ "query": {
383
+ "dataset": "entity_operations",
384
+ "measure": "count_operations",
385
+ "filters": [
386
+ {
387
+ "operation": [
388
+ "createEntity"
389
+ ]
390
+ },
391
+ {
392
+ "entity_schema": [
393
+ "opportunity"
394
+ ]
395
+ },
396
+ {
397
+ "time_between": [
398
+ "2022-01-01T00:00:00Z",
399
+ "2023-01-01T00:00:00Z"
400
+ ]
401
+ }
402
+ ],
403
+ "dimensions": [
404
+ {
405
+ "entity_attribute": "source.title",
406
+ "as": "Journey Title"
407
+ },
408
+ {
409
+ "time_with_granularity": "year-month"
410
+ }
411
+ ],
412
+ "exclude_deleted": true
413
+ }
414
+ }
415
+ },
416
+ "Total number of opportunities by workflow step": {
417
+ "value": {
418
+ "query": {
419
+ "dataset": "entities_timemachine",
420
+ "measure": "count_entities",
421
+ "point_in_time": "CURRENT_DATE",
422
+ "filters": [
423
+ {
424
+ "entity_schema": [
425
+ "opportunity"
426
+ ]
427
+ }
428
+ ],
429
+ "dimensions": [
430
+ {
431
+ "entity_attribute": "workflows.0.next_open_step_name",
432
+ "as": "Workflow Step"
433
+ }
434
+ ]
435
+ }
436
+ }
437
+ },
438
+ "Total number of orders by status": {
439
+ "value": {
440
+ "query": {
441
+ "dataset": "entities_timemachine",
442
+ "measure": "count_entities",
443
+ "point_in_time": "CURRENT_DATE",
444
+ "filters": [
445
+ {
446
+ "entity_schema": [
447
+ "order"
448
+ ]
449
+ }
450
+ ],
451
+ "dimensions": [
452
+ {
453
+ "entity_attribute": "status"
454
+ }
455
+ ]
456
+ }
457
+ }
458
+ }
459
+ }
460
+ }
461
+ }
462
+ },
463
+ "responses": {
464
+ "200": {
465
+ "description": "Query results",
466
+ "content": {
467
+ "application/json": {
468
+ "schema": {
469
+ "$ref": "#/components/schemas/QueryResults"
470
+ }
471
+ }
472
+ }
473
+ },
474
+ "400": {
475
+ "$ref": "#/components/responses/BadRequestResponse"
476
+ },
477
+ "401": {
478
+ "$ref": "#/components/responses/UnauthorizedResponse"
479
+ },
480
+ "403": {
481
+ "$ref": "#/components/responses/ForbiddenResponse"
482
+ },
483
+ "500": {
484
+ "$ref": "#/components/responses/InternalServerErrorResponse"
485
+ }
486
+ }
487
+ }
488
+ },
489
+ "/v2/query/domain/workflows:execute": {
490
+ "post": {
491
+ "operationId": "executeWorkflowsQuery",
492
+ "summary": "executeWorkflowsQuery",
493
+ "description": "Query Workflow Analytics Datasets.",
494
+ "tags": [
495
+ "Query"
496
+ ],
497
+ "parameters": [
498
+ {
499
+ "in": "query",
500
+ "name": "mock",
501
+ "schema": {
502
+ "type": "boolean",
503
+ "default": false
504
+ }
505
+ },
506
+ {
507
+ "in": "query",
508
+ "name": "cache_expiration",
509
+ "schema": {
510
+ "$ref": "#/components/schemas/CacheExpiration"
511
+ }
512
+ },
513
+ {
514
+ "in": "query",
515
+ "name": "no_cache",
516
+ "schema": {
517
+ "$ref": "#/components/schemas/NoCache"
518
+ }
519
+ }
520
+ ],
521
+ "requestBody": {
522
+ "content": {
523
+ "application/json": {
524
+ "schema": {
525
+ "anyOf": [
526
+ {
527
+ "$ref": "#/components/schemas/WorkflowsQueryOptions"
528
+ },
529
+ {
530
+ "$ref": "#/components/schemas/DatasetOptions.TotalCountOfWorkflowExecutions"
531
+ },
532
+ {
533
+ "$ref": "#/components/schemas/DatasetOptions.WorkflowExecutionTimeSeries"
534
+ },
535
+ {
536
+ "$ref": "#/components/schemas/DatasetOptions.CumulativeSumOfWorkflows"
537
+ },
538
+ {
539
+ "$ref": "#/components/schemas/DatasetOptions.CancellationReasons"
540
+ },
541
+ {
542
+ "$ref": "#/components/schemas/DatasetOptions.WorkflowTasksOverview"
543
+ }
544
+ ]
545
+ }
546
+ }
547
+ }
548
+ },
549
+ "responses": {
550
+ "200": {
551
+ "description": "Query results",
552
+ "content": {
553
+ "application/json": {
554
+ "schema": {
555
+ "$ref": "#/components/schemas/WorkflowsQueryResult"
556
+ }
557
+ }
558
+ }
559
+ },
560
+ "400": {
561
+ "$ref": "#/components/responses/BadRequestResponse"
562
+ },
563
+ "401": {
564
+ "$ref": "#/components/responses/UnauthorizedResponse"
565
+ },
566
+ "403": {
567
+ "$ref": "#/components/responses/ForbiddenResponse"
568
+ },
569
+ "500": {
570
+ "$ref": "#/components/responses/InternalServerErrorResponse"
571
+ }
572
+ }
573
+ }
574
+ },
575
+ "/v2/query/domain/automations:execute": {
576
+ "post": {
577
+ "operationId": "executeAutomationQuery",
578
+ "summary": "executeAutomationQuery",
579
+ "description": "Query Automation Analytics Datasets.",
580
+ "tags": [
581
+ "Query"
582
+ ],
583
+ "parameters": [
584
+ {
585
+ "in": "query",
586
+ "name": "from",
587
+ "schema": {
588
+ "type": "number",
589
+ "default": 0
590
+ }
591
+ },
592
+ {
593
+ "in": "query",
594
+ "name": "size",
595
+ "schema": {
596
+ "type": "number",
597
+ "default": 25
598
+ }
599
+ }
600
+ ],
601
+ "requestBody": {
602
+ "content": {
603
+ "application/json": {
604
+ "schema": {
605
+ "anyOf": [
606
+ {
607
+ "$ref": "#/components/schemas/DatasetOptions.AutomationExecutionsOverview"
608
+ },
609
+ {
610
+ "$ref": "#/components/schemas/DatasetOptions.ListAutomationDefinitions"
611
+ }
612
+ ]
613
+ },
614
+ "examples": {
615
+ "Automation Executions Overview": {
616
+ "value": {
617
+ "dataset": "automation_executions_overview",
618
+ "flow_ids": [
619
+ "flow_123",
620
+ "flow_456"
621
+ ],
622
+ "execution_states": [
623
+ "success",
624
+ "failed",
625
+ "scheduled"
626
+ ],
627
+ "relative_time_range": "this_month",
628
+ "time_range_from": "2024-01-01",
629
+ "time_range_to": "2024-01-31"
630
+ }
631
+ },
632
+ "List Automation Definitions": {
633
+ "value": {
634
+ "dataset": "list_automation_definitions",
635
+ "search": "email"
636
+ }
637
+ }
638
+ }
639
+ }
640
+ }
641
+ },
642
+ "responses": {
643
+ "200": {
644
+ "description": "Query results",
645
+ "content": {
646
+ "application/json": {
647
+ "schema": {
648
+ "anyOf": [
649
+ {
650
+ "$ref": "#/components/schemas/AutomationExecutionResponse"
651
+ },
652
+ {
653
+ "$ref": "#/components/schemas/ListAutomationDefinitionsResponse"
654
+ }
655
+ ]
656
+ }
657
+ }
658
+ }
659
+ },
660
+ "400": {
661
+ "$ref": "#/components/responses/BadRequestResponse"
662
+ },
663
+ "401": {
664
+ "$ref": "#/components/responses/UnauthorizedResponse"
665
+ },
666
+ "403": {
667
+ "$ref": "#/components/responses/ForbiddenResponse"
668
+ },
669
+ "500": {
670
+ "$ref": "#/components/responses/InternalServerErrorResponse"
671
+ }
672
+ }
673
+ }
674
+ },
675
+ "/v2/query/domain/workflows/definitions/{workflowDefinitionId}/phases": {
676
+ "get": {
677
+ "operationId": "listWorkflowPhasesByDefinitionId",
678
+ "summary": "listWorkflowPhasesByDefinitionId",
679
+ "description": "Retrieves the workflow phases associated with a given workflow definition ID.\n",
680
+ "tags": [
681
+ "Query"
682
+ ],
683
+ "parameters": [
684
+ {
685
+ "in": "path",
686
+ "name": "workflowDefinitionId",
687
+ "required": true,
688
+ "schema": {
689
+ "type": "string"
690
+ },
691
+ "description": "The ID of the workflow definition to retrieve phases for."
692
+ }
693
+ ],
694
+ "responses": {
695
+ "200": {
696
+ "description": "A list of workflow phases associated with the specified definition ID.",
697
+ "content": {
698
+ "application/json": {
699
+ "schema": {
700
+ "type": "array",
701
+ "items": {
702
+ "type": "object",
703
+ "properties": {
704
+ "id": {
705
+ "type": "string",
706
+ "description": "The unique identifier of the workflow phase.",
707
+ "example": "y0UdVCOI"
708
+ },
709
+ "name": {
710
+ "type": "string",
711
+ "description": "The name of the workflow phase.",
712
+ "example": "Initial Phase"
713
+ }
714
+ }
715
+ }
716
+ },
717
+ "example": [
718
+ {
719
+ "id": "y0UdVCOI",
720
+ "name": "Initial Phase"
721
+ },
722
+ {
723
+ "id": "g2HdNJKP",
724
+ "name": "Final Phase"
725
+ }
726
+ ]
727
+ }
728
+ }
729
+ },
730
+ "401": {
731
+ "$ref": "#/components/responses/UnauthorizedResponse"
732
+ },
733
+ "404": {
734
+ "$ref": "#/components/responses/NotFoundResponse"
735
+ },
736
+ "500": {
737
+ "$ref": "#/components/responses/InternalServerErrorResponse"
738
+ }
739
+ }
740
+ }
741
+ },
742
+ "/v2/query/domain/workflows/definitions": {
743
+ "get": {
744
+ "operationId": "listWorkflowDefinitions",
745
+ "summary": "listWorkflowDefinitions",
746
+ "description": "Lists available worflow definitions with their ids, names and start times\n",
747
+ "tags": [
748
+ "Query"
749
+ ],
750
+ "parameters": [
751
+ {
752
+ "in": "query",
753
+ "name": "mock",
754
+ "schema": {
755
+ "type": "boolean",
756
+ "default": false
757
+ }
758
+ }
759
+ ],
760
+ "responses": {
761
+ "200": {
762
+ "description": "List of available workflow definitions",
763
+ "content": {
764
+ "application/json": {
765
+ "schema": {
766
+ "type": "object",
767
+ "properties": {
768
+ "results": {
769
+ "type": "array",
770
+ "items": {
771
+ "type": "object",
772
+ "properties": {
773
+ "id": {
774
+ "type": "string",
775
+ "example": "y0UdVCOI"
776
+ },
777
+ "name": {
778
+ "type": "string",
779
+ "example": "PV Kauf"
780
+ },
781
+ "max_date": {
782
+ "type": "string",
783
+ "format": "date-time",
784
+ "example": "2023-05-31T00:00:00.000Z"
785
+ },
786
+ "min_date": {
787
+ "type": "string",
788
+ "format": "date-time",
789
+ "example": "2023-01-00T00:00:00.000Z"
790
+ }
791
+ },
792
+ "required": [
793
+ "id",
794
+ "name",
795
+ "max_date",
796
+ "min_date"
797
+ ]
798
+ }
799
+ }
800
+ }
801
+ }
802
+ }
803
+ }
804
+ },
805
+ "401": {
806
+ "$ref": "#/components/responses/UnauthorizedResponse"
807
+ },
808
+ "500": {
809
+ "$ref": "#/components/responses/InternalServerErrorResponse"
810
+ }
811
+ }
812
+ }
813
+ },
814
+ "/v2/query/domain/workflows/phases": {
815
+ "get": {
816
+ "operationId": "listPhaseNames",
817
+ "summary": "listPhaseNames",
818
+ "description": "Lists phase names of an org.\n",
819
+ "tags": [
820
+ "Query"
821
+ ],
822
+ "parameters": [
823
+ {
824
+ "in": "query",
825
+ "name": "org_id",
826
+ "schema": {
827
+ "type": "string"
828
+ }
829
+ }
830
+ ],
831
+ "responses": {
832
+ "200": {
833
+ "description": "List of available phases",
834
+ "content": {
835
+ "application/json": {
836
+ "schema": {
837
+ "type": "object",
838
+ "properties": {
839
+ "results": {
840
+ "type": "array",
841
+ "items": {
842
+ "type": "object",
843
+ "properties": {
844
+ "id": {
845
+ "type": "string",
846
+ "example": "y0UdVCOI"
847
+ },
848
+ "name": {
849
+ "type": "string",
850
+ "example": "PV Kauf"
851
+ },
852
+ "max_date": {
853
+ "type": "string",
854
+ "format": "date-time",
855
+ "example": "2023-05-31T00:00:00.000Z"
856
+ },
857
+ "min_date": {
858
+ "type": "string",
859
+ "format": "date-time",
860
+ "example": "2023-01-00T00:00:00.000Z"
861
+ }
862
+ },
863
+ "required": [
864
+ "id",
865
+ "name",
866
+ "max_date",
867
+ "min_date"
868
+ ]
869
+ }
870
+ }
871
+ }
872
+ }
873
+ }
874
+ }
875
+ },
876
+ "401": {
877
+ "$ref": "#/components/responses/UnauthorizedResponse"
878
+ },
879
+ "500": {
880
+ "$ref": "#/components/responses/InternalServerErrorResponse"
881
+ }
882
+ }
883
+ }
884
+ },
885
+ "/v1/query/datasets": {
886
+ "get": {
887
+ "operationId": "listDatasets",
888
+ "summary": "listDatasets",
889
+ "description": "Get list of available datasets",
890
+ "tags": [
891
+ "V1"
892
+ ],
893
+ "responses": {
894
+ "200": {
895
+ "description": "List of available datasets",
896
+ "content": {
897
+ "application/json": {
898
+ "schema": {
899
+ "type": "object",
900
+ "properties": {
901
+ "results": {
902
+ "type": "array",
903
+ "items": {
904
+ "$ref": "#/components/schemas/Dataset"
905
+ }
906
+ }
907
+ },
908
+ "example": {
909
+ "results": [
910
+ {
911
+ "dataset": "entity_operations"
912
+ },
913
+ {
914
+ "dataset": "entities_timemachine"
915
+ }
916
+ ]
917
+ }
918
+ }
919
+ }
920
+ }
921
+ },
922
+ "401": {
923
+ "$ref": "#/components/responses/UnauthorizedResponse"
924
+ },
925
+ "500": {
926
+ "$ref": "#/components/responses/InternalServerErrorResponse"
927
+ }
928
+ }
929
+ }
930
+ },
931
+ "/v1/query:execute": {
932
+ "post": {
933
+ "operationId": "executeQuery",
934
+ "summary": "executeQuery",
935
+ "description": "Execute queries against datasets.\n\n**Measures** are referred to as quantitative data, such as number of unique entities, operations, sum of profit, and so on.\n\n**Dimensions** are referred to as categorical data, such as workflow status, product name, or units of time (e.g., day, week, month).\n\n**Filters** are used to narrow down the dataset to be more specific e.g. only to a time range or specific entity schemas.\n",
936
+ "tags": [
937
+ "V1"
938
+ ],
939
+ "parameters": [
940
+ {
941
+ "in": "query",
942
+ "name": "cache_expiration",
943
+ "schema": {
944
+ "$ref": "#/components/schemas/CacheExpiration"
945
+ }
946
+ },
947
+ {
948
+ "in": "query",
949
+ "name": "no_cache",
950
+ "schema": {
951
+ "$ref": "#/components/schemas/NoCache"
952
+ }
953
+ }
954
+ ],
955
+ "requestBody": {
956
+ "required": false,
957
+ "content": {
958
+ "application/json": {
959
+ "schema": {
960
+ "type": "object",
961
+ "properties": {
962
+ "query": {
963
+ "$ref": "#/components/schemas/DatalakeQuery"
964
+ }
965
+ }
966
+ },
967
+ "examples": {
968
+ "Number of new submissions this month": {
969
+ "value": {
970
+ "query": {
971
+ "dataset": "entity_operations",
972
+ "measure": "count_operations",
973
+ "filters": [
974
+ {
975
+ "operation": [
976
+ "createEntity"
977
+ ]
978
+ },
979
+ {
980
+ "entity_schema": [
981
+ "submission"
982
+ ]
983
+ },
984
+ {
985
+ "time_between": [
986
+ "2022-05-01T00:00:00Z",
987
+ "2022-08-01T00:00:00Z"
988
+ ]
989
+ }
990
+ ],
991
+ "exclude_deleted": true
992
+ }
993
+ }
994
+ },
995
+ "Opportunities created by journeys by month": {
996
+ "value": {
997
+ "query": {
998
+ "dataset": "entity_operations",
999
+ "measure": "count_operations",
1000
+ "filters": [
1001
+ {
1002
+ "operation": [
1003
+ "createEntity"
1004
+ ]
1005
+ },
1006
+ {
1007
+ "entity_schema": [
1008
+ "opportunity"
1009
+ ]
1010
+ },
1011
+ {
1012
+ "time_between": [
1013
+ "2022-01-01T00:00:00Z",
1014
+ "2023-01-01T00:00:00Z"
1015
+ ]
1016
+ }
1017
+ ],
1018
+ "dimensions": [
1019
+ {
1020
+ "entity_attribute": "source.title",
1021
+ "as": "Journey Title"
1022
+ },
1023
+ {
1024
+ "time_with_granularity": "year-month"
1025
+ }
1026
+ ],
1027
+ "exclude_deleted": true
1028
+ }
1029
+ }
1030
+ },
1031
+ "Total number of opportunities by workflow step": {
1032
+ "value": {
1033
+ "query": {
1034
+ "dataset": "entities_timemachine",
1035
+ "measure": "count_entities",
1036
+ "point_in_time": "CURRENT_DATE",
1037
+ "filters": [
1038
+ {
1039
+ "entity_schema": [
1040
+ "opportunity"
1041
+ ]
1042
+ }
1043
+ ],
1044
+ "dimensions": [
1045
+ {
1046
+ "entity_attribute": "workflows.0.next_open_step_name",
1047
+ "as": "Workflow Step"
1048
+ }
1049
+ ]
1050
+ }
1051
+ }
1052
+ },
1053
+ "Total number of orders by status": {
1054
+ "value": {
1055
+ "query": {
1056
+ "dataset": "entities_timemachine",
1057
+ "measure": "count_entities",
1058
+ "point_in_time": "CURRENT_DATE",
1059
+ "filters": [
1060
+ {
1061
+ "entity_schema": [
1062
+ "order"
1063
+ ]
1064
+ }
1065
+ ],
1066
+ "dimensions": [
1067
+ {
1068
+ "entity_attribute": "status"
1069
+ }
1070
+ ]
1071
+ }
1072
+ }
1073
+ }
1074
+ }
1075
+ }
1076
+ }
1077
+ },
1078
+ "responses": {
1079
+ "200": {
1080
+ "description": "Query results",
1081
+ "content": {
1082
+ "application/json": {
1083
+ "schema": {
1084
+ "$ref": "#/components/schemas/QueryResults"
1085
+ }
1086
+ }
1087
+ }
1088
+ },
1089
+ "400": {
1090
+ "$ref": "#/components/responses/BadRequestResponse"
1091
+ },
1092
+ "401": {
1093
+ "$ref": "#/components/responses/UnauthorizedResponse"
1094
+ },
1095
+ "403": {
1096
+ "$ref": "#/components/responses/ForbiddenResponse"
1097
+ },
1098
+ "500": {
1099
+ "$ref": "#/components/responses/InternalServerErrorResponse"
1100
+ }
1101
+ }
1102
+ }
1103
+ },
1104
+ "/v2/query/credentials:generate": {
1105
+ "post": {
1106
+ "operationId": "generateCredentialsV2",
1107
+ "summary": "generateCredentialsV2",
1108
+ "description": "Generate credentials for the epilot datalake for connecting other BI tools with ClickHouse\n",
1109
+ "tags": [
1110
+ "CredentialsV2"
1111
+ ],
1112
+ "responses": {
1113
+ "200": {
1114
+ "description": "Permanent credentials and endpoints",
1115
+ "content": {
1116
+ "application/json": {
1117
+ "schema": {
1118
+ "type": "object",
1119
+ "properties": {
1120
+ "username": {
1121
+ "type": "string",
1122
+ "example": "datalakeuser_sfsdfs_66"
1123
+ },
1124
+ "password": {
1125
+ "type": "string",
1126
+ "example": "***"
1127
+ },
1128
+ "endpoints": {
1129
+ "type": "object",
1130
+ "properties": {
1131
+ "host": {
1132
+ "type": "string",
1133
+ "example": "qjjcxsy87t.eu-central-1.aws.clickhouse.cloud"
1134
+ },
1135
+ "port": {
1136
+ "type": "string",
1137
+ "example": 8443
1138
+ }
1139
+ }
1140
+ },
1141
+ "database": {
1142
+ "type": "string",
1143
+ "example": "datawarehouse"
1144
+ }
1145
+ }
1146
+ }
1147
+ }
1148
+ }
1149
+ },
1150
+ "401": {
1151
+ "$ref": "#/components/responses/UnauthorizedResponse"
1152
+ },
1153
+ "403": {
1154
+ "$ref": "#/components/responses/ForbiddenResponse"
1155
+ },
1156
+ "500": {
1157
+ "$ref": "#/components/responses/InternalServerErrorResponse"
1158
+ }
1159
+ }
1160
+ }
1161
+ },
1162
+ "/v2/query/credentials:list": {
1163
+ "get": {
1164
+ "operationId": "listCredentialsV2",
1165
+ "summary": "listCredentialsV2",
1166
+ "description": "List all the credentialof Clickhouse for the organization here",
1167
+ "tags": [
1168
+ "CredentialsV2"
1169
+ ],
1170
+ "responses": {
1171
+ "200": {
1172
+ "description": "Temporary credentials and endpoints",
1173
+ "content": {
1174
+ "application/json": {
1175
+ "schema": {
1176
+ "type": "object",
1177
+ "properties": {
1178
+ "users": {
1179
+ "type": "array",
1180
+ "items": {
1181
+ "type": "object",
1182
+ "properties": {
1183
+ "user_id": {
1184
+ "type": "string"
1185
+ }
1186
+ }
1187
+ }
1188
+ }
1189
+ }
1190
+ }
1191
+ }
1192
+ }
1193
+ },
1194
+ "401": {
1195
+ "$ref": "#/components/responses/UnauthorizedResponse"
1196
+ },
1197
+ "403": {
1198
+ "$ref": "#/components/responses/ForbiddenResponse"
1199
+ },
1200
+ "500": {
1201
+ "$ref": "#/components/responses/InternalServerErrorResponse"
1202
+ }
1203
+ }
1204
+ }
1205
+ },
1206
+ "/v2/query/credentials:revoke": {
1207
+ "post": {
1208
+ "operationId": "revokeCredentialsV2",
1209
+ "summary": "revokeCredentialsV2",
1210
+ "description": "Revoke credentials for the epilot datalake for connecting other BI tools with Clickhouse\n",
1211
+ "tags": [
1212
+ "CredentialsV2"
1213
+ ],
1214
+ "parameters": [
1215
+ {
1216
+ "in": "query",
1217
+ "name": "user_id",
1218
+ "schema": {
1219
+ "$ref": "#/components/schemas/UserId"
1220
+ }
1221
+ }
1222
+ ],
1223
+ "responses": {
1224
+ "200": {
1225
+ "description": "Permanent credentials and endpoints",
1226
+ "content": {
1227
+ "application/json": {
1228
+ "schema": {
1229
+ "type": "object",
1230
+ "properties": {
1231
+ "success": {
1232
+ "type": "boolean",
1233
+ "example": true
1234
+ }
1235
+ }
1236
+ }
1237
+ }
1238
+ }
1239
+ },
1240
+ "401": {
1241
+ "$ref": "#/components/responses/UnauthorizedResponse"
1242
+ },
1243
+ "403": {
1244
+ "$ref": "#/components/responses/ForbiddenResponse"
1245
+ },
1246
+ "404": {
1247
+ "$ref": "#/components/responses/NotFoundResponse"
1248
+ },
1249
+ "500": {
1250
+ "$ref": "#/components/responses/InternalServerErrorResponse"
1251
+ }
1252
+ }
1253
+ }
1254
+ },
1255
+ "/v2/query:execute": {
1256
+ "post": {
1257
+ "operationId": "executeQueryV2",
1258
+ "summary": "executeQueryV2",
1259
+ "description": "Execute queries against datasets.\n\n**Measures** are referred to as quantitative data, such as number of unique entities, operations, sum of profit, and so on.\n\n**Dimensions** are referred to as categorical data, such as workflow status, product name, or units of time (e.g., day, week, month).\n\n**Filters** are used to narrow down the dataset to be more specific e.g. only to a time range or specific entity schemas.\n",
1260
+ "tags": [
1261
+ "V2"
1262
+ ],
1263
+ "requestBody": {
1264
+ "required": false,
1265
+ "content": {
1266
+ "application/json": {
1267
+ "schema": {
1268
+ "type": "object",
1269
+ "additionalProperties": true
1270
+ }
1271
+ }
1272
+ }
1273
+ },
1274
+ "responses": {
1275
+ "200": {
1276
+ "description": "Query results",
1277
+ "content": {
1278
+ "application/json": {
1279
+ "schema": {
1280
+ "$ref": "#/components/schemas/QueryResults"
1281
+ }
1282
+ }
1283
+ }
1284
+ },
1285
+ "400": {
1286
+ "$ref": "#/components/responses/BadRequestResponse"
1287
+ },
1288
+ "401": {
1289
+ "$ref": "#/components/responses/UnauthorizedResponse"
1290
+ },
1291
+ "403": {
1292
+ "$ref": "#/components/responses/ForbiddenResponse"
1293
+ },
1294
+ "500": {
1295
+ "$ref": "#/components/responses/InternalServerErrorResponse"
1296
+ }
1297
+ }
1298
+ }
1299
+ },
1300
+ "/v2/query/semantic-model": {
1301
+ "get": {
1302
+ "operationId": "getSemanticModel",
1303
+ "summary": "getSemanticModel",
1304
+ "description": "Get the semantic model for agent/tool consumption.\n\nReturns available entities, their relationships, and supported query capabilities\nincluding aggregations, calculation types, date granularities, and filter operators.\n",
1305
+ "tags": [
1306
+ "V2"
1307
+ ],
1308
+ "responses": {
1309
+ "200": {
1310
+ "description": "Semantic model with entities, relationships, and capabilities",
1311
+ "content": {
1312
+ "application/json": {
1313
+ "schema": {
1314
+ "$ref": "#/components/schemas/SemanticModel"
1315
+ }
1316
+ }
1317
+ }
1318
+ },
1319
+ "401": {
1320
+ "$ref": "#/components/responses/UnauthorizedResponse"
1321
+ },
1322
+ "500": {
1323
+ "$ref": "#/components/responses/InternalServerErrorResponse"
1324
+ }
1325
+ }
1326
+ }
1327
+ },
1328
+ "/v2/query/autocomplete": {
1329
+ "get": {
1330
+ "operationId": "autocomplete",
1331
+ "summary": "autocomplete",
1332
+ "description": "Generic autocomplete endpoint for querying distinct values across datasets.\nUse the dataset parameter to specify which data category to query.\n",
1333
+ "tags": [
1334
+ "V2"
1335
+ ],
1336
+ "parameters": [
1337
+ {
1338
+ "name": "dataset",
1339
+ "in": "query",
1340
+ "description": "The dataset category to autocomplete against",
1341
+ "required": true,
1342
+ "schema": {
1343
+ "type": "string",
1344
+ "enum": [
1345
+ "workflows",
1346
+ "purposes",
1347
+ "sharing_configs",
1348
+ "partners"
1349
+ ]
1350
+ }
1351
+ },
1352
+ {
1353
+ "name": "input",
1354
+ "in": "query",
1355
+ "description": "Input text to autocomplete",
1356
+ "schema": {
1357
+ "type": "string"
1358
+ }
1359
+ },
1360
+ {
1361
+ "name": "attribute",
1362
+ "in": "query",
1363
+ "description": "Attribute to autocomplete in table.column format (e.g., current_purposes.name)",
1364
+ "required": true,
1365
+ "schema": {
1366
+ "type": "string",
1367
+ "example": "current_purposes.name"
1368
+ }
1369
+ },
1370
+ {
1371
+ "name": "size",
1372
+ "in": "query",
1373
+ "description": "Maximum number of results to return",
1374
+ "schema": {
1375
+ "type": "integer",
1376
+ "default": 25,
1377
+ "minimum": 1,
1378
+ "maximum": 250
1379
+ }
1380
+ }
1381
+ ],
1382
+ "responses": {
1383
+ "200": {
1384
+ "description": "Success",
1385
+ "content": {
1386
+ "application/json": {
1387
+ "schema": {
1388
+ "type": "object",
1389
+ "properties": {
1390
+ "results": {
1391
+ "type": "array",
1392
+ "items": {
1393
+ "anyOf": [
1394
+ {
1395
+ "type": "string"
1396
+ },
1397
+ {
1398
+ "type": "boolean"
1399
+ },
1400
+ {
1401
+ "type": "object",
1402
+ "additionalProperties": true
1403
+ }
1404
+ ]
1405
+ },
1406
+ "example": [
1407
+ "value"
1408
+ ]
1409
+ }
1410
+ }
1411
+ }
1412
+ }
1413
+ }
1414
+ },
1415
+ "400": {
1416
+ "$ref": "#/components/responses/BadRequestResponse"
1417
+ },
1418
+ "401": {
1419
+ "$ref": "#/components/responses/UnauthorizedResponse"
1420
+ },
1421
+ "500": {
1422
+ "$ref": "#/components/responses/InternalServerErrorResponse"
1423
+ }
1424
+ }
1425
+ }
1426
+ },
1427
+ "/v2/query/workflows:autocomplete": {
1428
+ "get": {
1429
+ "operationId": "workflowsAutocomplete",
1430
+ "summary": "workflowsAutocomplete",
1431
+ "description": "Autocomplete Workflows data\n",
1432
+ "tags": [
1433
+ "V2"
1434
+ ],
1435
+ "parameters": [
1436
+ {
1437
+ "name": "input",
1438
+ "in": "query",
1439
+ "description": "Input to autocomplete",
1440
+ "schema": {
1441
+ "type": "string"
1442
+ }
1443
+ },
1444
+ {
1445
+ "name": "attribute",
1446
+ "in": "query",
1447
+ "description": "Autocomplete attribute",
1448
+ "schema": {
1449
+ "type": "string",
1450
+ "example": "name"
1451
+ },
1452
+ "required": true
1453
+ },
1454
+ {
1455
+ "name": "size",
1456
+ "in": "query",
1457
+ "description": "Maximum number of results to return",
1458
+ "schema": {
1459
+ "type": "integer",
1460
+ "default": 25,
1461
+ "minimum": 1,
1462
+ "maximum": 250
1463
+ }
1464
+ }
1465
+ ],
1466
+ "responses": {
1467
+ "200": {
1468
+ "description": "Success",
1469
+ "content": {
1470
+ "application/json": {
1471
+ "schema": {
1472
+ "type": "object",
1473
+ "properties": {
1474
+ "results": {
1475
+ "type": "array",
1476
+ "items": {
1477
+ "anyOf": [
1478
+ {
1479
+ "type": "string"
1480
+ },
1481
+ {
1482
+ "type": "boolean"
1483
+ },
1484
+ {
1485
+ "type": "object",
1486
+ "additionalProperties": true
1487
+ }
1488
+ ]
1489
+ },
1490
+ "example": [
1491
+ "value"
1492
+ ]
1493
+ }
1494
+ }
1495
+ }
1496
+ }
1497
+ }
1498
+ },
1499
+ "400": {
1500
+ "$ref": "#/components/responses/BadRequestResponse"
1501
+ },
1502
+ "401": {
1503
+ "$ref": "#/components/responses/UnauthorizedResponse"
1504
+ },
1505
+ "500": {
1506
+ "$ref": "#/components/responses/InternalServerErrorResponse"
1507
+ }
1508
+ }
1509
+ }
1510
+ }
1511
+ },
1512
+ "components": {
1513
+ "schemas": {
1514
+ "ErrorResponse": {
1515
+ "type": "object",
1516
+ "description": "Standard error response body",
1517
+ "properties": {
1518
+ "status": {
1519
+ "type": "integer",
1520
+ "description": "HTTP status code",
1521
+ "example": 400
1522
+ },
1523
+ "error": {
1524
+ "type": "string",
1525
+ "description": "Short error label",
1526
+ "example": "Bad Request"
1527
+ },
1528
+ "message": {
1529
+ "type": "string",
1530
+ "description": "Human-readable description of the error",
1531
+ "example": "Invalid query parameters provided"
1532
+ }
1533
+ }
1534
+ },
1535
+ "ViewRequest": {
1536
+ "oneOf": [
1537
+ {
1538
+ "$ref": "#/components/schemas/CurrentEntitiesViewRequest"
1539
+ },
1540
+ {
1541
+ "$ref": "#/components/schemas/TaxonomiesViewRequest"
1542
+ },
1543
+ {
1544
+ "$ref": "#/components/schemas/WorkflowExecutionsViewRequest"
1545
+ }
1546
+ ],
1547
+ "discriminator": {
1548
+ "propertyName": "source_dataset"
1549
+ }
1550
+ },
1551
+ "CurrentEntitiesViewRequest": {
1552
+ "type": "object",
1553
+ "required": [
1554
+ "source_dataset",
1555
+ "config"
1556
+ ],
1557
+ "properties": {
1558
+ "view_name": {
1559
+ "type": "string"
1560
+ },
1561
+ "source_dataset": {
1562
+ "type": "string",
1563
+ "enum": [
1564
+ "current_entities"
1565
+ ]
1566
+ },
1567
+ "config": {
1568
+ "type": "object",
1569
+ "required": [
1570
+ "schema"
1571
+ ],
1572
+ "properties": {
1573
+ "schema": {
1574
+ "type": "string"
1575
+ },
1576
+ "include_purpose_view": {
1577
+ "type": "boolean"
1578
+ },
1579
+ "include_label_view": {
1580
+ "type": "boolean"
1581
+ },
1582
+ "include_relation_view": {
1583
+ "type": "boolean"
1584
+ },
1585
+ "relationship_attribute": {
1586
+ "type": "array",
1587
+ "items": {
1588
+ "type": "string"
1589
+ }
1590
+ }
1591
+ }
1592
+ }
1593
+ },
1594
+ "example": {
1595
+ "view_name": "some_view",
1596
+ "source_dataset": "current_entities",
1597
+ "config": {
1598
+ "schema": "some_schema",
1599
+ "include_purpose_view": true,
1600
+ "include_label_view": true,
1601
+ "include_relation_view": true,
1602
+ "relationship_attribute": [
1603
+ "some_relationship_attribute"
1604
+ ]
1605
+ }
1606
+ }
1607
+ },
1608
+ "TaxonomiesViewRequest": {
1609
+ "type": "object",
1610
+ "required": [
1611
+ "source_dataset"
1612
+ ],
1613
+ "properties": {
1614
+ "view_name": {
1615
+ "type": "string"
1616
+ },
1617
+ "source_dataset": {
1618
+ "type": "string",
1619
+ "enum": [
1620
+ "taxonomies"
1621
+ ]
1622
+ }
1623
+ },
1624
+ "example": {
1625
+ "view_name": "some_view",
1626
+ "source_dataset": "taxonomies"
1627
+ }
1628
+ },
1629
+ "WorkflowExecutionsViewRequest": {
1630
+ "type": "object",
1631
+ "required": [
1632
+ "source_dataset"
1633
+ ],
1634
+ "properties": {
1635
+ "view_name": {
1636
+ "type": "string"
1637
+ },
1638
+ "source_dataset": {
1639
+ "type": "string",
1640
+ "enum": [
1641
+ "workflow_executions"
1642
+ ]
1643
+ }
1644
+ },
1645
+ "example": {
1646
+ "view_name": "some_view",
1647
+ "source_dataset": "workflow_executions"
1648
+ }
1649
+ },
1650
+ "ViewResponse": {
1651
+ "type": "object",
1652
+ "required": [
1653
+ "view_name",
1654
+ "source_dataset",
1655
+ "attributes"
1656
+ ],
1657
+ "properties": {
1658
+ "view_name": {
1659
+ "type": "string"
1660
+ },
1661
+ "source_dataset": {
1662
+ "type": "string",
1663
+ "enum": [
1664
+ "current_entities",
1665
+ "taxonomies",
1666
+ "workflow_executions"
1667
+ ]
1668
+ },
1669
+ "attributes": {
1670
+ "type": "array",
1671
+ "items": {
1672
+ "type": "object",
1673
+ "required": [
1674
+ "name",
1675
+ "type"
1676
+ ],
1677
+ "properties": {
1678
+ "name": {
1679
+ "type": "string",
1680
+ "description": "Name of the attribute"
1681
+ },
1682
+ "type": {
1683
+ "type": "string",
1684
+ "description": "Data type of the attribute"
1685
+ },
1686
+ "description": {
1687
+ "type": "string",
1688
+ "description": "Description of the attribute"
1689
+ }
1690
+ }
1691
+ }
1692
+ }
1693
+ },
1694
+ "example": {
1695
+ "view_name": "some_view",
1696
+ "source_dataset": "current_entities",
1697
+ "attributes": [
1698
+ {
1699
+ "name": "some_attribute",
1700
+ "type": "string",
1701
+ "description": "some description"
1702
+ }
1703
+ ]
1704
+ }
1705
+ },
1706
+ "ViewsListResponse": {
1707
+ "type": "object",
1708
+ "properties": {
1709
+ "views": {
1710
+ "type": "array",
1711
+ "items": {
1712
+ "type": "object",
1713
+ "required": [
1714
+ "view_name",
1715
+ "source_dataset",
1716
+ "attributes"
1717
+ ],
1718
+ "properties": {
1719
+ "view_name": {
1720
+ "type": "string"
1721
+ },
1722
+ "source_dataset": {
1723
+ "type": "string",
1724
+ "enum": [
1725
+ "current_entities",
1726
+ "taxonomies",
1727
+ "workflow_executions"
1728
+ ]
1729
+ },
1730
+ "view_slug": {
1731
+ "type": "string"
1732
+ },
1733
+ "attributes": {
1734
+ "type": "array",
1735
+ "items": {
1736
+ "type": "object",
1737
+ "required": [
1738
+ "name",
1739
+ "type"
1740
+ ],
1741
+ "properties": {
1742
+ "name": {
1743
+ "type": "string",
1744
+ "description": "Name of the attribute"
1745
+ },
1746
+ "type": {
1747
+ "type": "string",
1748
+ "description": "Data type of the attribute"
1749
+ },
1750
+ "description": {
1751
+ "type": "string",
1752
+ "description": "Description of the attribute"
1753
+ }
1754
+ }
1755
+ }
1756
+ }
1757
+ }
1758
+ }
1759
+ }
1760
+ },
1761
+ "example": {
1762
+ "views": [
1763
+ {
1764
+ "view_name": "some_view",
1765
+ "source_dataset": "current_entities",
1766
+ "view_slug": "some_view",
1767
+ "attributes": [
1768
+ {
1769
+ "name": "some_attribute",
1770
+ "type": "string",
1771
+ "description": "some description"
1772
+ }
1773
+ ]
1774
+ },
1775
+ {
1776
+ "view_name": "another_view",
1777
+ "source_dataset": "taxonomies",
1778
+ "view_slug": "another_view",
1779
+ "attributes": [
1780
+ {
1781
+ "name": "taxonomy_attribute",
1782
+ "type": "string",
1783
+ "description": "taxonomy attribute description"
1784
+ }
1785
+ ]
1786
+ }
1787
+ ]
1788
+ }
1789
+ },
1790
+ "RelationshipRequest": {
1791
+ "type": "object",
1792
+ "required": [
1793
+ "relationship_name",
1794
+ "from_table",
1795
+ "to_table",
1796
+ "from_column",
1797
+ "to_column",
1798
+ "type"
1799
+ ],
1800
+ "properties": {
1801
+ "relationship_name": {
1802
+ "type": "string",
1803
+ "description": "Unique identifier for the relationship"
1804
+ },
1805
+ "from_table": {
1806
+ "type": "string",
1807
+ "description": "Source table name"
1808
+ },
1809
+ "to_table": {
1810
+ "type": "string",
1811
+ "description": "Target table name"
1812
+ },
1813
+ "from_column": {
1814
+ "type": "string",
1815
+ "description": "Source column name"
1816
+ },
1817
+ "to_column": {
1818
+ "type": "string",
1819
+ "description": "Target column name"
1820
+ },
1821
+ "type": {
1822
+ "type": "string",
1823
+ "enum": [
1824
+ "one_to_many",
1825
+ "many_to_many",
1826
+ "many_to_one",
1827
+ "one_to_one"
1828
+ ]
1829
+ }
1830
+ },
1831
+ "example": {
1832
+ "relationship_name": "some_relationship",
1833
+ "from_table": "some_table",
1834
+ "to_table": "some_table",
1835
+ "from_column": "some_column",
1836
+ "to_column": "some_column",
1837
+ "type": "one_to_many"
1838
+ }
1839
+ },
1840
+ "RelationshipResponse": {
1841
+ "type": "object",
1842
+ "properties": {
1843
+ "relationship_name": {
1844
+ "type": "string"
1845
+ },
1846
+ "from_table": {
1847
+ "type": "string"
1848
+ },
1849
+ "to_table": {
1850
+ "type": "string"
1851
+ },
1852
+ "from_column": {
1853
+ "type": "string"
1854
+ },
1855
+ "to_column": {
1856
+ "type": "string"
1857
+ },
1858
+ "type": {
1859
+ "type": "string",
1860
+ "enum": [
1861
+ "one_to_many",
1862
+ "many_to_many",
1863
+ "many_to_one",
1864
+ "one_to_one"
1865
+ ]
1866
+ }
1867
+ },
1868
+ "example": {
1869
+ "relationship_name": "some_relationship",
1870
+ "from_table": "some_table",
1871
+ "to_table": "some_table",
1872
+ "from_column": "some_column",
1873
+ "to_column": "some_column",
1874
+ "type": "one_to_many"
1875
+ }
1876
+ },
1877
+ "RelationshipsListResponse": {
1878
+ "type": "object",
1879
+ "properties": {
1880
+ "relationships": {
1881
+ "type": "array",
1882
+ "items": {
1883
+ "$ref": "#/components/schemas/RelationshipResponse"
1884
+ }
1885
+ }
1886
+ },
1887
+ "example": {
1888
+ "relationships": [
1889
+ {
1890
+ "relationship_name": "some_relationship",
1891
+ "from_table": "some_table",
1892
+ "to_table": "some_table",
1893
+ "from_column": "some_column",
1894
+ "to_column": "some_column",
1895
+ "type": "one_to_many"
1896
+ },
1897
+ {
1898
+ "relationship_name": "another_relationship",
1899
+ "from_table": "table_a",
1900
+ "to_table": "table_b",
1901
+ "from_column": "column_a",
1902
+ "to_column": "column_b",
1903
+ "type": "many_to_many"
1904
+ }
1905
+ ]
1906
+ }
1907
+ },
1908
+ "NoCache": {
1909
+ "type": "boolean",
1910
+ "example": false
1911
+ },
1912
+ "CacheExpiration": {
1913
+ "description": "Cache Expiration timestamp",
1914
+ "type": "string",
1915
+ "format": "timestamp",
1916
+ "example": 1663308898789
1917
+ },
1918
+ "UserId": {
1919
+ "description": "Execution Id for the query",
1920
+ "type": "string"
1921
+ },
1922
+ "DatasetDomain": {
1923
+ "type": "string",
1924
+ "enum": [
1925
+ "entities",
1926
+ "workflows"
1927
+ ]
1928
+ },
1929
+ "Dataset": {
1930
+ "type": "object",
1931
+ "properties": {
1932
+ "dataset": {
1933
+ "$ref": "#/components/schemas/DatasetName"
1934
+ },
1935
+ "domain": {
1936
+ "$ref": "#/components/schemas/DatasetDomain"
1937
+ },
1938
+ "endpoint": {
1939
+ "type": "string",
1940
+ "example": "/v2/query/entities"
1941
+ }
1942
+ }
1943
+ },
1944
+ "DatalakeQueryOptions": {
1945
+ "type": "object",
1946
+ "properties": {
1947
+ "dataset": {
1948
+ "type": "string",
1949
+ "example": "entity_operations"
1950
+ },
1951
+ "measure": {
1952
+ "type": "string",
1953
+ "example": "count_operations"
1954
+ },
1955
+ "dimensions": {
1956
+ "type": "array",
1957
+ "items": {
1958
+ "type": "object",
1959
+ "additionalProperties": true,
1960
+ "example": {
1961
+ "time_with_granularity": "year"
1962
+ }
1963
+ }
1964
+ },
1965
+ "filters": {
1966
+ "type": "array",
1967
+ "items": {
1968
+ "type": "object",
1969
+ "additionalProperties": true,
1970
+ "example": {
1971
+ "entity_schema": "opportunity"
1972
+ }
1973
+ }
1974
+ },
1975
+ "exclude_deleted": {
1976
+ "type": "boolean",
1977
+ "example": true
1978
+ }
1979
+ },
1980
+ "additionalProperties": true
1981
+ },
1982
+ "DatalakeQuery": {
1983
+ "$ref": "#/components/schemas/DatalakeQueryOptions"
1984
+ },
1985
+ "AutomationQueryOptions": {
1986
+ "type": "object",
1987
+ "additionalProperties": true,
1988
+ "properties": {
1989
+ "dataset": {
1990
+ "$ref": "#/components/schemas/AutomationExecutionDataset"
1991
+ }
1992
+ },
1993
+ "required": [
1994
+ "dataset"
1995
+ ],
1996
+ "discriminator": {
1997
+ "propertyName": "dataset"
1998
+ }
1999
+ },
2000
+ "DatasetOptions.AutomationExecutionsOverview": {
2001
+ "allOf": [
2002
+ {
2003
+ "$ref": "#/components/schemas/AutomationQueryOptions"
2004
+ },
2005
+ {
2006
+ "type": "object",
2007
+ "properties": {
2008
+ "flow_ids": {
2009
+ "title": "Automation Flow IDs",
2010
+ "description": "Filter by specific automation executions passing a list of automation flow ids.",
2011
+ "type": "array",
2012
+ "items": {
2013
+ "type": "string"
2014
+ }
2015
+ },
2016
+ "execution_states": {
2017
+ "title": "Automation Execution State",
2018
+ "description": "Filter by the states of the automation executions. Use \"scheduled\" to filter executions that have scheduled actions. Multiple states are combined with OR logic.\n",
2019
+ "type": "array",
2020
+ "items": {
2021
+ "type": "string"
2022
+ },
2023
+ "example": [
2024
+ "success",
2025
+ "failed",
2026
+ "scheduled"
2027
+ ]
2028
+ },
2029
+ "relative_time_range": {
2030
+ "$ref": "#/components/schemas/RelativeTimeRange"
2031
+ },
2032
+ "time_range_from": {
2033
+ "type": "string",
2034
+ "description": "Start date in YYYY-MM-DD format"
2035
+ },
2036
+ "time_range_to": {
2037
+ "type": "string",
2038
+ "description": "End date in YYYY-MM-DD format"
2039
+ }
2040
+ }
2041
+ }
2042
+ ]
2043
+ },
2044
+ "DatasetOptions.ListAutomationDefinitions": {
2045
+ "allOf": [
2046
+ {
2047
+ "$ref": "#/components/schemas/AutomationQueryOptions"
2048
+ },
2049
+ {
2050
+ "type": "object",
2051
+ "properties": {
2052
+ "search": {
2053
+ "type": "string",
2054
+ "description": "Search term to filter automation definitions"
2055
+ }
2056
+ }
2057
+ }
2058
+ ]
2059
+ },
2060
+ "WorkflowsQueryOptions": {
2061
+ "type": "object",
2062
+ "description": "Settings for the data of the chart that is being queried.",
2063
+ "properties": {
2064
+ "dataset": {
2065
+ "$ref": "#/components/schemas/WorkflowDataset"
2066
+ },
2067
+ "workflow_definition_ids": {
2068
+ "title": "Workflow Definition IDs",
2069
+ "description": "Filter by specific workflows by passing a list of workflow definition ids.",
2070
+ "type": "array",
2071
+ "items": {
2072
+ "type": "string"
2073
+ }
2074
+ },
2075
+ "entity_schemas": {
2076
+ "title": "Entity Schemas",
2077
+ "description": "Filter by entity schema",
2078
+ "type": "array",
2079
+ "items": {
2080
+ "type": "string"
2081
+ }
2082
+ },
2083
+ "states": {
2084
+ "title": "Workflow Definition IDs",
2085
+ "description": "Filter by the states of the executions, phases, or tasks.\nexamples:\n - [\"STARTED\"]\n - [\"COMPLETED\", \"PARTIALLY_COMPLETED\"]\n",
2086
+ "type": "array",
2087
+ "items": {
2088
+ "type": "string"
2089
+ }
2090
+ },
2091
+ "group_time_by": {
2092
+ "title": "Group Time By",
2093
+ "description": "If chosen a time series, this parameter sets by which time the data is grouped, e.g. quarterly, monthly or weekly. Available values: \"D\",\"W\",\"M\",\"Q\",\"Y\"",
2094
+ "default": "M",
2095
+ "type": "string"
2096
+ },
2097
+ "relative_time_range": {
2098
+ "title": "Relative Time Range",
2099
+ "description": "If chosen a time series, this arg defines the time span, e.g. show data of the current month. Either this param or \"time_range_from\" and \"time_range_to\" must be set.",
2100
+ "type": "string"
2101
+ },
2102
+ "time_range_from": {
2103
+ "title": "Time Range From",
2104
+ "description": "If chosen a time series, specify the start date in the format YYYY-MM-DD, e.g. 2023-01-01.",
2105
+ "type": "string"
2106
+ },
2107
+ "time_range_to": {
2108
+ "title": "Time Range To",
2109
+ "description": "If chosen a time series, specify the end date in the format YYYY-MM-DD, e.g. 2023-03-31.",
2110
+ "type": "string"
2111
+ },
2112
+ "duration_threshold": {
2113
+ "title": "Duration Threshold",
2114
+ "description": "Certain datasets enable you to set a threshold of the duration. Example: We want to see total phase counts, phase counts less than threshold, phase counts more than threshold; threshold could be for example 45 days.",
2115
+ "type": "integer"
2116
+ }
2117
+ }
2118
+ },
2119
+ "DatasetOptions.TotalCountOfWorkflowExecutions": {
2120
+ "title": "Dataset Options: Total Count of Workflow Executions",
2121
+ "type": "object",
2122
+ "description": "See the total of workflow executions in a pie chart.",
2123
+ "properties": {
2124
+ "workflow_definition_ids": {
2125
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.WorkflowDefinitionIDs"
2126
+ },
2127
+ "entity_schema": {
2128
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.EntitySchema"
2129
+ },
2130
+ "relative_time_range": {
2131
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.RelativeTimeRange"
2132
+ },
2133
+ "time_range_from": {
2134
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.TimeRangeFrom"
2135
+ },
2136
+ "time_range_to": {
2137
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.TimeRangeTo"
2138
+ }
2139
+ }
2140
+ },
2141
+ "DatasetOptions.WorkflowExecutionTimeSeries": {
2142
+ "title": "Dataset Options: Workflow Execution Time Series",
2143
+ "type": "object",
2144
+ "properties": {
2145
+ "workflow_definition_ids": {
2146
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.WorkflowDefinitionIDs"
2147
+ },
2148
+ "entity_schema": {
2149
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.EntitySchema"
2150
+ },
2151
+ "relative_time_range": {
2152
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.RelativeTimeRange"
2153
+ },
2154
+ "time_range_from": {
2155
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.TimeRangeFrom"
2156
+ },
2157
+ "time_range_to": {
2158
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.TimeRangeTo"
2159
+ },
2160
+ "workflow_states": {
2161
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.WorkflowStates"
2162
+ },
2163
+ "group_time_by": {
2164
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.GroupTimeBy"
2165
+ }
2166
+ }
2167
+ },
2168
+ "DatasetOptions.CumulativeSumOfWorkflows": {
2169
+ "title": "Dataset Options: Cumulative Sum of Workflows",
2170
+ "type": "object",
2171
+ "properties": {
2172
+ "workflow_definition_ids": {
2173
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.WorkflowDefinitionIDs"
2174
+ },
2175
+ "entity_schema": {
2176
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.EntitySchema"
2177
+ },
2178
+ "relative_time_range": {
2179
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.RelativeTimeRange"
2180
+ },
2181
+ "time_range_from": {
2182
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.TimeRangeFrom"
2183
+ },
2184
+ "time_range_to": {
2185
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.TimeRangeTo"
2186
+ },
2187
+ "workflow_states": {
2188
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.WorkflowStates"
2189
+ },
2190
+ "group_time_by": {
2191
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.GroupTimeBy"
2192
+ }
2193
+ }
2194
+ },
2195
+ "DatasetOptions.CancellationReasons": {
2196
+ "title": "Dataset Options: Cancellation Reasons",
2197
+ "type": "object",
2198
+ "description": "See the cancellation reasons of workflows in a pie chart.",
2199
+ "properties": {
2200
+ "workflow_definition_ids": {
2201
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.WorkflowDefinitionIDs"
2202
+ },
2203
+ "entity_schema": {
2204
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.EntitySchema"
2205
+ },
2206
+ "relative_time_range": {
2207
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.RelativeTimeRange"
2208
+ },
2209
+ "time_range_from": {
2210
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.TimeRangeFrom"
2211
+ },
2212
+ "time_range_to": {
2213
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.TimeRangeTo"
2214
+ }
2215
+ }
2216
+ },
2217
+ "DatasetOptions.WorkflowTasksOverview": {
2218
+ "title": "Dataset Options: Workflow Tasks Overview",
2219
+ "type": "object",
2220
+ "description": "Get a list of tasks to help organize executing users their day.",
2221
+ "properties": {
2222
+ "dataset": {
2223
+ "$ref": "#/components/schemas/WorkflowDataset"
2224
+ },
2225
+ "workflow_definition_ids": {
2226
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.WorkflowDefinitionIDs"
2227
+ },
2228
+ "entity_schema": {
2229
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.EntitySchema"
2230
+ },
2231
+ "relative_time_range": {
2232
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.RelativeTimeRange"
2233
+ },
2234
+ "time_range_from": {
2235
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.TimeRangeFrom"
2236
+ },
2237
+ "time_range_to": {
2238
+ "$ref": "#/components/schemas/WorkflowsQueryOptions.TimeRangeTo"
2239
+ },
2240
+ "assignee_ids": {
2241
+ "title": "Assignee ID",
2242
+ "description": "",
2243
+ "type": "array",
2244
+ "items": {
2245
+ "type": "string"
2246
+ }
2247
+ },
2248
+ "include_unassigned": {
2249
+ "title": "Include Unassigned",
2250
+ "type": "boolean",
2251
+ "default": false
2252
+ },
2253
+ "due_date_from": {
2254
+ "title": "Due Date From",
2255
+ "description": "If chosen a time series, specify the start date in the format YYYY-MM-DD, e.g. 2023-01-01.",
2256
+ "type": "string"
2257
+ },
2258
+ "due_date_to": {
2259
+ "title": "Due Date To",
2260
+ "description": "If chosen a time series, specify the end date in the format YYYY-MM-DD, e.g. 2023-03-31.",
2261
+ "type": "string"
2262
+ },
2263
+ "sort_by": {
2264
+ "title": "Sort By",
2265
+ "type": "string",
2266
+ "anyOf": [
2267
+ {
2268
+ "$ref": "#/components/schemas/SortBy"
2269
+ }
2270
+ ]
2271
+ },
2272
+ "page_number": {
2273
+ "title": "Page Number",
2274
+ "description": "Pagination page number",
2275
+ "type": "integer"
2276
+ },
2277
+ "page_size": {
2278
+ "title": "Page Size",
2279
+ "description": "Number of tasks per page",
2280
+ "type": "integer",
2281
+ "default": 20
2282
+ }
2283
+ },
2284
+ "required": [
2285
+ "dataset"
2286
+ ]
2287
+ },
2288
+ "Response.WorkflowTaskOverview": {
2289
+ "type": "object",
2290
+ "properties": {
2291
+ "results": {
2292
+ "type": "array",
2293
+ "items": {
2294
+ "$ref": "#/components/schemas/Task"
2295
+ }
2296
+ },
2297
+ "hits": {
2298
+ "type": "integer"
2299
+ }
2300
+ }
2301
+ },
2302
+ "ECPDetails": {
2303
+ "type": "object",
2304
+ "description": "Details regarding ECP for the workflow step",
2305
+ "properties": {
2306
+ "label": {
2307
+ "type": "string"
2308
+ }
2309
+ }
2310
+ },
2311
+ "WorkflowContext": {
2312
+ "type": "object",
2313
+ "properties": {
2314
+ "id": {
2315
+ "type": "string"
2316
+ },
2317
+ "title": {
2318
+ "type": "string"
2319
+ },
2320
+ "schema": {
2321
+ "type": "string"
2322
+ }
2323
+ },
2324
+ "required": [
2325
+ "id",
2326
+ "title",
2327
+ "schema"
2328
+ ]
2329
+ },
2330
+ "WorkflowStatus": {
2331
+ "type": "string",
2332
+ "enum": [
2333
+ "STARTED",
2334
+ "DONE",
2335
+ "CLOSED"
2336
+ ]
2337
+ },
2338
+ "AutomationConfig": {
2339
+ "type": "object",
2340
+ "description": "Configuration for automation execution to run",
2341
+ "properties": {
2342
+ "flowId": {
2343
+ "type": "string",
2344
+ "description": "Id of the configured automation to run"
2345
+ },
2346
+ "executionId": {
2347
+ "type": "string",
2348
+ "description": "Id of the automation execution which ran"
2349
+ },
2350
+ "executionStatus": {
2351
+ "type": "string",
2352
+ "description": "Status of Automation Execution. Types can be found in Automation API"
2353
+ }
2354
+ },
2355
+ "required": [
2356
+ "flowId"
2357
+ ]
2358
+ },
2359
+ "DynamicDueDate": {
2360
+ "description": "set a Duedate for a step then a specific",
2361
+ "type": "object",
2362
+ "properties": {
2363
+ "numberOfUnits": {
2364
+ "type": "number"
2365
+ },
2366
+ "timePeriod": {
2367
+ "type": "string",
2368
+ "enum": [
2369
+ "days",
2370
+ "weeks",
2371
+ "months"
2372
+ ]
2373
+ },
2374
+ "actionTypeCondition": {
2375
+ "type": "string",
2376
+ "enum": [
2377
+ "WORKFLOW_STARTED",
2378
+ "STEP_CLOSED"
2379
+ ]
2380
+ },
2381
+ "stepId": {
2382
+ "type": "string"
2383
+ }
2384
+ },
2385
+ "required": [
2386
+ "numberOfUnits",
2387
+ "timePeriod",
2388
+ "actionType"
2389
+ ]
2390
+ },
2391
+ "TaskStatus": {
2392
+ "type": "string",
2393
+ "enum": [
2394
+ "UNASSIGNED",
2395
+ "ASSIGNED",
2396
+ "COMPLETED",
2397
+ "SKIPPED",
2398
+ "IN_PROGRESS"
2399
+ ]
2400
+ },
2401
+ "TaskRequirement": {
2402
+ "description": "describe the requirement for step enablement",
2403
+ "type": "object",
2404
+ "properties": {
2405
+ "definitionId": {
2406
+ "type": "string"
2407
+ },
2408
+ "type": {
2409
+ "type": "string",
2410
+ "enum": [
2411
+ "STEP"
2412
+ ]
2413
+ },
2414
+ "condition": {
2415
+ "type": "string",
2416
+ "enum": [
2417
+ "CLOSED"
2418
+ ]
2419
+ }
2420
+ }
2421
+ },
2422
+ "TaskType": {
2423
+ "type": "string",
2424
+ "enum": [
2425
+ "MANUAL",
2426
+ "AUTOMATION"
2427
+ ]
2428
+ },
2429
+ "Task": {
2430
+ "type": "object",
2431
+ "properties": {
2432
+ "orgId": {
2433
+ "type": "string"
2434
+ },
2435
+ "id": {
2436
+ "type": "string"
2437
+ },
2438
+ "definitionId": {
2439
+ "type": "string"
2440
+ },
2441
+ "phaseId": {
2442
+ "type": "string"
2443
+ },
2444
+ "entityRefId": {
2445
+ "type": "string"
2446
+ },
2447
+ "name": {
2448
+ "type": "string"
2449
+ },
2450
+ "type": {
2451
+ "$ref": "#/components/schemas/TaskType"
2452
+ },
2453
+ "ecp": {
2454
+ "$ref": "#/components/schemas/ECPDetails"
2455
+ },
2456
+ "requirements": {
2457
+ "type": "array",
2458
+ "items": {
2459
+ "$ref": "#/components/schemas/TaskRequirement"
2460
+ }
2461
+ },
2462
+ "executionType": {
2463
+ "description": "Manual / Automation step",
2464
+ "$ref": "#/components/schemas/TaskType",
2465
+ "type": "object"
2466
+ },
2467
+ "executionId": {
2468
+ "type": "string"
2469
+ },
2470
+ "assignedTo": {
2471
+ "type": "array",
2472
+ "items": {
2473
+ "type": "string"
2474
+ }
2475
+ },
2476
+ "assignedToInProgress": {
2477
+ "description": "The user which moved the step/task to the IN_PROGRESS state. The user should also be present in the assignedTo property of the step/task",
2478
+ "type": "string"
2479
+ },
2480
+ "status": {
2481
+ "$ref": "#/components/schemas/TaskStatus"
2482
+ },
2483
+ "executionStatus": {
2484
+ "$ref": "#/components/schemas/WorkflowStatus"
2485
+ },
2486
+ "created": {
2487
+ "type": "string"
2488
+ },
2489
+ "lastUpdated": {
2490
+ "type": "string"
2491
+ },
2492
+ "dueDate": {
2493
+ "type": "string"
2494
+ },
2495
+ "dynamicDueDate": {
2496
+ "$ref": "#/components/schemas/DynamicDueDate"
2497
+ },
2498
+ "manuallyCreated": {
2499
+ "type": "boolean"
2500
+ },
2501
+ "enabled": {
2502
+ "type": "boolean",
2503
+ "description": "enabled flag results from calculating the requirements"
2504
+ },
2505
+ "automationConfig": {
2506
+ "description": "Configuration for automated steps",
2507
+ "$ref": "#/components/schemas/AutomationConfig"
2508
+ },
2509
+ "executionName": {
2510
+ "type": "string"
2511
+ },
2512
+ "contexts": {
2513
+ "type": "array",
2514
+ "items": {
2515
+ "allOf": [
2516
+ {
2517
+ "$ref": "#/components/schemas/WorkflowContext"
2518
+ }
2519
+ ]
2520
+ }
2521
+ }
2522
+ }
2523
+ },
2524
+ "WorkflowsQueryOptions.WorkflowDefinitionIDs": {
2525
+ "title": "Workflow Definition IDs",
2526
+ "description": "Filter by specific workflows by passing a list of workflow definition ids.",
2527
+ "type": "array",
2528
+ "items": {
2529
+ "type": "string"
2530
+ }
2531
+ },
2532
+ "WorkflowsQueryOptions.EntitySchema": {
2533
+ "title": "Entity Schema",
2534
+ "type": "string",
2535
+ "example": "Opportunity",
2536
+ "description": "Workflows can be applied to different kinds of entities, e.g. on Opportunities or Orders.\nYou can choose to limit your results to workflow executions to specific entity schemas / types.\n"
2537
+ },
2538
+ "WorkflowsQueryOptions.RelativeTimeRange": {
2539
+ "title": "Relative Time Range",
2540
+ "description": "A combination of two worde that describe a time range, e.g. \"this year\" or \"last month\"",
2541
+ "type": "string",
2542
+ "example": "this year"
2543
+ },
2544
+ "WorkflowsQueryOptions.TimeRangeFrom": {
2545
+ "title": "Time Range From",
2546
+ "description": "Set a specific start of a time range, e.g. \"2023-01-01\"",
2547
+ "type": "string",
2548
+ "example": "2023-01-01"
2549
+ },
2550
+ "WorkflowsQueryOptions.TimeRangeTo": {
2551
+ "title": "Time Range To",
2552
+ "description": "Set a specific end of a time range, e.g. \"2023-06-30\"",
2553
+ "type": "string",
2554
+ "example": "2023-06-01"
2555
+ },
2556
+ "WorkflowsQueryOptions.GroupTimeBy": {
2557
+ "title": "Group Time By",
2558
+ "description": "If chosen a time series, this parameter sets by which time the data is grouped, e.g. quarterly, monthly or weekly. Available values: \"D\",\"W\",\"M\",\"Q\",\"Y\"",
2559
+ "default": "M",
2560
+ "type": "string"
2561
+ },
2562
+ "WorkflowsQueryOptions.WorkflowStates": {
2563
+ "title": "Workflow States",
2564
+ "description": "Filter by the states of the workflow executions.",
2565
+ "type": "array",
2566
+ "items": {
2567
+ "type": "string"
2568
+ },
2569
+ "anyOf": [
2570
+ {
2571
+ "$ref": "#/components/schemas/WorkflowStates"
2572
+ }
2573
+ ]
2574
+ },
2575
+ "DatasetName": {
2576
+ "type": "string",
2577
+ "example": "entity_operations",
2578
+ "oneOf": [
2579
+ {
2580
+ "$ref": "#/components/schemas/EntityDataset"
2581
+ },
2582
+ {
2583
+ "$ref": "#/components/schemas/WorkflowDataset"
2584
+ }
2585
+ ]
2586
+ },
2587
+ "EntityDataset": {
2588
+ "type": "string",
2589
+ "enum": [
2590
+ "entity_operations",
2591
+ "entities_timemachine",
2592
+ "datalake_raw_sql"
2593
+ ]
2594
+ },
2595
+ "AutomationExecutionDataset": {
2596
+ "type": "string",
2597
+ "enum": [
2598
+ "automation_executions_overview",
2599
+ "list_automation_definitions"
2600
+ ]
2601
+ },
2602
+ "WorkflowDataset": {
2603
+ "type": "string",
2604
+ "enum": [
2605
+ "total_count_of_workflow_executions",
2606
+ "workflow_execution_time_series",
2607
+ "cumulative_sum_of_workflows",
2608
+ "cancellation_reasons",
2609
+ "phases_count",
2610
+ "phases_duration",
2611
+ "tasks_duration",
2612
+ "task_duration",
2613
+ "workflow_tasks_overview"
2614
+ ]
2615
+ },
2616
+ "WorkflowStates": {
2617
+ "type": "string",
2618
+ "enum": [
2619
+ "STARTED",
2620
+ "CLOSED",
2621
+ "DONE"
2622
+ ]
2623
+ },
2624
+ "PhaseStates": {
2625
+ "type": "string",
2626
+ "enum": [
2627
+ "OPEN",
2628
+ "COMPLETED",
2629
+ "IN_PROGRESS"
2630
+ ]
2631
+ },
2632
+ "TaskStates": {
2633
+ "type": "string",
2634
+ "enum": [
2635
+ "OPEN",
2636
+ "COMPLETED",
2637
+ "IN_PROGRESS"
2638
+ ]
2639
+ },
2640
+ "SortBy": {
2641
+ "type": "string",
2642
+ "enum": [
2643
+ "due_date_ascending",
2644
+ "due_date_descending",
2645
+ "creation_date_ascending",
2646
+ "creation_date_descending"
2647
+ ]
2648
+ },
2649
+ "TimeGroups": {
2650
+ "type": "string",
2651
+ "enum": [
2652
+ "Y",
2653
+ "Q",
2654
+ "M",
2655
+ "W",
2656
+ "D"
2657
+ ]
2658
+ },
2659
+ "RelativeTimeRange": {
2660
+ "type": "string",
2661
+ "enum": [
2662
+ "all_time",
2663
+ "this_week",
2664
+ "last_week",
2665
+ "last_7_days",
2666
+ "this_month",
2667
+ "last_month",
2668
+ "last_30_days",
2669
+ "last_3_months",
2670
+ "last_6_months",
2671
+ "this_year",
2672
+ "last_year"
2673
+ ]
2674
+ },
2675
+ "WorkflowsQueryResult": {
2676
+ "type": "object",
2677
+ "properties": {
2678
+ "data": {
2679
+ "anyOf": [
2680
+ {
2681
+ "type": "array",
2682
+ "items": {
2683
+ "anyOf": [
2684
+ {
2685
+ "type": "string"
2686
+ },
2687
+ {
2688
+ "type": "number"
2689
+ },
2690
+ {
2691
+ "type": "object",
2692
+ "additionalProperties": true
2693
+ },
2694
+ {
2695
+ "type": "array",
2696
+ "items": {
2697
+ "type": "object",
2698
+ "additionalProperties": true
2699
+ }
2700
+ }
2701
+ ]
2702
+ }
2703
+ },
2704
+ {
2705
+ "type": "object",
2706
+ "additionalProperties": true
2707
+ },
2708
+ {
2709
+ "type": "string"
2710
+ },
2711
+ {
2712
+ "type": "number"
2713
+ }
2714
+ ]
2715
+ },
2716
+ "labels": {
2717
+ "type": "array",
2718
+ "items": {
2719
+ "type": "string"
2720
+ }
2721
+ },
2722
+ "timestamp": {
2723
+ "type": "string"
2724
+ }
2725
+ },
2726
+ "example": {
2727
+ "data": [
2728
+ 0,
2729
+ 1
2730
+ ],
2731
+ "labels": [
2732
+ "label1",
2733
+ "label2"
2734
+ ],
2735
+ "timestamp": "1715621496068"
2736
+ },
2737
+ "additionalProperties": true
2738
+ },
2739
+ "AutomationExecutionResponse": {
2740
+ "type": "object",
2741
+ "properties": {
2742
+ "hits": {
2743
+ "type": "integer",
2744
+ "description": "Total number of execution records found",
2745
+ "example": 100
2746
+ },
2747
+ "results": {
2748
+ "type": "array",
2749
+ "description": "List of automation execution records",
2750
+ "items": {
2751
+ "type": "object",
2752
+ "properties": {
2753
+ "flow_id": {
2754
+ "type": "string",
2755
+ "description": "Unique identifier for the automation flow",
2756
+ "example": "1234567890"
2757
+ },
2758
+ "flow_name": {
2759
+ "type": "string",
2760
+ "description": "Name of the automation flow",
2761
+ "example": "flow_name"
2762
+ },
2763
+ "execution_id": {
2764
+ "type": "string",
2765
+ "description": "Unique identifier for the execution instance",
2766
+ "example": "execution_id"
2767
+ },
2768
+ "execution_status": {
2769
+ "type": "string",
2770
+ "description": "Current status of the execution",
2771
+ "example": "execution_status"
2772
+ },
2773
+ "entity_schema": {
2774
+ "type": "string",
2775
+ "description": "Entity schema associated with the flow",
2776
+ "example": "opportunity"
2777
+ },
2778
+ "entity_id": {
2779
+ "type": "string",
2780
+ "description": "Identifier of the entity associated with the execution",
2781
+ "example": "entity_id"
2782
+ },
2783
+ "created_at": {
2784
+ "type": "string",
2785
+ "description": "Timestamp when the execution was created",
2786
+ "example": "execution_created_at"
2787
+ },
2788
+ "updated_at": {
2789
+ "type": "string",
2790
+ "description": "Timestamp when the execution was last updated",
2791
+ "example": "execution_updated_at"
2792
+ },
2793
+ "error": {
2794
+ "type": "object",
2795
+ "description": "Error details if execution failed",
2796
+ "properties": {
2797
+ "message": {
2798
+ "type": "string",
2799
+ "description": "Error message",
2800
+ "example": "error_message"
2801
+ },
2802
+ "error_code": {
2803
+ "type": "string",
2804
+ "description": "Error code",
2805
+ "example": "error_code"
2806
+ }
2807
+ }
2808
+ },
2809
+ "trigger_event": {
2810
+ "type": "object",
2811
+ "description": "Event that triggered the automation",
2812
+ "additionalProperties": true,
2813
+ "properties": {
2814
+ "type": {
2815
+ "type": "string",
2816
+ "description": "Type of the trigger event",
2817
+ "example": "EntityOperation"
2818
+ },
2819
+ "trigger_type": {
2820
+ "type": "string",
2821
+ "description": "Type of operation trigger",
2822
+ "example": "createEntity"
2823
+ }
2824
+ }
2825
+ }
2826
+ },
2827
+ "required": [
2828
+ "flow_id",
2829
+ "execution_id",
2830
+ "execution_status",
2831
+ "created_at"
2832
+ ]
2833
+ }
2834
+ }
2835
+ }
2836
+ },
2837
+ "ListAutomationDefinitionsResponse": {
2838
+ "type": "object",
2839
+ "properties": {
2840
+ "hits": {
2841
+ "type": "integer",
2842
+ "description": "Total number of automation definitions found",
2843
+ "example": 100
2844
+ },
2845
+ "results": {
2846
+ "type": "array",
2847
+ "description": "List of automation definitions",
2848
+ "items": {
2849
+ "type": "object",
2850
+ "properties": {
2851
+ "flow_id": {
2852
+ "type": "string",
2853
+ "description": "Unique identifier for the automation flow",
2854
+ "example": "flow_123"
2855
+ },
2856
+ "flow_name": {
2857
+ "type": "string",
2858
+ "description": "Name of the automation flow",
2859
+ "example": "Email Notification Flow"
2860
+ },
2861
+ "entity_schema": {
2862
+ "type": "string",
2863
+ "description": "Entity schema associated with the flow",
2864
+ "example": "opportunity"
2865
+ }
2866
+ },
2867
+ "required": [
2868
+ "flow_id",
2869
+ "flow_name"
2870
+ ]
2871
+ }
2872
+ }
2873
+ },
2874
+ "example": {
2875
+ "hits": 100,
2876
+ "results": [
2877
+ {
2878
+ "flow_id": "flow_123",
2879
+ "flow_name": "Email Notification Flow",
2880
+ "entity_schema": "opportunity"
2881
+ },
2882
+ {
2883
+ "flow_id": "flow_456",
2884
+ "flow_name": "SMS Alert Flow",
2885
+ "entity_schema": "customer"
2886
+ }
2887
+ ]
2888
+ }
2889
+ },
2890
+ "SemanticModel": {
2891
+ "type": "object",
2892
+ "description": "The semantic model exposing entities, relationships, and query capabilities",
2893
+ "properties": {
2894
+ "entities": {
2895
+ "type": "array",
2896
+ "description": "Available entity tables that can be queried",
2897
+ "items": {
2898
+ "type": "object",
2899
+ "properties": {
2900
+ "name": {
2901
+ "type": "string",
2902
+ "description": "Table identifier used in queries",
2903
+ "example": "current_contacts"
2904
+ },
2905
+ "displayName": {
2906
+ "type": "string",
2907
+ "description": "Human-readable name",
2908
+ "example": "Contacts"
2909
+ },
2910
+ "schema": {
2911
+ "type": "string",
2912
+ "description": "Schema type (entity, workflow, purpose)",
2913
+ "example": "entity"
2914
+ }
2915
+ }
2916
+ }
2917
+ },
2918
+ "relationships": {
2919
+ "type": "array",
2920
+ "description": "Relationships between entities for JOIN operations",
2921
+ "items": {
2922
+ "type": "object",
2923
+ "properties": {
2924
+ "from": {
2925
+ "type": "string",
2926
+ "example": "current_contacts"
2927
+ },
2928
+ "to": {
2929
+ "type": "string",
2930
+ "example": "opportunity_account_contact_relation"
2931
+ },
2932
+ "relationship": {
2933
+ "type": "string",
2934
+ "enum": [
2935
+ "hasMany",
2936
+ "belongsTo",
2937
+ "hasOne"
2938
+ ]
2939
+ },
2940
+ "displayName": {
2941
+ "type": "string",
2942
+ "example": "Contact has many Opportunities"
2943
+ }
2944
+ }
2945
+ }
2946
+ },
2947
+ "capabilities": {
2948
+ "type": "object",
2949
+ "description": "Supported query capabilities",
2950
+ "properties": {
2951
+ "aggregations": {
2952
+ "type": "array",
2953
+ "items": {
2954
+ "type": "string"
2955
+ },
2956
+ "example": [
2957
+ "count",
2958
+ "count_distinct",
2959
+ "sum",
2960
+ "average",
2961
+ "min",
2962
+ "max",
2963
+ "median"
2964
+ ]
2965
+ },
2966
+ "calculationTypes": {
2967
+ "type": "array",
2968
+ "items": {
2969
+ "type": "object",
2970
+ "properties": {
2971
+ "type": {
2972
+ "type": "string"
2973
+ },
2974
+ "description": {
2975
+ "type": "string"
2976
+ },
2977
+ "parameters": {
2978
+ "type": "object",
2979
+ "additionalProperties": {
2980
+ "type": "string"
2981
+ }
2982
+ }
2983
+ }
2984
+ }
2985
+ },
2986
+ "granularities": {
2987
+ "type": "array",
2988
+ "items": {
2989
+ "type": "string"
2990
+ },
2991
+ "example": [
2992
+ "day",
2993
+ "week",
2994
+ "month",
2995
+ "quarter",
2996
+ "year"
2997
+ ]
2998
+ },
2999
+ "filterOperators": {
3000
+ "type": "array",
3001
+ "items": {
3002
+ "type": "object",
3003
+ "properties": {
3004
+ "operator": {
3005
+ "type": "string"
3006
+ },
3007
+ "description": {
3008
+ "type": "string"
3009
+ }
3010
+ }
3011
+ }
3012
+ }
3013
+ }
3014
+ }
3015
+ }
3016
+ },
3017
+ "QueryResults": {
3018
+ "type": "object",
3019
+ "properties": {
3020
+ "status": {
3021
+ "type": "string",
3022
+ "example": "FINISHED"
3023
+ },
3024
+ "timestamp": {
3025
+ "type": "string",
3026
+ "example": "1715621496068"
3027
+ },
3028
+ "results": {
3029
+ "type": "array",
3030
+ "items": {
3031
+ "type": "object",
3032
+ "additionalProperties": true
3033
+ }
3034
+ }
3035
+ }
3036
+ },
3037
+ "TimeSeriesSettings": {
3038
+ "type": "object",
3039
+ "properties": {
3040
+ "dataset": {
3041
+ "type": "string",
3042
+ "enum": [
3043
+ "time_series"
3044
+ ]
3045
+ },
3046
+ "from": {
3047
+ "type": "string",
3048
+ "format": "date-time"
3049
+ },
3050
+ "to": {
3051
+ "type": "string",
3052
+ "format": "date-time"
3053
+ },
3054
+ "time_grouper": {
3055
+ "type": "string"
3056
+ },
3057
+ "workflow_names": {
3058
+ "type": "array",
3059
+ "items": {
3060
+ "type": "string"
3061
+ }
3062
+ }
3063
+ }
3064
+ },
3065
+ "NameDurationSettings": {
3066
+ "type": "object",
3067
+ "properties": {
3068
+ "dataset": {
3069
+ "type": "string",
3070
+ "enum": [
3071
+ "name_duration"
3072
+ ]
3073
+ },
3074
+ "from": {
3075
+ "type": "string",
3076
+ "format": "date-time"
3077
+ },
3078
+ "to": {
3079
+ "type": "string",
3080
+ "format": "date-time"
3081
+ },
3082
+ "workflow_name": {
3083
+ "type": "string"
3084
+ }
3085
+ }
3086
+ }
3087
+ },
3088
+ "responses": {
3089
+ "BadRequestResponse": {
3090
+ "description": "Bad request – invalid or missing parameters in the request payload",
3091
+ "content": {
3092
+ "application/json": {
3093
+ "schema": {
3094
+ "$ref": "#/components/schemas/ErrorResponse"
3095
+ },
3096
+ "example": {
3097
+ "status": 400,
3098
+ "error": "Bad Request",
3099
+ "message": "Invalid query parameters provided"
3100
+ }
3101
+ }
3102
+ }
3103
+ },
3104
+ "UnauthorizedResponse": {
3105
+ "description": "Unauthorized – missing or invalid authentication credentials",
3106
+ "content": {
3107
+ "application/json": {
3108
+ "schema": {
3109
+ "$ref": "#/components/schemas/ErrorResponse"
3110
+ },
3111
+ "example": {
3112
+ "status": 401,
3113
+ "error": "Unauthorized",
3114
+ "message": "Missing or invalid authorization token"
3115
+ }
3116
+ }
3117
+ }
3118
+ },
3119
+ "ForbiddenResponse": {
3120
+ "description": "Forbidden – caller does not have permission to perform this action",
3121
+ "content": {
3122
+ "application/json": {
3123
+ "schema": {
3124
+ "$ref": "#/components/schemas/ErrorResponse"
3125
+ },
3126
+ "example": {
3127
+ "status": 403,
3128
+ "error": "Forbidden",
3129
+ "message": "Insufficient permissions to access this resource"
3130
+ }
3131
+ }
3132
+ }
3133
+ },
3134
+ "NotFoundResponse": {
3135
+ "description": "Not found – the requested resource does not exist",
3136
+ "content": {
3137
+ "application/json": {
3138
+ "schema": {
3139
+ "$ref": "#/components/schemas/ErrorResponse"
3140
+ },
3141
+ "example": {
3142
+ "status": 404,
3143
+ "error": "Not Found",
3144
+ "message": "The requested resource was not found"
3145
+ }
3146
+ }
3147
+ }
3148
+ },
3149
+ "InternalServerErrorResponse": {
3150
+ "description": "Internal server error",
3151
+ "content": {
3152
+ "application/json": {
3153
+ "schema": {
3154
+ "$ref": "#/components/schemas/ErrorResponse"
3155
+ },
3156
+ "example": {
3157
+ "status": 500,
3158
+ "error": "Internal Server Error",
3159
+ "message": "An unexpected error occurred"
3160
+ }
3161
+ }
3162
+ }
3163
+ }
3164
+ },
3165
+ "securitySchemes": {
3166
+ "EpilotAuth": {
3167
+ "type": "http",
3168
+ "scheme": "bearer",
3169
+ "description": "Authorization header with epilot OAuth"
3170
+ }
3171
+ }
3172
+ },
3173
+ "servers": [
3174
+ {
3175
+ "url": "https://query.sls.epilot.io"
3176
+ }
3177
+ ]
3178
+ }