databay-cli 0.1.0__py3-none-any.whl
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.
- databay/__init__.py +5 -0
- databay/__main__.py +7 -0
- databay/agent_skill.py +184 -0
- databay/api.py +626 -0
- databay/cli/__init__.py +0 -0
- databay/cli/auth.py +377 -0
- databay/cli/build.py +89 -0
- databay/cli/commands/__init__.py +0 -0
- databay/cli/commands/alerting_webhook.py +19 -0
- databay/cli/commands/alerting_webhook_tag.py +14 -0
- databay/cli/commands/alerting_webhook_type.py +14 -0
- databay/cli/commands/alerting_webhook_undelivered.py +15 -0
- databay/cli/commands/announcement.py +17 -0
- databay/cli/commands/api_key.py +18 -0
- databay/cli/commands/api_key_project.py +16 -0
- databay/cli/commands/backfill_reason_code.py +14 -0
- databay/cli/commands/backfill_run.py +17 -0
- databay/cli/commands/canvas.py +16 -0
- databay/cli/commands/canvas_graph.py +15 -0
- databay/cli/commands/canvas_table_check.py +15 -0
- databay/cli/commands/dashboards.py +21 -0
- databay/cli/commands/dashboards_card.py +20 -0
- databay/cli/commands/dashboards_dataset.py +14 -0
- databay/cli/commands/dashboards_folder.py +16 -0
- databay/cli/commands/dashboards_home.py +17 -0
- databay/cli/commands/dashboards_placement.py +16 -0
- databay/cli/commands/db.py +19 -0
- databay/cli/commands/db_column.py +14 -0
- databay/cli/commands/docs_article.py +16 -0
- databay/cli/commands/dq_result.py +14 -0
- databay/cli/commands/dq_rule.py +16 -0
- databay/cli/commands/feature.py +14 -0
- databay/cli/commands/google_ads_source.py +14 -0
- databay/cli/commands/google_analytics_source.py +14 -0
- databay/cli/commands/instagram_account.py +14 -0
- databay/cli/commands/instagram_source.py +14 -0
- databay/cli/commands/linkedin_account.py +14 -0
- databay/cli/commands/linkedin_source.py +14 -0
- databay/cli/commands/me.py +14 -0
- databay/cli/commands/meta_ads_source.py +14 -0
- databay/cli/commands/metric_models.py +26 -0
- databay/cli/commands/metrics.py +14 -0
- databay/cli/commands/models.py +16 -0
- databay/cli/commands/nlq.py +15 -0
- databay/cli/commands/notebook_credential.py +16 -0
- databay/cli/commands/org.py +14 -0
- databay/cli/commands/org_member.py +17 -0
- databay/cli/commands/org_offboarding.py +14 -0
- databay/cli/commands/pipe.py +26 -0
- databay/cli/commands/pipe_backfill_run.py +14 -0
- databay/cli/commands/pipe_config_option.py +14 -0
- databay/cli/commands/pipe_destination.py +16 -0
- databay/cli/commands/pipe_leftover.py +16 -0
- databay/cli/commands/pipe_sink_type.py +14 -0
- databay/cli/commands/pipe_source_type.py +14 -0
- databay/cli/commands/pipe_status_bucket.py +14 -0
- databay/cli/commands/pipe_stuck_delete.py +14 -0
- databay/cli/commands/plan.py +14 -0
- databay/cli/commands/project.py +21 -0
- databay/cli/commands/project_budget.py +15 -0
- databay/cli/commands/project_member.py +18 -0
- databay/cli/commands/project_privilege.py +16 -0
- databay/cli/commands/project_share.py +16 -0
- databay/cli/commands/provision.py +14 -0
- databay/cli/commands/provisioning.py +14 -0
- databay/cli/commands/registry.py +14 -0
- databay/cli/commands/resource_home.py +14 -0
- databay/cli/commands/schema_change.py +18 -0
- databay/cli/commands/schema_history.py +17 -0
- databay/cli/commands/schema_version.py +16 -0
- databay/cli/commands/shopify_store.py +14 -0
- databay/cli/commands/sink_data_type.py +14 -0
- databay/cli/commands/source.py +24 -0
- databay/cli/commands/source_catalog.py +15 -0
- databay/cli/commands/source_check_run.py +17 -0
- databay/cli/commands/source_hidden_type.py +14 -0
- databay/cli/commands/source_name.py +14 -0
- databay/cli/commands/source_pipe.py +14 -0
- databay/cli/commands/source_publication.py +16 -0
- databay/cli/commands/source_readiness_override.py +15 -0
- databay/cli/commands/source_setup_choice.py +16 -0
- databay/cli/commands/source_stream.py +15 -0
- databay/cli/commands/source_table.py +14 -0
- databay/cli/commands/ssbi_job.py +18 -0
- databay/cli/commands/transform_type.py +14 -0
- databay/cli/commands/usage.py +14 -0
- databay/cli/commands/warehouse.py +21 -0
- databay/cli/commands/warehouse_access_assignment.py +16 -0
- databay/cli/commands/warehouse_access_role.py +22 -0
- databay/cli/commands/warehouse_access_settings.py +17 -0
- databay/cli/commands/warehouse_login.py +20 -0
- databay/cli/commands/warehouse_principal.py +17 -0
- databay/cli/commands/warehouse_service_account.py +17 -0
- databay/cli/commands/warehouse_service_account_credential.py +18 -0
- databay/cli/common.py +93 -0
- databay/cli/console.py +121 -0
- databay/cli/flags.py +183 -0
- databay/cli/handwritten.py +22 -0
- databay/cli/main.py +198 -0
- databay/cli/metrics.py +171 -0
- databay/cli/org.py +193 -0
- databay/cli/output.py +134 -0
- databay/cli/pipe_wait.py +357 -0
- databay/cli/profile.py +230 -0
- databay/cli/runner.py +432 -0
- databay/cli/skill.py +64 -0
- databay/cli/sql.py +84 -0
- databay/compat.py +161 -0
- databay/credentials.py +217 -0
- databay/error_catalog.py +226 -0
- databay/error_codes.py +3265 -0
- databay/errors.py +222 -0
- databay/feature_header.py +40 -0
- databay/invoke.py +225 -0
- databay/locks.py +41 -0
- databay/login_flow.py +245 -0
- databay/model_base.py +40 -0
- databay/models/__init__.py +0 -0
- databay/models/alerting_webhook.py +46 -0
- databay/models/alerting_webhook_tag.py +11 -0
- databay/models/alerting_webhook_type.py +11 -0
- databay/models/alerting_webhook_undelivered.py +23 -0
- databay/models/announcement.py +37 -0
- databay/models/api_key.py +81 -0
- databay/models/api_key_project.py +29 -0
- databay/models/backfill_reason_code.py +11 -0
- databay/models/backfill_run.py +41 -0
- databay/models/canvas.py +68 -0
- databay/models/canvas_graph.py +86 -0
- databay/models/canvas_table_check.py +181 -0
- databay/models/dashboards.py +79 -0
- databay/models/dashboards_card.py +37 -0
- databay/models/dashboards_dataset.py +27 -0
- databay/models/dashboards_folder.py +18 -0
- databay/models/dashboards_home.py +28 -0
- databay/models/db.py +34 -0
- databay/models/db_column.py +11 -0
- databay/models/docs_article.py +59 -0
- databay/models/dq_result.py +27 -0
- databay/models/dq_rule.py +43 -0
- databay/models/feature.py +15 -0
- databay/models/google_ads_source.py +11 -0
- databay/models/google_analytics_source.py +11 -0
- databay/models/instagram_source.py +11 -0
- databay/models/linkedin_source.py +11 -0
- databay/models/me.py +71 -0
- databay/models/meta_ads_source.py +11 -0
- databay/models/metric_models.py +274 -0
- databay/models/metrics.py +158 -0
- databay/models/models.py +73 -0
- databay/models/nlq.py +92 -0
- databay/models/notebook_credential.py +51 -0
- databay/models/org.py +44 -0
- databay/models/org_member.py +123 -0
- databay/models/org_offboarding.py +36 -0
- databay/models/pipe.py +340 -0
- databay/models/pipe_config_option.py +25 -0
- databay/models/pipe_destination.py +128 -0
- databay/models/pipe_leftover.py +51 -0
- databay/models/pipe_sink_type.py +11 -0
- databay/models/pipe_source_type.py +11 -0
- databay/models/pipe_status_bucket.py +13 -0
- databay/models/pipe_stuck_delete.py +25 -0
- databay/models/plan.py +37 -0
- databay/models/project.py +154 -0
- databay/models/project_budget.py +22 -0
- databay/models/project_member.py +67 -0
- databay/models/project_privilege.py +21 -0
- databay/models/project_share.py +76 -0
- databay/models/provision.py +12 -0
- databay/models/provisioning.py +20 -0
- databay/models/registry.py +18 -0
- databay/models/resource_home.py +35 -0
- databay/models/schema_change.py +96 -0
- databay/models/schema_history.py +32 -0
- databay/models/schema_version.py +23 -0
- databay/models/shared.py +875 -0
- databay/models/shopify_store.py +19 -0
- databay/models/sink_data_type.py +11 -0
- databay/models/source.py +263 -0
- databay/models/source_catalog.py +82 -0
- databay/models/source_check_run.py +63 -0
- databay/models/source_hidden_type.py +13 -0
- databay/models/source_name.py +18 -0
- databay/models/source_pipe.py +16 -0
- databay/models/source_publication.py +30 -0
- databay/models/source_readiness_override.py +13 -0
- databay/models/source_setup_choice.py +33 -0
- databay/models/source_stream.py +65 -0
- databay/models/source_table.py +27 -0
- databay/models/sql.py +31 -0
- databay/models/ssbi_job.py +97 -0
- databay/models/transform_type.py +40 -0
- databay/models/usage.py +112 -0
- databay/models/warehouse.py +38 -0
- databay/models/warehouse_access_assignment.py +70 -0
- databay/models/warehouse_access_role.py +148 -0
- databay/models/warehouse_access_settings.py +35 -0
- databay/models/warehouse_login.py +20 -0
- databay/models/warehouse_principal.py +49 -0
- databay/models/warehouse_service_account.py +35 -0
- databay/models/warehouse_service_account_credential.py +11 -0
- databay/oidc.py +205 -0
- databay/operation.py +191 -0
- databay/operations/__init__.py +0 -0
- databay/operations/alerting_webhook.py +317 -0
- databay/operations/alerting_webhook_tag.py +35 -0
- databay/operations/alerting_webhook_type.py +35 -0
- databay/operations/alerting_webhook_undelivered.py +74 -0
- databay/operations/announcement.py +135 -0
- databay/operations/api_key.py +198 -0
- databay/operations/api_key_project.py +130 -0
- databay/operations/backfill_reason_code.py +35 -0
- databay/operations/backfill_run.py +245 -0
- databay/operations/canvas.py +136 -0
- databay/operations/canvas_graph.py +102 -0
- databay/operations/canvas_table_check.py +101 -0
- databay/operations/dashboards.py +441 -0
- databay/operations/dashboards_card.py +406 -0
- databay/operations/dashboards_dataset.py +50 -0
- databay/operations/dashboards_folder.py +146 -0
- databay/operations/dashboards_home.py +176 -0
- databay/operations/dashboards_placement.py +152 -0
- databay/operations/db.py +337 -0
- databay/operations/db_column.py +57 -0
- databay/operations/docs_article.py +101 -0
- databay/operations/dq_result.py +43 -0
- databay/operations/dq_rule.py +155 -0
- databay/operations/feature.py +35 -0
- databay/operations/google_ads_source.py +40 -0
- databay/operations/google_analytics_source.py +40 -0
- databay/operations/instagram_account.py +47 -0
- databay/operations/instagram_source.py +40 -0
- databay/operations/linkedin_account.py +47 -0
- databay/operations/linkedin_source.py +40 -0
- databay/operations/me.py +57 -0
- databay/operations/meta_ads_source.py +40 -0
- databay/operations/metric_models.py +612 -0
- databay/operations/metrics.py +218 -0
- databay/operations/models.py +123 -0
- databay/operations/nlq.py +100 -0
- databay/operations/notebook_credential.py +95 -0
- databay/operations/org.py +79 -0
- databay/operations/org_member.py +192 -0
- databay/operations/org_offboarding.py +43 -0
- databay/operations/pipe.py +882 -0
- databay/operations/pipe_backfill_run.py +72 -0
- databay/operations/pipe_config_option.py +50 -0
- databay/operations/pipe_destination.py +178 -0
- databay/operations/pipe_leftover.py +110 -0
- databay/operations/pipe_sink_type.py +35 -0
- databay/operations/pipe_source_type.py +35 -0
- databay/operations/pipe_status_bucket.py +35 -0
- databay/operations/pipe_stuck_delete.py +52 -0
- databay/operations/plan.py +35 -0
- databay/operations/project.py +346 -0
- databay/operations/project_budget.py +135 -0
- databay/operations/project_member.py +226 -0
- databay/operations/project_privilege.py +143 -0
- databay/operations/project_share.py +160 -0
- databay/operations/provision.py +35 -0
- databay/operations/provisioning.py +35 -0
- databay/operations/registry.py +35 -0
- databay/operations/resource_home.py +80 -0
- databay/operations/schema_change.py +222 -0
- databay/operations/schema_history.py +136 -0
- databay/operations/schema_version.py +115 -0
- databay/operations/shopify_store.py +40 -0
- databay/operations/sink_data_type.py +43 -0
- databay/operations/source.py +1207 -0
- databay/operations/source_catalog.py +135 -0
- databay/operations/source_check_run.py +242 -0
- databay/operations/source_hidden_type.py +59 -0
- databay/operations/source_name.py +69 -0
- databay/operations/source_pipe.py +57 -0
- databay/operations/source_publication.py +139 -0
- databay/operations/source_readiness_override.py +96 -0
- databay/operations/source_setup_choice.py +161 -0
- databay/operations/source_stream.py +99 -0
- databay/operations/source_table.py +59 -0
- databay/operations/sql.py +54 -0
- databay/operations/ssbi_job.py +242 -0
- databay/operations/transform_type.py +35 -0
- databay/operations/usage.py +35 -0
- databay/operations/warehouse.py +343 -0
- databay/operations/warehouse_access_assignment.py +179 -0
- databay/operations/warehouse_access_role.py +473 -0
- databay/operations/warehouse_access_settings.py +172 -0
- databay/operations/warehouse_login.py +308 -0
- databay/operations/warehouse_principal.py +174 -0
- databay/operations/warehouse_service_account.py +206 -0
- databay/operations/warehouse_service_account_credential.py +285 -0
- databay/paths.py +32 -0
- databay/platform_check.py +20 -0
- databay/profiles.py +181 -0
- databay/redact.py +22 -0
- databay/reference.py +218 -0
- databay/resource.py +167 -0
- databay/resources/__init__.py +0 -0
- databay/resources/alerting_webhook.py +84 -0
- databay/resources/alerting_webhook_tag.py +21 -0
- databay/resources/alerting_webhook_type.py +21 -0
- databay/resources/alerting_webhook_undelivered.py +35 -0
- databay/resources/announcement.py +45 -0
- databay/resources/api_key.py +56 -0
- databay/resources/api_key_project.py +47 -0
- databay/resources/backfill_reason_code.py +21 -0
- databay/resources/backfill_run.py +78 -0
- databay/resources/canvas.py +43 -0
- databay/resources/canvas_graph.py +38 -0
- databay/resources/canvas_table_check.py +38 -0
- databay/resources/dashboards.py +105 -0
- databay/resources/dashboards_card.py +97 -0
- databay/resources/dashboards_dataset.py +27 -0
- databay/resources/dashboards_folder.py +47 -0
- databay/resources/dashboards_home.py +59 -0
- databay/resources/dashboards_placement.py +47 -0
- databay/resources/db.py +87 -0
- databay/resources/db_column.py +28 -0
- databay/resources/docs_article.py +37 -0
- databay/resources/dq_result.py +25 -0
- databay/resources/dq_rule.py +48 -0
- databay/resources/feature.py +21 -0
- databay/resources/google_ads_source.py +25 -0
- databay/resources/google_analytics_source.py +25 -0
- databay/resources/instagram_account.py +27 -0
- databay/resources/instagram_source.py +25 -0
- databay/resources/linkedin_account.py +27 -0
- databay/resources/linkedin_source.py +25 -0
- databay/resources/me.py +27 -0
- databay/resources/meta_ads_source.py +25 -0
- databay/resources/metric_models.py +154 -0
- databay/resources/metrics.py +57 -0
- databay/resources/models.py +42 -0
- databay/resources/nlq.py +34 -0
- databay/resources/notebook_credential.py +41 -0
- databay/resources/org.py +29 -0
- databay/resources/org_member.py +53 -0
- databay/resources/org_offboarding.py +25 -0
- databay/resources/pipe.py +208 -0
- databay/resources/pipe_backfill_run.py +28 -0
- databay/resources/pipe_config_option.py +26 -0
- databay/resources/pipe_destination.py +49 -0
- databay/resources/pipe_leftover.py +42 -0
- databay/resources/pipe_sink_type.py +21 -0
- databay/resources/pipe_source_type.py +21 -0
- databay/resources/pipe_status_bucket.py +21 -0
- databay/resources/pipe_stuck_delete.py +27 -0
- databay/resources/plan.py +21 -0
- databay/resources/project.py +92 -0
- databay/resources/project_budget.py +38 -0
- databay/resources/project_member.py +68 -0
- databay/resources/project_privilege.py +48 -0
- databay/resources/project_share.py +47 -0
- databay/resources/provision.py +21 -0
- databay/resources/provisioning.py +21 -0
- databay/resources/registry.py +21 -0
- databay/resources/resource_home.py +29 -0
- databay/resources/schema_change.py +62 -0
- databay/resources/schema_history.py +52 -0
- databay/resources/schema_version.py +43 -0
- databay/resources/shopify_store.py +25 -0
- databay/resources/sink_data_type.py +25 -0
- databay/resources/source.py +132 -0
- databay/resources/source_catalog.py +34 -0
- databay/resources/source_check_run.py +67 -0
- databay/resources/source_hidden_type.py +25 -0
- databay/resources/source_name.py +27 -0
- databay/resources/source_pipe.py +28 -0
- databay/resources/source_publication.py +47 -0
- databay/resources/source_readiness_override.py +37 -0
- databay/resources/source_setup_choice.py +50 -0
- databay/resources/source_stream.py +38 -0
- databay/resources/source_table.py +27 -0
- databay/resources/sql.py +27 -0
- databay/resources/ssbi_job.py +69 -0
- databay/resources/transform_type.py +21 -0
- databay/resources/usage.py +21 -0
- databay/resources/warehouse.py +136 -0
- databay/resources/warehouse_access_assignment.py +51 -0
- databay/resources/warehouse_access_role.py +118 -0
- databay/resources/warehouse_access_settings.py +56 -0
- databay/resources/warehouse_login.py +81 -0
- databay/resources/warehouse_principal.py +51 -0
- databay/resources/warehouse_service_account.py +61 -0
- databay/resources/warehouse_service_account_credential.py +78 -0
- databay/sdk.py +77 -0
- databay/settings.py +90 -0
- databay/skill/SKILL.md +357 -0
- databay/skill/references/commands.md +7025 -0
- databay/skill/references/errors.md +727 -0
- databay/spec.py +362 -0
- databay/stored_token.py +134 -0
- databay/tokens.py +108 -0
- databay/transport.py +357 -0
- databay/update_check.py +151 -0
- databay/version.py +6 -0
- databay/waits.py +330 -0
- databay_cli-0.1.0.dist-info/METADATA +42 -0
- databay_cli-0.1.0.dist-info/RECORD +403 -0
- databay_cli-0.1.0.dist-info/WHEEL +4 -0
- databay_cli-0.1.0.dist-info/entry_points.txt +2 -0
- databay_cli-0.1.0.dist-info/licenses/LICENSE +202 -0
|
@@ -0,0 +1,1207 @@
|
|
|
1
|
+
"""The ``source`` operations.
|
|
2
|
+
|
|
3
|
+
Generated by python/tools/gen_client.py from contract/core.json; do not edit.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from databay.operation import Body, Operation, Param, Response, Verdict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
SOURCE_CASCADE_DELETE = Operation(
|
|
10
|
+
operation_id='source_cascade_delete',
|
|
11
|
+
noun='source',
|
|
12
|
+
verb='cascade-delete',
|
|
13
|
+
method='post',
|
|
14
|
+
path='/api/configstore/source/{source_uuid}/cascade-delete',
|
|
15
|
+
summary='Connected Source Cascade Delete',
|
|
16
|
+
description='Delete a source and the pipelines that depend on it, in the background, and return 202.\n\nThe source turns DELETING and the server records which pipelines it will tear down; a\nclient cannot add targets. The source itself is deleted only once every dependency is\nresolved: pipelines created meanwhile and unfinished teardowns keep it (and its\ncredentials). Calling it again on a source already DELETING is supported for recovery.',
|
|
17
|
+
project='header',
|
|
18
|
+
destructive=True,
|
|
19
|
+
idempotent=False,
|
|
20
|
+
since='1.0',
|
|
21
|
+
params=(
|
|
22
|
+
Param(
|
|
23
|
+
name='source_uuid',
|
|
24
|
+
location='path',
|
|
25
|
+
kind='string',
|
|
26
|
+
required=True,
|
|
27
|
+
description='uuid of the connected source',
|
|
28
|
+
),
|
|
29
|
+
),
|
|
30
|
+
body=None,
|
|
31
|
+
response=Response(
|
|
32
|
+
kind='json',
|
|
33
|
+
model='source:SourceCascadeDeleteResponse',
|
|
34
|
+
shape='object',
|
|
35
|
+
),
|
|
36
|
+
examples=(
|
|
37
|
+
'databay source cascade-delete <source_uuid> --yes',
|
|
38
|
+
),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
SOURCE_CREATE = Operation(
|
|
42
|
+
operation_id='source_create',
|
|
43
|
+
noun='source',
|
|
44
|
+
verb='create',
|
|
45
|
+
method='post',
|
|
46
|
+
path='/api/configstore/source',
|
|
47
|
+
summary='Connected Source Create',
|
|
48
|
+
description="Connect a source: check its credentials and setup, then store it encrypted.\n\nA connection that fails is refused unless ``allow_incomplete`` is set; a failing setup check\nsaves as ``setup_incomplete``, and the source's readiness report is the to-do list.",
|
|
49
|
+
project='header',
|
|
50
|
+
destructive=False,
|
|
51
|
+
idempotent=True,
|
|
52
|
+
since='1.0',
|
|
53
|
+
params=(),
|
|
54
|
+
body=Body(
|
|
55
|
+
schema='ConnectedSourceCreate',
|
|
56
|
+
fields=(
|
|
57
|
+
Param(
|
|
58
|
+
name='acknowledge_org_visible',
|
|
59
|
+
location='body',
|
|
60
|
+
kind='boolean',
|
|
61
|
+
required=False,
|
|
62
|
+
description='For a SaaS source created in a restricted project, allow the automatic pipelines to land in the organization-wide warehouse, whose tables every organization member can see. Without it no automatic pipeline is created.',
|
|
63
|
+
),
|
|
64
|
+
Param(
|
|
65
|
+
name='allow_incomplete',
|
|
66
|
+
location='body',
|
|
67
|
+
kind='boolean',
|
|
68
|
+
required=False,
|
|
69
|
+
description='Save and finish later: save even when Databay cannot connect yet. The source lands in setup_incomplete instead of the request failing. Other failing setup checks save as setup_incomplete regardless.',
|
|
70
|
+
),
|
|
71
|
+
Param(
|
|
72
|
+
name='name',
|
|
73
|
+
location='body',
|
|
74
|
+
kind='string',
|
|
75
|
+
required=True,
|
|
76
|
+
description='logical name for the connected source',
|
|
77
|
+
),
|
|
78
|
+
Param(
|
|
79
|
+
name='publication_mode',
|
|
80
|
+
location='body',
|
|
81
|
+
kind='string',
|
|
82
|
+
required=False,
|
|
83
|
+
description="Who creates a Postgres source's publication: customer_managed (your admin) or databay_managed. Left out, the source waits for the choice where the deployment offers one.",
|
|
84
|
+
choices=(
|
|
85
|
+
'customer_managed',
|
|
86
|
+
'databay_managed',
|
|
87
|
+
),
|
|
88
|
+
nullable=True,
|
|
89
|
+
),
|
|
90
|
+
),
|
|
91
|
+
discriminator='source_type',
|
|
92
|
+
variants=(
|
|
93
|
+
(
|
|
94
|
+
'file_upload',
|
|
95
|
+
'FileUploadConnectedConfig',
|
|
96
|
+
(
|
|
97
|
+
Param(
|
|
98
|
+
name='settings',
|
|
99
|
+
location='body',
|
|
100
|
+
kind='json',
|
|
101
|
+
required=False,
|
|
102
|
+
),
|
|
103
|
+
),
|
|
104
|
+
),
|
|
105
|
+
(
|
|
106
|
+
'ga4',
|
|
107
|
+
'Ga4ConnectedConfig',
|
|
108
|
+
(
|
|
109
|
+
Param(
|
|
110
|
+
name='extra_account_ids',
|
|
111
|
+
location='body',
|
|
112
|
+
kind='list',
|
|
113
|
+
required=False,
|
|
114
|
+
description='Further properties, chosen when connecting with Google sign-in. POST /source ignores them.',
|
|
115
|
+
item_kind='string',
|
|
116
|
+
),
|
|
117
|
+
Param(
|
|
118
|
+
name='multi_property',
|
|
119
|
+
location='body',
|
|
120
|
+
kind='boolean',
|
|
121
|
+
required=False,
|
|
122
|
+
description='Sync several properties, chosen when connecting with Google sign-in. POST /source ignores it.',
|
|
123
|
+
),
|
|
124
|
+
Param(
|
|
125
|
+
name='property_id',
|
|
126
|
+
location='body',
|
|
127
|
+
kind='string',
|
|
128
|
+
required=True,
|
|
129
|
+
description='Property Id',
|
|
130
|
+
),
|
|
131
|
+
Param(
|
|
132
|
+
name='refresh_token',
|
|
133
|
+
location='body',
|
|
134
|
+
kind='string',
|
|
135
|
+
required=False,
|
|
136
|
+
description='Refresh Token',
|
|
137
|
+
secret=True,
|
|
138
|
+
),
|
|
139
|
+
Param(
|
|
140
|
+
name='service_account_json',
|
|
141
|
+
location='body',
|
|
142
|
+
kind='string',
|
|
143
|
+
required=False,
|
|
144
|
+
description='Service Account Json',
|
|
145
|
+
secret=True,
|
|
146
|
+
),
|
|
147
|
+
Param(
|
|
148
|
+
name='start_date',
|
|
149
|
+
location='body',
|
|
150
|
+
kind='string',
|
|
151
|
+
required=False,
|
|
152
|
+
description='Start Date',
|
|
153
|
+
),
|
|
154
|
+
),
|
|
155
|
+
),
|
|
156
|
+
(
|
|
157
|
+
'google_ads',
|
|
158
|
+
'GoogleAdsConnectedConfig',
|
|
159
|
+
(
|
|
160
|
+
Param(
|
|
161
|
+
name='client_id',
|
|
162
|
+
location='body',
|
|
163
|
+
kind='string',
|
|
164
|
+
required=False,
|
|
165
|
+
description='Client Id',
|
|
166
|
+
),
|
|
167
|
+
Param(
|
|
168
|
+
name='client_secret',
|
|
169
|
+
location='body',
|
|
170
|
+
kind='string',
|
|
171
|
+
required=False,
|
|
172
|
+
description='Client Secret',
|
|
173
|
+
secret=True,
|
|
174
|
+
),
|
|
175
|
+
Param(
|
|
176
|
+
name='customer_id',
|
|
177
|
+
location='body',
|
|
178
|
+
kind='string',
|
|
179
|
+
required=True,
|
|
180
|
+
description='Customer Id',
|
|
181
|
+
),
|
|
182
|
+
Param(
|
|
183
|
+
name='developer_token',
|
|
184
|
+
location='body',
|
|
185
|
+
kind='string',
|
|
186
|
+
required=False,
|
|
187
|
+
description='Developer Token',
|
|
188
|
+
secret=True,
|
|
189
|
+
),
|
|
190
|
+
Param(
|
|
191
|
+
name='login_customer_id',
|
|
192
|
+
location='body',
|
|
193
|
+
kind='string',
|
|
194
|
+
required=False,
|
|
195
|
+
description='Login Customer Id',
|
|
196
|
+
nullable=True,
|
|
197
|
+
),
|
|
198
|
+
Param(
|
|
199
|
+
name='refresh_token',
|
|
200
|
+
location='body',
|
|
201
|
+
kind='string',
|
|
202
|
+
required=True,
|
|
203
|
+
description='Refresh Token',
|
|
204
|
+
secret=True,
|
|
205
|
+
),
|
|
206
|
+
Param(
|
|
207
|
+
name='start_date',
|
|
208
|
+
location='body',
|
|
209
|
+
kind='string',
|
|
210
|
+
required=False,
|
|
211
|
+
description='Start Date',
|
|
212
|
+
),
|
|
213
|
+
),
|
|
214
|
+
),
|
|
215
|
+
(
|
|
216
|
+
'instagram',
|
|
217
|
+
'InstagramConnectedConfig',
|
|
218
|
+
(
|
|
219
|
+
Param(
|
|
220
|
+
name='access_token',
|
|
221
|
+
location='body',
|
|
222
|
+
kind='string',
|
|
223
|
+
required=True,
|
|
224
|
+
description='Access Token',
|
|
225
|
+
secret=True,
|
|
226
|
+
),
|
|
227
|
+
Param(
|
|
228
|
+
name='account_id',
|
|
229
|
+
location='body',
|
|
230
|
+
kind='string',
|
|
231
|
+
required=False,
|
|
232
|
+
description='Account Id',
|
|
233
|
+
),
|
|
234
|
+
Param(
|
|
235
|
+
name='login',
|
|
236
|
+
location='body',
|
|
237
|
+
kind='string',
|
|
238
|
+
required=False,
|
|
239
|
+
description='Login',
|
|
240
|
+
choices=(
|
|
241
|
+
'facebook',
|
|
242
|
+
'instagram',
|
|
243
|
+
),
|
|
244
|
+
),
|
|
245
|
+
Param(
|
|
246
|
+
name='start_date',
|
|
247
|
+
location='body',
|
|
248
|
+
kind='string',
|
|
249
|
+
required=False,
|
|
250
|
+
description='Start Date',
|
|
251
|
+
),
|
|
252
|
+
),
|
|
253
|
+
),
|
|
254
|
+
(
|
|
255
|
+
'linkedin_pages',
|
|
256
|
+
'LinkedInPagesConnectedConfig',
|
|
257
|
+
(
|
|
258
|
+
Param(
|
|
259
|
+
name='access_token',
|
|
260
|
+
location='body',
|
|
261
|
+
kind='string',
|
|
262
|
+
required=True,
|
|
263
|
+
description='Access Token',
|
|
264
|
+
secret=True,
|
|
265
|
+
),
|
|
266
|
+
Param(
|
|
267
|
+
name='organization_id',
|
|
268
|
+
location='body',
|
|
269
|
+
kind='string',
|
|
270
|
+
required=False,
|
|
271
|
+
description='Organization Id',
|
|
272
|
+
),
|
|
273
|
+
Param(
|
|
274
|
+
name='start_date',
|
|
275
|
+
location='body',
|
|
276
|
+
kind='string',
|
|
277
|
+
required=False,
|
|
278
|
+
description='Start Date',
|
|
279
|
+
),
|
|
280
|
+
),
|
|
281
|
+
),
|
|
282
|
+
(
|
|
283
|
+
'meta_ads',
|
|
284
|
+
'MetaAdsConnectedConfig',
|
|
285
|
+
(
|
|
286
|
+
Param(
|
|
287
|
+
name='access_token',
|
|
288
|
+
location='body',
|
|
289
|
+
kind='string',
|
|
290
|
+
required=True,
|
|
291
|
+
description='Access Token',
|
|
292
|
+
secret=True,
|
|
293
|
+
),
|
|
294
|
+
Param(
|
|
295
|
+
name='account_id',
|
|
296
|
+
location='body',
|
|
297
|
+
kind='string',
|
|
298
|
+
required=True,
|
|
299
|
+
description='Account Id',
|
|
300
|
+
),
|
|
301
|
+
Param(
|
|
302
|
+
name='app_id',
|
|
303
|
+
location='body',
|
|
304
|
+
kind='string',
|
|
305
|
+
required=False,
|
|
306
|
+
description='App Id',
|
|
307
|
+
),
|
|
308
|
+
Param(
|
|
309
|
+
name='app_secret',
|
|
310
|
+
location='body',
|
|
311
|
+
kind='string',
|
|
312
|
+
required=False,
|
|
313
|
+
description='App Secret',
|
|
314
|
+
secret=True,
|
|
315
|
+
),
|
|
316
|
+
Param(
|
|
317
|
+
name='extra_account_ids',
|
|
318
|
+
location='body',
|
|
319
|
+
kind='list',
|
|
320
|
+
required=False,
|
|
321
|
+
description='Further ad accounts, synced into the same tables. Depending on the deployment, POST /source either checks each one against the granted accounts (400 account_not_in_grant) or drops them.',
|
|
322
|
+
item_kind='string',
|
|
323
|
+
),
|
|
324
|
+
Param(
|
|
325
|
+
name='start_date',
|
|
326
|
+
location='body',
|
|
327
|
+
kind='string',
|
|
328
|
+
required=False,
|
|
329
|
+
description='Start Date',
|
|
330
|
+
),
|
|
331
|
+
),
|
|
332
|
+
),
|
|
333
|
+
(
|
|
334
|
+
'mongodb',
|
|
335
|
+
'MongoDBConnectedConfig',
|
|
336
|
+
(
|
|
337
|
+
Param(
|
|
338
|
+
name='db_name',
|
|
339
|
+
location='body',
|
|
340
|
+
kind='string',
|
|
341
|
+
required=True,
|
|
342
|
+
description='Db Name',
|
|
343
|
+
),
|
|
344
|
+
Param(
|
|
345
|
+
name='host',
|
|
346
|
+
location='body',
|
|
347
|
+
kind='string',
|
|
348
|
+
required=True,
|
|
349
|
+
description='Host',
|
|
350
|
+
),
|
|
351
|
+
Param(
|
|
352
|
+
name='password',
|
|
353
|
+
location='body',
|
|
354
|
+
kind='string',
|
|
355
|
+
required=False,
|
|
356
|
+
description='Password',
|
|
357
|
+
secret=True,
|
|
358
|
+
),
|
|
359
|
+
Param(
|
|
360
|
+
name='port',
|
|
361
|
+
location='body',
|
|
362
|
+
kind='integer',
|
|
363
|
+
required=True,
|
|
364
|
+
description='Port',
|
|
365
|
+
),
|
|
366
|
+
Param(
|
|
367
|
+
name='ssl_mode',
|
|
368
|
+
location='body',
|
|
369
|
+
kind='string',
|
|
370
|
+
required=False,
|
|
371
|
+
description='Ssl Mode',
|
|
372
|
+
),
|
|
373
|
+
Param(
|
|
374
|
+
name='username',
|
|
375
|
+
location='body',
|
|
376
|
+
kind='string',
|
|
377
|
+
required=True,
|
|
378
|
+
description='Username',
|
|
379
|
+
),
|
|
380
|
+
),
|
|
381
|
+
),
|
|
382
|
+
(
|
|
383
|
+
'mssql',
|
|
384
|
+
'MSSQLConnectedConfig',
|
|
385
|
+
(
|
|
386
|
+
Param(
|
|
387
|
+
name='db_name',
|
|
388
|
+
location='body',
|
|
389
|
+
kind='string',
|
|
390
|
+
required=True,
|
|
391
|
+
description='Db Name',
|
|
392
|
+
),
|
|
393
|
+
Param(
|
|
394
|
+
name='host',
|
|
395
|
+
location='body',
|
|
396
|
+
kind='string',
|
|
397
|
+
required=True,
|
|
398
|
+
description='Host',
|
|
399
|
+
),
|
|
400
|
+
Param(
|
|
401
|
+
name='password',
|
|
402
|
+
location='body',
|
|
403
|
+
kind='string',
|
|
404
|
+
required=False,
|
|
405
|
+
description='Password',
|
|
406
|
+
secret=True,
|
|
407
|
+
),
|
|
408
|
+
Param(
|
|
409
|
+
name='port',
|
|
410
|
+
location='body',
|
|
411
|
+
kind='integer',
|
|
412
|
+
required=True,
|
|
413
|
+
description='Port',
|
|
414
|
+
),
|
|
415
|
+
Param(
|
|
416
|
+
name='ssl_mode',
|
|
417
|
+
location='body',
|
|
418
|
+
kind='string',
|
|
419
|
+
required=False,
|
|
420
|
+
description='Ssl Mode',
|
|
421
|
+
),
|
|
422
|
+
Param(
|
|
423
|
+
name='username',
|
|
424
|
+
location='body',
|
|
425
|
+
kind='string',
|
|
426
|
+
required=True,
|
|
427
|
+
description='Username',
|
|
428
|
+
),
|
|
429
|
+
),
|
|
430
|
+
),
|
|
431
|
+
(
|
|
432
|
+
'mysql',
|
|
433
|
+
'MySQLConnectedConfig',
|
|
434
|
+
(
|
|
435
|
+
Param(
|
|
436
|
+
name='db_name',
|
|
437
|
+
location='body',
|
|
438
|
+
kind='string',
|
|
439
|
+
required=True,
|
|
440
|
+
description='Db Name',
|
|
441
|
+
),
|
|
442
|
+
Param(
|
|
443
|
+
name='host',
|
|
444
|
+
location='body',
|
|
445
|
+
kind='string',
|
|
446
|
+
required=True,
|
|
447
|
+
description='Host',
|
|
448
|
+
),
|
|
449
|
+
Param(
|
|
450
|
+
name='password',
|
|
451
|
+
location='body',
|
|
452
|
+
kind='string',
|
|
453
|
+
required=False,
|
|
454
|
+
description='Password',
|
|
455
|
+
secret=True,
|
|
456
|
+
),
|
|
457
|
+
Param(
|
|
458
|
+
name='port',
|
|
459
|
+
location='body',
|
|
460
|
+
kind='integer',
|
|
461
|
+
required=True,
|
|
462
|
+
description='Port',
|
|
463
|
+
),
|
|
464
|
+
Param(
|
|
465
|
+
name='ssl_mode',
|
|
466
|
+
location='body',
|
|
467
|
+
kind='string',
|
|
468
|
+
required=False,
|
|
469
|
+
description='Ssl Mode',
|
|
470
|
+
),
|
|
471
|
+
Param(
|
|
472
|
+
name='username',
|
|
473
|
+
location='body',
|
|
474
|
+
kind='string',
|
|
475
|
+
required=True,
|
|
476
|
+
description='Username',
|
|
477
|
+
),
|
|
478
|
+
),
|
|
479
|
+
),
|
|
480
|
+
(
|
|
481
|
+
'postgres',
|
|
482
|
+
'PostgresConnectedConfig',
|
|
483
|
+
(
|
|
484
|
+
Param(
|
|
485
|
+
name='db_name',
|
|
486
|
+
location='body',
|
|
487
|
+
kind='string',
|
|
488
|
+
required=True,
|
|
489
|
+
description='Db Name',
|
|
490
|
+
),
|
|
491
|
+
Param(
|
|
492
|
+
name='host',
|
|
493
|
+
location='body',
|
|
494
|
+
kind='string',
|
|
495
|
+
required=True,
|
|
496
|
+
description='Host',
|
|
497
|
+
),
|
|
498
|
+
Param(
|
|
499
|
+
name='password',
|
|
500
|
+
location='body',
|
|
501
|
+
kind='string',
|
|
502
|
+
required=False,
|
|
503
|
+
description='Password',
|
|
504
|
+
secret=True,
|
|
505
|
+
),
|
|
506
|
+
Param(
|
|
507
|
+
name='port',
|
|
508
|
+
location='body',
|
|
509
|
+
kind='integer',
|
|
510
|
+
required=True,
|
|
511
|
+
description='Port',
|
|
512
|
+
),
|
|
513
|
+
Param(
|
|
514
|
+
name='ssl_mode',
|
|
515
|
+
location='body',
|
|
516
|
+
kind='string',
|
|
517
|
+
required=False,
|
|
518
|
+
description='Ssl Mode',
|
|
519
|
+
),
|
|
520
|
+
Param(
|
|
521
|
+
name='username',
|
|
522
|
+
location='body',
|
|
523
|
+
kind='string',
|
|
524
|
+
required=True,
|
|
525
|
+
description='Username',
|
|
526
|
+
),
|
|
527
|
+
),
|
|
528
|
+
),
|
|
529
|
+
(
|
|
530
|
+
'shopify',
|
|
531
|
+
'ShopifyConnectedConfig',
|
|
532
|
+
(
|
|
533
|
+
Param(
|
|
534
|
+
name='access_token',
|
|
535
|
+
location='body',
|
|
536
|
+
kind='string',
|
|
537
|
+
required=True,
|
|
538
|
+
description='Access Token',
|
|
539
|
+
secret=True,
|
|
540
|
+
),
|
|
541
|
+
Param(
|
|
542
|
+
name='bulk_window_in_days',
|
|
543
|
+
location='body',
|
|
544
|
+
kind='integer',
|
|
545
|
+
required=False,
|
|
546
|
+
description='Bulk Window In Days',
|
|
547
|
+
),
|
|
548
|
+
Param(
|
|
549
|
+
name='start_date',
|
|
550
|
+
location='body',
|
|
551
|
+
kind='string',
|
|
552
|
+
required=False,
|
|
553
|
+
description='Start Date',
|
|
554
|
+
),
|
|
555
|
+
),
|
|
556
|
+
),
|
|
557
|
+
),
|
|
558
|
+
variant_field='config',
|
|
559
|
+
),
|
|
560
|
+
response=Response(
|
|
561
|
+
kind='json',
|
|
562
|
+
model='shared:ConnectedSourceResponse',
|
|
563
|
+
shape='object',
|
|
564
|
+
),
|
|
565
|
+
examples=(
|
|
566
|
+
'databay source create postgres --name <name> --host <host> --port <port> --db-name <db_name> --username <username> --password-env <password_env>',
|
|
567
|
+
'databay source create mysql --name <name> --host <host> --port <port> --db-name <db_name> --username <username> --password-env <password_env>',
|
|
568
|
+
'databay source create mssql --name <name> --host <host> --port <port> --db-name <db_name> --username <username> --password-env <password_env>',
|
|
569
|
+
'databay source create mongodb --name <name> --host <host> --port <port> --db-name <db_name> --username <username> --password-env <password_env>',
|
|
570
|
+
'databay source create shopify --name <name> --access-token-env <access_token_env>',
|
|
571
|
+
'databay source create meta_ads --name <name> --access-token-env <access_token_env> --account-id <account_id>',
|
|
572
|
+
'databay source create google_ads --name <name> --refresh-token-env <refresh_token_env> --customer-id <customer_id>',
|
|
573
|
+
'databay source create ga4 --name <name> --property-id <property_id> --service-account-json-env <service_account_json_env>',
|
|
574
|
+
'databay source create instagram --name <name> --access-token-env <access_token_env>',
|
|
575
|
+
'databay source create linkedin_pages --name <name> --access-token-env <access_token_env>',
|
|
576
|
+
),
|
|
577
|
+
columns=(
|
|
578
|
+
'uuid',
|
|
579
|
+
'name',
|
|
580
|
+
'source_type',
|
|
581
|
+
'status',
|
|
582
|
+
),
|
|
583
|
+
)
|
|
584
|
+
|
|
585
|
+
SOURCE_DELETE = Operation(
|
|
586
|
+
operation_id='source_delete',
|
|
587
|
+
noun='source',
|
|
588
|
+
verb='delete',
|
|
589
|
+
method='delete',
|
|
590
|
+
path='/api/configstore/source/{source_uuid}',
|
|
591
|
+
summary='Connected Source Delete',
|
|
592
|
+
description="Delete a source that nothing depends on; never cascades.\n\nIn an org that scopes resources only its home project's editors may delete it\n(403 ``not_home`` for a shared source). 204 when the source is unused, 409 (with the\ndependent list) when it is not; ``POST /source/{uuid}/cascade-delete`` tears down\ndependents. The source is resolved (404) before the dependency check, so a 409 never\nleaks another tenant's source. ``DELETING`` is set before the check so a concurrent\npipe create sees it; a failed lookup restores ``CONNECTED`` and answers 502.\nRe-issuing DELETE on a source stranded in ``DELETING`` re-checks and finalizes it.",
|
|
593
|
+
project='header',
|
|
594
|
+
destructive=True,
|
|
595
|
+
idempotent=False,
|
|
596
|
+
since='1.0',
|
|
597
|
+
params=(
|
|
598
|
+
Param(
|
|
599
|
+
name='source_uuid',
|
|
600
|
+
location='path',
|
|
601
|
+
kind='string',
|
|
602
|
+
required=True,
|
|
603
|
+
description='uuid of the connected source',
|
|
604
|
+
),
|
|
605
|
+
),
|
|
606
|
+
body=None,
|
|
607
|
+
response=Response(
|
|
608
|
+
kind='empty',
|
|
609
|
+
),
|
|
610
|
+
examples=(
|
|
611
|
+
'databay source delete <source_uuid> --yes',
|
|
612
|
+
),
|
|
613
|
+
)
|
|
614
|
+
|
|
615
|
+
SOURCE_FORCE_DELETE = Operation(
|
|
616
|
+
operation_id='source_force_delete',
|
|
617
|
+
noun='source',
|
|
618
|
+
verb='force-delete',
|
|
619
|
+
method='post',
|
|
620
|
+
path='/api/configstore/source/{source_uuid}/force-delete',
|
|
621
|
+
summary='Connected Source Force Delete',
|
|
622
|
+
description="Break-glass: destroy a source's credentials now, dependency check skipped. Superadmin only.\n\nFor a leaked credential when the dependency check that every other delete path fails\nclosed on cannot be answered. The source and its stored credentials are deleted at once;\nits pipes are torn down later. Consequence: teardown can no longer read the credentials, so\nthe replication slot survives in the customer's database until dropped by hand; the\nresponse body carries that remediation. The dependent-pipe count is best-effort and does\nnot block; ``pipes_at_deletion: null`` means it was unknown, not zero.",
|
|
623
|
+
project=None,
|
|
624
|
+
destructive=True,
|
|
625
|
+
idempotent=False,
|
|
626
|
+
since='1.0',
|
|
627
|
+
params=(
|
|
628
|
+
Param(
|
|
629
|
+
name='source_uuid',
|
|
630
|
+
location='path',
|
|
631
|
+
kind='string',
|
|
632
|
+
required=True,
|
|
633
|
+
description='uuid of the connected source',
|
|
634
|
+
),
|
|
635
|
+
),
|
|
636
|
+
body=None,
|
|
637
|
+
response=Response(
|
|
638
|
+
kind='json',
|
|
639
|
+
model='source:SourceForceDeleteResponse',
|
|
640
|
+
shape='object',
|
|
641
|
+
),
|
|
642
|
+
examples=(
|
|
643
|
+
'databay source force-delete <source_uuid> --yes',
|
|
644
|
+
),
|
|
645
|
+
)
|
|
646
|
+
|
|
647
|
+
SOURCE_GET = Operation(
|
|
648
|
+
operation_id='source_get',
|
|
649
|
+
noun='source',
|
|
650
|
+
verb='get',
|
|
651
|
+
method='get',
|
|
652
|
+
path='/api/configstore/source/{source_uuid}',
|
|
653
|
+
summary='Connected Source Get',
|
|
654
|
+
description="Detail view for one source: the allowlisted connection params + timestamps.\n\nOnly the source type's allowlisted, non-secret connection params are returned.\n``secrets_set`` reports only *whether* each credential is populated, never its value.",
|
|
655
|
+
project='header',
|
|
656
|
+
destructive=False,
|
|
657
|
+
idempotent=False,
|
|
658
|
+
since='1.0',
|
|
659
|
+
params=(
|
|
660
|
+
Param(
|
|
661
|
+
name='source_uuid',
|
|
662
|
+
location='path',
|
|
663
|
+
kind='string',
|
|
664
|
+
required=True,
|
|
665
|
+
description='uuid of the connected source',
|
|
666
|
+
),
|
|
667
|
+
),
|
|
668
|
+
body=None,
|
|
669
|
+
response=Response(
|
|
670
|
+
kind='json',
|
|
671
|
+
model='source:ConnectedSourceDetailResponse',
|
|
672
|
+
shape='object',
|
|
673
|
+
),
|
|
674
|
+
examples=(
|
|
675
|
+
'databay source get <source_uuid>',
|
|
676
|
+
),
|
|
677
|
+
)
|
|
678
|
+
|
|
679
|
+
SOURCE_LIST = Operation(
|
|
680
|
+
operation_id='source_list',
|
|
681
|
+
noun='source',
|
|
682
|
+
verb='list',
|
|
683
|
+
method='get',
|
|
684
|
+
path='/api/configstore/source',
|
|
685
|
+
summary='Connected Source List',
|
|
686
|
+
description='List the org\'s sources; in an org that scopes resources, those usable in the active project.\n\nHome and shared sources of ``X-Databay-Project-ID`` (General with a\n``Deprecation`` header when missing) plus ones pending a home there; quarantined ones\n("Needs a home") for org admins only.',
|
|
687
|
+
project='header',
|
|
688
|
+
destructive=False,
|
|
689
|
+
idempotent=False,
|
|
690
|
+
since='1.0',
|
|
691
|
+
params=(),
|
|
692
|
+
body=None,
|
|
693
|
+
response=Response(
|
|
694
|
+
kind='json',
|
|
695
|
+
model='source:SourceListResponse',
|
|
696
|
+
shape='array',
|
|
697
|
+
),
|
|
698
|
+
examples=(
|
|
699
|
+
'databay source list',
|
|
700
|
+
'databay source list --project <project_id>',
|
|
701
|
+
),
|
|
702
|
+
columns=(
|
|
703
|
+
'uuid',
|
|
704
|
+
'name',
|
|
705
|
+
'source_type',
|
|
706
|
+
'status',
|
|
707
|
+
),
|
|
708
|
+
)
|
|
709
|
+
|
|
710
|
+
SOURCE_PRECHECK = Operation(
|
|
711
|
+
operation_id='source_precheck',
|
|
712
|
+
noun='source',
|
|
713
|
+
verb='precheck',
|
|
714
|
+
method='post',
|
|
715
|
+
path='/api/configstore/source/precheck',
|
|
716
|
+
summary='Connected Source Precheck',
|
|
717
|
+
description='Check an unsaved DB source against everything its type needs.\n\nEvery requirement comes back pass / fail / warn / unknown with the exact fix, rendered\nfor this user and database. Persists nothing and gates nothing: a failing report is a\n200, because "this is what to fix" is the answer, not an error. 422 ``host_not_allowed``,\n429 ``precheck_rate_limited`` and 503 ``precheck_busy`` / ``precheck_limiter_unavailable``\n(with ``Retry-After``) are the refusals.',
|
|
718
|
+
project=None,
|
|
719
|
+
destructive=False,
|
|
720
|
+
idempotent=False,
|
|
721
|
+
since='1.0',
|
|
722
|
+
params=(
|
|
723
|
+
Param(
|
|
724
|
+
name='publication_mode',
|
|
725
|
+
location='query',
|
|
726
|
+
kind='string',
|
|
727
|
+
required=False,
|
|
728
|
+
description='the publication path to check a Postgres source for',
|
|
729
|
+
choices=(
|
|
730
|
+
'customer_managed',
|
|
731
|
+
'databay_managed',
|
|
732
|
+
),
|
|
733
|
+
nullable=True,
|
|
734
|
+
),
|
|
735
|
+
),
|
|
736
|
+
body=Body(
|
|
737
|
+
schema=None,
|
|
738
|
+
discriminator='source_type',
|
|
739
|
+
variants=(
|
|
740
|
+
(
|
|
741
|
+
'mongodb',
|
|
742
|
+
'MongoDBConnectedConfig',
|
|
743
|
+
(
|
|
744
|
+
Param(
|
|
745
|
+
name='db_name',
|
|
746
|
+
location='body',
|
|
747
|
+
kind='string',
|
|
748
|
+
required=True,
|
|
749
|
+
description='Db Name',
|
|
750
|
+
),
|
|
751
|
+
Param(
|
|
752
|
+
name='host',
|
|
753
|
+
location='body',
|
|
754
|
+
kind='string',
|
|
755
|
+
required=True,
|
|
756
|
+
description='Host',
|
|
757
|
+
),
|
|
758
|
+
Param(
|
|
759
|
+
name='password',
|
|
760
|
+
location='body',
|
|
761
|
+
kind='string',
|
|
762
|
+
required=False,
|
|
763
|
+
description='Password',
|
|
764
|
+
secret=True,
|
|
765
|
+
),
|
|
766
|
+
Param(
|
|
767
|
+
name='port',
|
|
768
|
+
location='body',
|
|
769
|
+
kind='integer',
|
|
770
|
+
required=True,
|
|
771
|
+
description='Port',
|
|
772
|
+
),
|
|
773
|
+
Param(
|
|
774
|
+
name='ssl_mode',
|
|
775
|
+
location='body',
|
|
776
|
+
kind='string',
|
|
777
|
+
required=False,
|
|
778
|
+
description='Ssl Mode',
|
|
779
|
+
),
|
|
780
|
+
Param(
|
|
781
|
+
name='username',
|
|
782
|
+
location='body',
|
|
783
|
+
kind='string',
|
|
784
|
+
required=True,
|
|
785
|
+
description='Username',
|
|
786
|
+
),
|
|
787
|
+
),
|
|
788
|
+
),
|
|
789
|
+
(
|
|
790
|
+
'mssql',
|
|
791
|
+
'MSSQLConnectedConfig',
|
|
792
|
+
(
|
|
793
|
+
Param(
|
|
794
|
+
name='db_name',
|
|
795
|
+
location='body',
|
|
796
|
+
kind='string',
|
|
797
|
+
required=True,
|
|
798
|
+
description='Db Name',
|
|
799
|
+
),
|
|
800
|
+
Param(
|
|
801
|
+
name='host',
|
|
802
|
+
location='body',
|
|
803
|
+
kind='string',
|
|
804
|
+
required=True,
|
|
805
|
+
description='Host',
|
|
806
|
+
),
|
|
807
|
+
Param(
|
|
808
|
+
name='password',
|
|
809
|
+
location='body',
|
|
810
|
+
kind='string',
|
|
811
|
+
required=False,
|
|
812
|
+
description='Password',
|
|
813
|
+
secret=True,
|
|
814
|
+
),
|
|
815
|
+
Param(
|
|
816
|
+
name='port',
|
|
817
|
+
location='body',
|
|
818
|
+
kind='integer',
|
|
819
|
+
required=True,
|
|
820
|
+
description='Port',
|
|
821
|
+
),
|
|
822
|
+
Param(
|
|
823
|
+
name='ssl_mode',
|
|
824
|
+
location='body',
|
|
825
|
+
kind='string',
|
|
826
|
+
required=False,
|
|
827
|
+
description='Ssl Mode',
|
|
828
|
+
),
|
|
829
|
+
Param(
|
|
830
|
+
name='username',
|
|
831
|
+
location='body',
|
|
832
|
+
kind='string',
|
|
833
|
+
required=True,
|
|
834
|
+
description='Username',
|
|
835
|
+
),
|
|
836
|
+
),
|
|
837
|
+
),
|
|
838
|
+
(
|
|
839
|
+
'mysql',
|
|
840
|
+
'MySQLConnectedConfig',
|
|
841
|
+
(
|
|
842
|
+
Param(
|
|
843
|
+
name='db_name',
|
|
844
|
+
location='body',
|
|
845
|
+
kind='string',
|
|
846
|
+
required=True,
|
|
847
|
+
description='Db Name',
|
|
848
|
+
),
|
|
849
|
+
Param(
|
|
850
|
+
name='host',
|
|
851
|
+
location='body',
|
|
852
|
+
kind='string',
|
|
853
|
+
required=True,
|
|
854
|
+
description='Host',
|
|
855
|
+
),
|
|
856
|
+
Param(
|
|
857
|
+
name='password',
|
|
858
|
+
location='body',
|
|
859
|
+
kind='string',
|
|
860
|
+
required=False,
|
|
861
|
+
description='Password',
|
|
862
|
+
secret=True,
|
|
863
|
+
),
|
|
864
|
+
Param(
|
|
865
|
+
name='port',
|
|
866
|
+
location='body',
|
|
867
|
+
kind='integer',
|
|
868
|
+
required=True,
|
|
869
|
+
description='Port',
|
|
870
|
+
),
|
|
871
|
+
Param(
|
|
872
|
+
name='ssl_mode',
|
|
873
|
+
location='body',
|
|
874
|
+
kind='string',
|
|
875
|
+
required=False,
|
|
876
|
+
description='Ssl Mode',
|
|
877
|
+
),
|
|
878
|
+
Param(
|
|
879
|
+
name='username',
|
|
880
|
+
location='body',
|
|
881
|
+
kind='string',
|
|
882
|
+
required=True,
|
|
883
|
+
description='Username',
|
|
884
|
+
),
|
|
885
|
+
),
|
|
886
|
+
),
|
|
887
|
+
(
|
|
888
|
+
'postgres',
|
|
889
|
+
'PostgresConnectedConfig',
|
|
890
|
+
(
|
|
891
|
+
Param(
|
|
892
|
+
name='db_name',
|
|
893
|
+
location='body',
|
|
894
|
+
kind='string',
|
|
895
|
+
required=True,
|
|
896
|
+
description='Db Name',
|
|
897
|
+
),
|
|
898
|
+
Param(
|
|
899
|
+
name='host',
|
|
900
|
+
location='body',
|
|
901
|
+
kind='string',
|
|
902
|
+
required=True,
|
|
903
|
+
description='Host',
|
|
904
|
+
),
|
|
905
|
+
Param(
|
|
906
|
+
name='password',
|
|
907
|
+
location='body',
|
|
908
|
+
kind='string',
|
|
909
|
+
required=False,
|
|
910
|
+
description='Password',
|
|
911
|
+
secret=True,
|
|
912
|
+
),
|
|
913
|
+
Param(
|
|
914
|
+
name='port',
|
|
915
|
+
location='body',
|
|
916
|
+
kind='integer',
|
|
917
|
+
required=True,
|
|
918
|
+
description='Port',
|
|
919
|
+
),
|
|
920
|
+
Param(
|
|
921
|
+
name='ssl_mode',
|
|
922
|
+
location='body',
|
|
923
|
+
kind='string',
|
|
924
|
+
required=False,
|
|
925
|
+
description='Ssl Mode',
|
|
926
|
+
),
|
|
927
|
+
Param(
|
|
928
|
+
name='username',
|
|
929
|
+
location='body',
|
|
930
|
+
kind='string',
|
|
931
|
+
required=True,
|
|
932
|
+
description='Username',
|
|
933
|
+
),
|
|
934
|
+
),
|
|
935
|
+
),
|
|
936
|
+
),
|
|
937
|
+
),
|
|
938
|
+
response=Response(
|
|
939
|
+
kind='json',
|
|
940
|
+
model='source:PrecheckReportView',
|
|
941
|
+
shape='object',
|
|
942
|
+
),
|
|
943
|
+
examples=(
|
|
944
|
+
'databay source precheck postgres --host db.example.com --port 5432 --db-name shop --username databay --password-env PGPASSWORD',
|
|
945
|
+
),
|
|
946
|
+
verdict=Verdict(
|
|
947
|
+
field='/ready',
|
|
948
|
+
ok=(
|
|
949
|
+
'true',
|
|
950
|
+
),
|
|
951
|
+
not_ready=(
|
|
952
|
+
'false',
|
|
953
|
+
),
|
|
954
|
+
),
|
|
955
|
+
)
|
|
956
|
+
|
|
957
|
+
SOURCE_RECHECK = Operation(
|
|
958
|
+
operation_id='source_recheck',
|
|
959
|
+
noun='source',
|
|
960
|
+
verb='recheck',
|
|
961
|
+
method='post',
|
|
962
|
+
path='/api/configstore/source/{source_uuid}/precheck',
|
|
963
|
+
summary='Connected Source Recheck',
|
|
964
|
+
description="Re-check a saved source with its stored credentials, and store the verdict.\n\nThe source's status follows the report (``CONNECTED`` / ``SETUP_INCOMPLETE`` /\n``NEEDS_ATTENTION``) unless a lifecycle status (deleting, updating, needs_reauth, ...)\nholds it; ``source_status`` in the response is what the row says afterwards.",
|
|
965
|
+
project='header',
|
|
966
|
+
destructive=False,
|
|
967
|
+
idempotent=False,
|
|
968
|
+
since='1.0',
|
|
969
|
+
params=(
|
|
970
|
+
Param(
|
|
971
|
+
name='source_uuid',
|
|
972
|
+
location='path',
|
|
973
|
+
kind='string',
|
|
974
|
+
required=True,
|
|
975
|
+
description='uuid of the connected source',
|
|
976
|
+
),
|
|
977
|
+
),
|
|
978
|
+
body=None,
|
|
979
|
+
response=Response(
|
|
980
|
+
kind='json',
|
|
981
|
+
model='source:PrecheckReportView',
|
|
982
|
+
shape='object',
|
|
983
|
+
),
|
|
984
|
+
examples=(
|
|
985
|
+
'databay source recheck <source_uuid>',
|
|
986
|
+
),
|
|
987
|
+
verdict=Verdict(
|
|
988
|
+
field='/ready',
|
|
989
|
+
ok=(
|
|
990
|
+
'true',
|
|
991
|
+
),
|
|
992
|
+
not_ready=(
|
|
993
|
+
'false',
|
|
994
|
+
),
|
|
995
|
+
),
|
|
996
|
+
)
|
|
997
|
+
|
|
998
|
+
SOURCE_RENEW_CREDENTIALS = Operation(
|
|
999
|
+
operation_id='source_renew_credentials',
|
|
1000
|
+
noun='source',
|
|
1001
|
+
verb='renew-credentials',
|
|
1002
|
+
method='post',
|
|
1003
|
+
path='/api/configstore/source/{source_uuid}/credentials',
|
|
1004
|
+
summary='Renew Source Credentials',
|
|
1005
|
+
description="Replace a manual ad-platform source's credentials in place and sync it now.\n\n**404** unknown in this org. **422** a type renewed through its own flow (Shopify,\ndatabases), a key this type does not accept, a blank value, or a merged config that\ndoes not validate. **409** a source that is being deleted / updated. **400** the new\nMeta token does not reach the source's ad account.",
|
|
1006
|
+
project='header',
|
|
1007
|
+
destructive=True,
|
|
1008
|
+
idempotent=False,
|
|
1009
|
+
since='1.0',
|
|
1010
|
+
params=(
|
|
1011
|
+
Param(
|
|
1012
|
+
name='source_uuid',
|
|
1013
|
+
location='path',
|
|
1014
|
+
kind='string',
|
|
1015
|
+
required=True,
|
|
1016
|
+
description='uuid of the connected source',
|
|
1017
|
+
),
|
|
1018
|
+
),
|
|
1019
|
+
body=Body(
|
|
1020
|
+
schema='SourceCredentialsRenew',
|
|
1021
|
+
fields=(
|
|
1022
|
+
Param(
|
|
1023
|
+
name='credentials',
|
|
1024
|
+
location='body',
|
|
1025
|
+
kind='json',
|
|
1026
|
+
required=True,
|
|
1027
|
+
description="credential fields to replace, e.g. {'access_token': '...'}",
|
|
1028
|
+
secret=True,
|
|
1029
|
+
),
|
|
1030
|
+
),
|
|
1031
|
+
),
|
|
1032
|
+
response=Response(
|
|
1033
|
+
kind='json',
|
|
1034
|
+
model='shared:ConnectedSourceResponse',
|
|
1035
|
+
shape='object',
|
|
1036
|
+
),
|
|
1037
|
+
examples=(
|
|
1038
|
+
'databay source renew-credentials <source_uuid> --credentials-stdin --yes',
|
|
1039
|
+
),
|
|
1040
|
+
)
|
|
1041
|
+
|
|
1042
|
+
SOURCE_SETUP_SCRIPT = Operation(
|
|
1043
|
+
operation_id='source_setup_script',
|
|
1044
|
+
noun='source',
|
|
1045
|
+
verb='setup-script',
|
|
1046
|
+
method='get',
|
|
1047
|
+
path='/api/configstore/source/{source_uuid}/setup.sql',
|
|
1048
|
+
summary='Connected Source Fix Script',
|
|
1049
|
+
description="Download the fixes for what this source's latest check found, for its detected provider.",
|
|
1050
|
+
project='header',
|
|
1051
|
+
destructive=False,
|
|
1052
|
+
idempotent=False,
|
|
1053
|
+
since='1.0',
|
|
1054
|
+
params=(
|
|
1055
|
+
Param(
|
|
1056
|
+
name='source_uuid',
|
|
1057
|
+
location='path',
|
|
1058
|
+
kind='string',
|
|
1059
|
+
required=True,
|
|
1060
|
+
description='uuid of the connected source',
|
|
1061
|
+
),
|
|
1062
|
+
),
|
|
1063
|
+
body=None,
|
|
1064
|
+
response=Response(
|
|
1065
|
+
kind='text',
|
|
1066
|
+
),
|
|
1067
|
+
examples=(
|
|
1068
|
+
'databay source setup-script <source_uuid>',
|
|
1069
|
+
),
|
|
1070
|
+
)
|
|
1071
|
+
|
|
1072
|
+
SOURCE_UPDATE = Operation(
|
|
1073
|
+
operation_id='source_update',
|
|
1074
|
+
noun='source',
|
|
1075
|
+
verb='update',
|
|
1076
|
+
method='patch',
|
|
1077
|
+
path='/api/configstore/source/{source_uuid}',
|
|
1078
|
+
summary='Connected Source Patch',
|
|
1079
|
+
description="Update a source's name and/or connection credentials.\n\n**200** when no live pipes hold the old credentials, or only ``name`` changed; **202 +\nstatus=UPDATING** when live pipes need the new credentials pushed to them.\n\n``source_type`` / ``db_name`` are rejected on change, not on presence: create a new\nsource instead. OAuth sources accept ``name`` only. Credentials are re-verified against\nthe merged config with the check ``POST /source`` runs. A ``host``/``port`` change fails\nlive streaming pipes with a terminal error instead of resuming from the old server's\nposition.",
|
|
1080
|
+
project='header',
|
|
1081
|
+
destructive=True,
|
|
1082
|
+
idempotent=False,
|
|
1083
|
+
since='1.0',
|
|
1084
|
+
params=(
|
|
1085
|
+
Param(
|
|
1086
|
+
name='source_uuid',
|
|
1087
|
+
location='path',
|
|
1088
|
+
kind='string',
|
|
1089
|
+
required=True,
|
|
1090
|
+
description='uuid of the connected source',
|
|
1091
|
+
),
|
|
1092
|
+
),
|
|
1093
|
+
body=Body(
|
|
1094
|
+
schema='ConnectedSourceUpdate',
|
|
1095
|
+
fields=(
|
|
1096
|
+
Param(
|
|
1097
|
+
name='allow_incomplete',
|
|
1098
|
+
location='body',
|
|
1099
|
+
kind='boolean',
|
|
1100
|
+
required=False,
|
|
1101
|
+
description='Allow Incomplete',
|
|
1102
|
+
),
|
|
1103
|
+
Param(
|
|
1104
|
+
name='db_name',
|
|
1105
|
+
location='body',
|
|
1106
|
+
kind='string',
|
|
1107
|
+
required=False,
|
|
1108
|
+
description='Db Name',
|
|
1109
|
+
nullable=True,
|
|
1110
|
+
),
|
|
1111
|
+
Param(
|
|
1112
|
+
name='host',
|
|
1113
|
+
location='body',
|
|
1114
|
+
kind='string',
|
|
1115
|
+
required=False,
|
|
1116
|
+
description='Host',
|
|
1117
|
+
nullable=True,
|
|
1118
|
+
),
|
|
1119
|
+
Param(
|
|
1120
|
+
name='name',
|
|
1121
|
+
location='body',
|
|
1122
|
+
kind='string',
|
|
1123
|
+
required=False,
|
|
1124
|
+
description='Name',
|
|
1125
|
+
nullable=True,
|
|
1126
|
+
),
|
|
1127
|
+
Param(
|
|
1128
|
+
name='password',
|
|
1129
|
+
location='body',
|
|
1130
|
+
kind='string',
|
|
1131
|
+
required=False,
|
|
1132
|
+
description='Password',
|
|
1133
|
+
secret=True,
|
|
1134
|
+
nullable=True,
|
|
1135
|
+
),
|
|
1136
|
+
Param(
|
|
1137
|
+
name='port',
|
|
1138
|
+
location='body',
|
|
1139
|
+
kind='integer',
|
|
1140
|
+
required=False,
|
|
1141
|
+
description='Port',
|
|
1142
|
+
nullable=True,
|
|
1143
|
+
),
|
|
1144
|
+
Param(
|
|
1145
|
+
name='source_type',
|
|
1146
|
+
location='body',
|
|
1147
|
+
kind='string',
|
|
1148
|
+
required=False,
|
|
1149
|
+
choices=(
|
|
1150
|
+
'postgres',
|
|
1151
|
+
'mysql',
|
|
1152
|
+
'mssql',
|
|
1153
|
+
'mongodb',
|
|
1154
|
+
'shopify',
|
|
1155
|
+
'meta_ads',
|
|
1156
|
+
'google_ads',
|
|
1157
|
+
'ga4',
|
|
1158
|
+
'instagram',
|
|
1159
|
+
'linkedin_pages',
|
|
1160
|
+
'x',
|
|
1161
|
+
'tiktok_ads',
|
|
1162
|
+
'file_upload',
|
|
1163
|
+
),
|
|
1164
|
+
nullable=True,
|
|
1165
|
+
),
|
|
1166
|
+
Param(
|
|
1167
|
+
name='ssl_mode',
|
|
1168
|
+
location='body',
|
|
1169
|
+
kind='string',
|
|
1170
|
+
required=False,
|
|
1171
|
+
description='Ssl Mode',
|
|
1172
|
+
nullable=True,
|
|
1173
|
+
),
|
|
1174
|
+
Param(
|
|
1175
|
+
name='username',
|
|
1176
|
+
location='body',
|
|
1177
|
+
kind='string',
|
|
1178
|
+
required=False,
|
|
1179
|
+
description='Username',
|
|
1180
|
+
nullable=True,
|
|
1181
|
+
),
|
|
1182
|
+
),
|
|
1183
|
+
),
|
|
1184
|
+
response=Response(
|
|
1185
|
+
kind='json',
|
|
1186
|
+
model='shared:ConnectedSourceResponse',
|
|
1187
|
+
shape='object',
|
|
1188
|
+
),
|
|
1189
|
+
examples=(
|
|
1190
|
+
'databay source update <source_uuid> --name "Orders replica" --yes',
|
|
1191
|
+
'databay source update <source_uuid> --password-env PGPASSWORD --yes',
|
|
1192
|
+
),
|
|
1193
|
+
)
|
|
1194
|
+
|
|
1195
|
+
OPERATIONS = (
|
|
1196
|
+
SOURCE_CASCADE_DELETE,
|
|
1197
|
+
SOURCE_CREATE,
|
|
1198
|
+
SOURCE_DELETE,
|
|
1199
|
+
SOURCE_FORCE_DELETE,
|
|
1200
|
+
SOURCE_GET,
|
|
1201
|
+
SOURCE_LIST,
|
|
1202
|
+
SOURCE_PRECHECK,
|
|
1203
|
+
SOURCE_RECHECK,
|
|
1204
|
+
SOURCE_RENEW_CREDENTIALS,
|
|
1205
|
+
SOURCE_SETUP_SCRIPT,
|
|
1206
|
+
SOURCE_UPDATE,
|
|
1207
|
+
)
|