From de91994ff97876299037aebbf894d58ef73366c9 Mon Sep 17 00:00:00 2001 From: Mitchell Date: Tue, 30 Apr 2024 11:31:44 -0500 Subject: [PATCH 1/3] docs update --- openapi-v2.yaml | 237 +++++++++++++++++---------------------- openapi-v3.yaml | 292 +++++++++++++++++++++++++++++------------------- 2 files changed, 283 insertions(+), 246 deletions(-) diff --git a/openapi-v2.yaml b/openapi-v2.yaml index e3e0866..39094cd 100644 --- a/openapi-v2.yaml +++ b/openapi-v2.yaml @@ -121,7 +121,6 @@ paths: name: account_id schema: type: integer - required: true - in: query name: limit schema: @@ -130,10 +129,18 @@ paths: name: offset schema: type: integer + - in: query + name: pk + schema: + type: integer - in: query name: project_id schema: type: integer + - in: query + name: project_id__in + schema: + type: array - in: query name: state schema: @@ -150,7 +157,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/BaseConnectionEnveloped' + $ref: '#/components/schemas/Defaults' description: '' /api/v2/accounts/{account_id}/encryptions/: get: @@ -379,11 +386,14 @@ paths: name: account_id schema: type: integer - required: true - in: query name: dbt_version schema: type: string + - in: query + name: dbt_version__in + schema: + type: array - in: query name: limit schema: @@ -392,10 +402,18 @@ paths: name: offset schema: type: integer + - in: query + name: pk + schema: + type: integer - in: query name: project_id schema: type: integer + - in: query + name: project_id__in + schema: + type: array - in: query name: state schema: @@ -463,11 +481,14 @@ paths: name: account_id schema: type: integer - required: true - in: query name: dbt_version schema: type: string + - in: query + name: dbt_version__in + schema: + type: array - in: path name: id schema: @@ -481,10 +502,18 @@ paths: name: offset schema: type: integer + - in: query + name: pk + schema: + type: integer - in: query name: project_id schema: type: integer + - in: query + name: project_id__in + schema: + type: array - in: query name: state schema: @@ -552,11 +581,14 @@ paths: name: account_id schema: type: integer - required: true - in: query name: dbt_version schema: type: string + - in: query + name: dbt_version__in + schema: + type: array - in: path name: id schema: @@ -570,10 +602,18 @@ paths: name: offset schema: type: integer + - in: query + name: pk + schema: + type: integer - in: query name: project_id schema: type: integer + - in: query + name: project_id__in + schema: + type: array - in: query name: state schema: @@ -636,14 +676,6 @@ paths: operationId: List Jobs description: Use this endpoint to list jobs for an account. parameters: - - in: query - name: account__locked - schema: - type: boolean - - in: query - name: account__state - schema: - type: integer - in: path name: account_id schema: @@ -653,23 +685,14 @@ paths: name: account_id schema: type: integer - required: true - in: query - name: deactivated - schema: - type: boolean - - in: query - name: environment__state + name: dbt_version__in schema: - type: integer + type: array - in: query name: environment_id schema: type: integer - - in: query - name: id__gt - schema: - type: integer - in: query name: limit schema: @@ -683,13 +706,17 @@ paths: schema: type: integer - in: query - name: project__state + name: pk schema: type: integer - in: query name: project_id schema: type: integer + - in: query + name: project_id__in + schema: + type: array - in: query name: state schema: @@ -855,14 +882,6 @@ paths: operationId: Retrieve Job description: Use this endpoint to retrieve the details of a job. parameters: - - in: query - name: account__locked - schema: - type: boolean - - in: query - name: account__state - schema: - type: integer - in: path name: account_id schema: @@ -872,15 +891,10 @@ paths: name: account_id schema: type: integer - required: true - in: query - name: deactivated - schema: - type: boolean - - in: query - name: environment__state + name: dbt_version__in schema: - type: integer + type: array - in: query name: environment_id schema: @@ -890,10 +904,6 @@ paths: schema: type: integer required: true - - in: query - name: id__gt - schema: - type: integer - in: query name: limit schema: @@ -907,13 +917,17 @@ paths: schema: type: integer - in: query - name: project__state + name: pk schema: type: integer - in: query name: project_id schema: type: integer + - in: query + name: project_id__in + schema: + type: array - in: query name: state schema: @@ -974,14 +988,6 @@ paths: operationId: Destroy Job description: Use this endpoint to delete a job. parameters: - - in: query - name: account__locked - schema: - type: boolean - - in: query - name: account__state - schema: - type: integer - in: path name: account_id schema: @@ -991,15 +997,10 @@ paths: name: account_id schema: type: integer - required: true - in: query - name: deactivated - schema: - type: boolean - - in: query - name: environment__state + name: dbt_version__in schema: - type: integer + type: array - in: query name: environment_id schema: @@ -1009,10 +1010,6 @@ paths: schema: type: integer required: true - - in: query - name: id__gt - schema: - type: integer - in: query name: limit schema: @@ -1026,13 +1023,17 @@ paths: schema: type: integer - in: query - name: project__state + name: pk schema: type: integer - in: query name: project_id schema: type: integer + - in: query + name: project_id__in + schema: + type: array - in: query name: state schema: @@ -2352,6 +2353,7 @@ components: - {} - {} - {} + - {} description: Why the account is locked develop_file_system: type: boolean @@ -2546,6 +2548,7 @@ components: - {} - {} - {} + - {} description: Why the account is locked develop_file_system: type: boolean @@ -2631,63 +2634,6 @@ components: additionalProperties: false definitions: {} $schema: http://json-schema.org/draft-07/schema# - BaseConnection: - type: object - required: - - id - - account_id - - name - - type - - state - properties: - id: - oneOf: - - type: 'null' - - type: integer - account_id: - type: integer - dbt_project_id: - type: integer - created_by_id: - oneOf: - - type: 'null' - - type: integer - created_by_service_token_id: - oneOf: - - type: 'null' - - type: integer - name: - allOf: - - type: string - - minLength: 1 - maxLength: 255 - type: - type: string - state: - type: integer - created_at: - type: string - format: date-time - readOnly: true - updated_at: - type: string - format: date-time - readOnly: true - additionalProperties: false - definitions: {} - $schema: http://json-schema.org/draft-07/schema# - BaseConnectionEnveloped: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/BaseConnection' - status: - $ref: '#/components/schemas/Status' - required: - - data - - status BaseConnectionV3: type: object properties: @@ -3095,6 +3041,7 @@ components: - generate_docs - run_generate_sources - run_audit_helper + - run_compare_changes properties: id: oneOf: @@ -3174,6 +3121,10 @@ components: oneOf: - type: 'null' - type: boolean + run_compare_changes: + oneOf: + - type: 'null' + - type: boolean environment: {} account: oneOf: @@ -3202,6 +3153,7 @@ components: - {} - {} - {} + - {} - type: 'null' triggers_on_draft_pr: type: boolean @@ -3256,6 +3208,7 @@ components: - generate_docs - run_generate_sources - run_audit_helper + - run_compare_changes properties: id: oneOf: @@ -3335,6 +3288,10 @@ components: oneOf: - type: 'null' - type: boolean + run_compare_changes: + oneOf: + - type: 'null' + - type: boolean environment: {} account: oneOf: @@ -3363,6 +3320,7 @@ components: - {} - {} - {} + - {} - type: 'null' triggers_on_draft_pr: type: boolean @@ -3415,6 +3373,7 @@ components: - generate_docs - run_generate_sources - run_audit_helper + - run_compare_changes properties: id: oneOf: @@ -3486,6 +3445,10 @@ components: oneOf: - type: 'null' - type: boolean + run_compare_changes: + oneOf: + - type: 'null' + - type: boolean environment: {} account: oneOf: @@ -3514,6 +3477,7 @@ components: - {} - {} - {} + - {} - type: 'null' triggers_on_draft_pr: type: boolean @@ -3642,6 +3606,8 @@ components: type: boolean git_provider_webhook: type: boolean + on_merge: + type: boolean required: - github_webhook - schedule @@ -3669,10 +3635,6 @@ components: this entity is deleted dbt_version: type: string - deactivated: - type: boolean - run_failure_count: - type: integer triggers: $ref: '#/components/schemas/JobDefinitionTriggers' settings: @@ -3697,14 +3659,15 @@ components: run_audit_helper: type: boolean default: false + run_compare_changes: + type: boolean + default: false required: - account_id - - deactivated - environment_id - generate_docs - name - project_id - - run_failure_count - run_generate_sources JobNotificationSettings: type: object @@ -3865,11 +3828,13 @@ components: - ci - scheduled - other + - merge type: string description: |- * `ci` - ci * `scheduled` - scheduled * `other` - other + * `merge` - merge ListOfStringsEnveloped: type: object properties: @@ -4501,12 +4466,8 @@ components: should_start_at: type: string format: date-time - job: - type: object - additionalProperties: {} - environment: - type: object - additionalProperties: {} + job: {} + environment: {} status_humanized: type: string in_progress: @@ -4875,6 +4836,10 @@ components: - type: 'null' - type: string format: date-time + sso_only_user: + oneOf: + - type: 'null' + - type: boolean additionalProperties: false definitions: {} $schema: http://json-schema.org/draft-07/schema# @@ -5036,6 +5001,10 @@ components: - type: 'null' - type: string format: date-time + sso_only_user: + oneOf: + - type: 'null' + - type: boolean additionalProperties: false definitions: {} $schema: http://json-schema.org/draft-07/schema# diff --git a/openapi-v3.yaml b/openapi-v3.yaml index 66fe51d..a79bff4 100644 --- a/openapi-v3.yaml +++ b/openapi-v3.yaml @@ -890,6 +890,56 @@ paths: responses: '204': description: No response body + /api/v3/accounts/{account_id}/oauth/authorize/{integration}/: + get: + operationId: Retrieve Oauth Authorize + parameters: + - in: path + name: account_id + schema: + type: integer + required: true + - in: path + name: integration + schema: + type: string + required: true + tags: + - Oauth + security: + - BearerAuthentication: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Defaults' + description: '' + /api/v3/accounts/{account_id}/oauth/callback/{integration}/: + get: + operationId: Retrieve Oauth Callback + parameters: + - in: path + name: account_id + schema: + type: integer + required: true + - in: path + name: integration + schema: + type: string + required: true + tags: + - Oauth + security: + - BearerAuthentication: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Defaults' + description: '' /api/v3/accounts/{account_id}/private-link-endpoints/: get: operationId: List PrivateLink Endpoints @@ -2850,13 +2900,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatchedExtendedAttributesRequest' + $ref: '#/components/schemas/ExtendedAttributesRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/PatchedExtendedAttributesRequest' + $ref: '#/components/schemas/ExtendedAttributesRequest' multipart/form-data: schema: - $ref: '#/components/schemas/PatchedExtendedAttributesRequest' + $ref: '#/components/schemas/ExtendedAttributesRequest' + required: true security: - BearerAuthentication: [] responses: @@ -3570,13 +3621,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatchedSemanticLayerCredentialsRequest' + $ref: '#/components/schemas/SemanticLayerCredentialsRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/PatchedSemanticLayerCredentialsRequest' + $ref: '#/components/schemas/SemanticLayerCredentialsRequest' multipart/form-data: schema: - $ref: '#/components/schemas/PatchedSemanticLayerCredentialsRequest' + $ref: '#/components/schemas/SemanticLayerCredentialsRequest' + required: true security: - BearerAuthentication: [] responses: @@ -3929,7 +3981,7 @@ paths: description: '' put: operationId: Update Webhooks Subscription - description: Edit a subscription given a subcsription id + description: Edit a subscription given a subscription id parameters: - in: path name: account_id @@ -3943,6 +3995,18 @@ paths: required: true tags: - Webhooks + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SubscriptionRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/SubscriptionRequest' + required: true security: - BearerAuthentication: [] responses: @@ -4085,6 +4149,18 @@ paths: required: true tags: - Webhooks + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SubscriptionRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/SubscriptionRequest' + required: true security: - BearerAuthentication: [] responses: @@ -4443,6 +4519,7 @@ components: - {} - {} - {} + - {} description: Why the account is locked develop_file_system: type: boolean @@ -4641,7 +4718,7 @@ components: type: string description: The name of the connection type: - $ref: '#/components/schemas/Type666Enum' + $ref: '#/components/schemas/Type32eEnum' created_by_id: type: integer created_by_service_token_id: @@ -4684,7 +4761,7 @@ components: minLength: 1 description: The name of the connection type: - $ref: '#/components/schemas/Type666Enum' + $ref: '#/components/schemas/Type32eEnum' created_by_id: type: integer created_by_service_token_id: @@ -4733,8 +4810,6 @@ components: job_definition_id: type: integer environment: - type: object - additionalProperties: {} readOnly: true display_value: type: string @@ -4912,9 +4987,7 @@ components: type: integer adapter_version: $ref: '#/components/schemas/AdapterVersionEnum' - metadata_json: - type: object - additionalProperties: {} + metadata_json: {} state: type: integer default: 1 @@ -4954,9 +5027,7 @@ components: type: integer adapter_version: $ref: '#/components/schemas/AdapterVersionEnum' - metadata_json: - type: object - additionalProperties: {} + metadata_json: {} state: type: integer default: 1 @@ -5065,8 +5136,6 @@ components: format: date-time readOnly: true project: - type: object - additionalProperties: {} readOnly: true credentials: allOf: @@ -5149,8 +5218,8 @@ components: - deployment type: string description: |- - * `development` - development - * `deployment` - deployment + * `development` - DEVELOPMENT + * `deployment` - DEPLOYMENT Event: type: object properties: @@ -5198,9 +5267,7 @@ components: type: integer project_id: type: integer - extended_attributes: - type: object - additionalProperties: {} + extended_attributes: {} created_at: type: string format: date-time @@ -5234,9 +5301,7 @@ components: type: integer project_id: type: integer - extended_attributes: - type: object - additionalProperties: {} + extended_attributes: {} state: type: integer default: 1 @@ -5611,6 +5676,8 @@ components: type: boolean git_provider_webhook: type: boolean + on_merge: + type: boolean required: - github_webhook - schedule @@ -5638,10 +5705,6 @@ components: this entity is deleted dbt_version: type: string - deactivated: - type: boolean - run_failure_count: - type: integer triggers: $ref: '#/components/schemas/JobDefinitionTriggers' settings: @@ -5666,25 +5729,28 @@ components: run_audit_helper: type: boolean default: false + run_compare_changes: + type: boolean + default: false required: - account_id - - deactivated - environment_id - generate_docs - name - project_id - - run_failure_count - run_generate_sources JobTypeEnum: enum: - ci - scheduled - other + - merge type: string description: |- * `ci` - ci * `scheduled` - scheduled * `other` - other + * `merge` - merge LicenseMap: type: object properties: @@ -5751,9 +5817,9 @@ components: - it type: string description: |- - * `developer` - developer - * `read_only` - read_only - * `it` - it + * `developer` - DEVELOPER + * `read_only` - READ_ONLY + * `it` - IT ListWebhooksReceiptsResponseEnvelope: type: object properties: @@ -5843,61 +5909,6 @@ components: required: - filters - pagination - PatchedExtendedAttributesRequest: - type: object - properties: - id: - type: integer - account_id: - type: integer - project_id: - type: integer - extended_attributes: - type: object - additionalProperties: {} - state: - type: integer - default: 1 - description: A value of 1 means this entity is active and a value of 2 means - this entity is deleted - PatchedSemanticLayerCredentialsRequest: - type: object - properties: - id: - type: integer - account_id: - type: integer - description: The account the credentials are associated with - adapter_version: - allOf: - - $ref: '#/components/schemas/AdapterVersionEnum' - description: |- - The adapter version. Should match the associated project's adapter version. - - * `apache_spark_v0` - apache_spark_v0 - * `databricks_spark_v0` - databricks_spark_v0 - * `databricks_v0` - databricks_v0 - * `trino_v0` - trino_v0 - * `snowflake_v0` - snowflake_v0 - * `bigquery_v0` - bigquery_v0 - * `postgres_v0` - postgres_v0 - * `redshift_v0` - redshift_v0 - * `synapse_v0` - synapse_v0 - * `fabric_v0` - fabric_v0 - schema_type: - allOf: - - $ref: '#/components/schemas/SchemaTypeEnum' - description: |- - The adapter schema type. Should always be 'semantic_layer_credentials' - - * `connection` - connection - * `credential` - credential - * `semantic_layer_credentials` - semantic_layer_credentials - state: - type: integer - default: 1 - description: A value of 1 means this entity is active and a value of 2 means - this entity is deleted PermissionSetEnum: enum: - owner @@ -5954,7 +5965,7 @@ components: project_id: type: integer type: - $ref: '#/components/schemas/Type666Enum' + $ref: '#/components/schemas/Type32eEnum' state: type: integer default: 1 @@ -6170,14 +6181,10 @@ components: type: string service: type: string - actor: - type: object - additionalProperties: {} + actor: {} event_type: type: string - event_context: - type: object - additionalProperties: {} + event_context: {} created_at: type: string format: date-time @@ -6431,8 +6438,6 @@ components: items: type: integer failures: - type: object - additionalProperties: {} description: This field will detail specific failures within a single environment variable you are attempting to create. required: @@ -6833,41 +6838,100 @@ components: properties: id: type: string - account_identifier: - type: string name: type: string + description: Webhook name description: type: string + description: Webhook description event_types: + type: array + items: {} + description: Event types that trigger this webhook. Must not be empty. + job_ids: type: array items: - type: string + type: integer + description: Job IDs that trigger this webhook. Leave empty to trigger for + all jobs. client_url: type: string + description: Endpoint where events are sent active: type: boolean + description: Whether or not this Webhook is currently active http_status_code: type: string + description: The latest HTTP status code received from the client URL. 0 + indicates that the webhook has not been dispatched. dispatched_at: type: string + description: Timestamp of when the webhook was last dispatched. + deactivate_reason: + type: string + description: Reason for deactivation account_id: + type: integer + account_identifier: + type: string + required: + - active + - client_url + - event_types + - name + SubscriptionRequest: + type: object + properties: + id: type: string + minLength: 1 + name: + type: string + minLength: 1 + description: Webhook name + description: + type: string + minLength: 1 + description: Webhook description + event_types: + type: array + items: {} + description: Event types that trigger this webhook. Must not be empty. job_ids: type: array items: - type: string + type: integer + description: Job IDs that trigger this webhook. Leave empty to trigger for + all jobs. + client_url: + type: string + minLength: 1 + description: Endpoint where events are sent + active: + type: boolean + description: Whether or not this Webhook is currently active + http_status_code: + type: string + minLength: 1 + description: The latest HTTP status code received from the client URL. 0 + indicates that the webhook has not been dispatched. + dispatched_at: + type: string + minLength: 1 + description: Timestamp of when the webhook was last dispatched. + deactivate_reason: + type: string + minLength: 1 + description: Reason for deactivation + account_id: + type: integer + account_identifier: + type: string + minLength: 1 required: - - account_id - - account_identifier - active - client_url - - description - - dispatched_at - event_types - - http_status_code - - id - - job_ids - name SubscriptionResponseEnvelope: type: object @@ -6904,7 +6968,7 @@ components: description: |- * `every_hour` - every_hour * `at_exact_hours` - at_exact_hours - Type666Enum: + Type32eEnum: enum: - postgres - redshift @@ -7103,6 +7167,10 @@ components: - type: 'null' - type: string format: date-time + sso_only_user: + oneOf: + - type: 'null' + - type: boolean additionalProperties: false definitions: {} $schema: http://json-schema.org/draft-07/schema# From 6144e3ea99ebb708cfa9abc591e8dae7c44553c0 Mon Sep 17 00:00:00 2001 From: Mitchell Date: Tue, 30 Apr 2024 11:57:26 -0500 Subject: [PATCH 2/3] remove v2 connection doc --- openapi-v2.yaml | 52 ------------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/openapi-v2.yaml b/openapi-v2.yaml index 39094cd..7c69ed0 100644 --- a/openapi-v2.yaml +++ b/openapi-v2.yaml @@ -107,58 +107,6 @@ paths: schema: $ref: '#/components/schemas/AccountEnveloped' description: '' - /api/v2/accounts/{account_id}/connections/: - get: - operationId: List Connections - description: Deprecated. Consider using the v3 API instead. - parameters: - - in: path - name: account_id - schema: - type: integer - required: true - - in: query - name: account_id - schema: - type: integer - - in: query - name: limit - schema: - type: integer - - in: query - name: offset - schema: - type: integer - - in: query - name: pk - schema: - type: integer - - in: query - name: project_id - schema: - type: integer - - in: query - name: project_id__in - schema: - type: array - - in: query - name: state - schema: - type: integer - tags: - - Connections - security: - - BearerAuthentication: [] - deprecated: true - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Defaults' - description: '' /api/v2/accounts/{account_id}/encryptions/: get: operationId: List SSH Tunnels From be6cabfac96a1b0b9dfdd1f8745903eef8a82aa2 Mon Sep 17 00:00:00 2001 From: Mitchell Date: Tue, 30 Apr 2024 11:59:53 -0500 Subject: [PATCH 3/3] remove oauth endpoints that should not be documented --- openapi-v3.yaml | 50 ------------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/openapi-v3.yaml b/openapi-v3.yaml index a79bff4..202ce72 100644 --- a/openapi-v3.yaml +++ b/openapi-v3.yaml @@ -890,56 +890,6 @@ paths: responses: '204': description: No response body - /api/v3/accounts/{account_id}/oauth/authorize/{integration}/: - get: - operationId: Retrieve Oauth Authorize - parameters: - - in: path - name: account_id - schema: - type: integer - required: true - - in: path - name: integration - schema: - type: string - required: true - tags: - - Oauth - security: - - BearerAuthentication: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Defaults' - description: '' - /api/v3/accounts/{account_id}/oauth/callback/{integration}/: - get: - operationId: Retrieve Oauth Callback - parameters: - - in: path - name: account_id - schema: - type: integer - required: true - - in: path - name: integration - schema: - type: string - required: true - tags: - - Oauth - security: - - BearerAuthentication: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Defaults' - description: '' /api/v3/accounts/{account_id}/private-link-endpoints/: get: operationId: List PrivateLink Endpoints