From 92e4815465a071de5117d47a3143233c28b6b038 Mon Sep 17 00:00:00 2001 From: Shalev Avhar Date: Wed, 30 Oct 2024 16:10:33 +0200 Subject: [PATCH 01/17] feat: add /v1/integration/{identifier}/logs 200 --- static/apispec.yaml | 53 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/static/apispec.yaml b/static/apispec.yaml index ab193f3b5..29f4bfb78 100644 --- a/static/apispec.yaml +++ b/static/apispec.yaml @@ -15272,7 +15272,58 @@ paths: - 'read:integrations' responses: '200': - description: Default Response + description: | + Successfully changed the entity. + The response will have the following structure: + + ```json + { + "ok": true, + "count": 1, + "data": [ + { + "message": "Parsing 1 raw results into entities", + "level": "INFO", + "timestamp": "2024-10-30T13:12:15.302Z", + "extra": { + "event_kind": "resync", + "event_trigger_type": "machine", + "event_id": "9a9a5f41-6c64-4073-9b79-491d7d8a9dca", + "kind": "AWS::Organizations::Account", + "resource_kind": "AWS::Organizations::Account" + }, + "id": "672230bd3805557b8ece3097" + } + ] + } + ``` + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyType
`message`string
`level`'INFO' | 'ERROR' | 'WARNING' | 'DEBUG' | 'FATAL'
`timestamp`string
`extra`object
`id`string
'/v1/integration/{identifier}/config': patch: summary: Patch an integration's config From daead9b1e3bd949b4d42e6b4c0e7bf3528c4e62d Mon Sep 17 00:00:00 2001 From: Shalev Avhar Date: Wed, 30 Oct 2024 20:53:45 +0200 Subject: [PATCH 02/17] feat: add /v1/integration/{identifier}/config 200 --- static/apispec.yaml | 170 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 169 insertions(+), 1 deletion(-) diff --git a/static/apispec.yaml b/static/apispec.yaml index 29f4bfb78..a4f86519f 100644 --- a/static/apispec.yaml +++ b/static/apispec.yaml @@ -15449,7 +15449,175 @@ paths: - 'update:integrations' responses: '200': - description: Default Response + description: | + Successfully changed the entity. + The response will have the following structure: + + ```json + { + "ok": true, + "integration": { + "installationId": "my-aws-integration", + "installationAppType": "aws", + "version": "0.2.51", + "changelogDestination": {}, + "installationType": "OnPrem", + "_orgId": "org_BneDtWovPqXaA2VZ", + "_id": "integration_I6ja4Ja7bTvLqT8p", + "identifier": "my-aws-integration", + "integrationType": "aws", + "createdBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", + "updatedBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", + "createdAt": "2024-10-30T13:12:05.632Z", + "updatedAt": "2024-10-30T14:14:23.476Z", + "clientId": "", + "logAttributes": { + "ingestId": "GEmBvfdIAwBtmZfH", + "ingestUrl": "http://localhost:3011/v1/logs/GEmBvfdIAwBtmZfH" + }, + "resyncState": { + "status": "completed", + "lastResyncEnd": "2024-10-30T13:13:03.489204+00:00", + "lastResyncStart": "2024-10-30T13:12:06.413819+00:00", + "nextResync": "2024-10-31T13:12:04.824611+00:00", + "intervalInMinuets": 1440, + "updatedAt": "2024-10-30T13:13:03.496Z" + } + } + } + ``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyType
`installationId`string
`title`string | null
`installationType`InstallationType
`installationAppType`string
`version`string
`config.deleteDependentEntities`boolean
`config.createMissingRelatedEntities`boolean
`config.resources`Array<{ kind: string; selector: { query: string; }; port: { entity: { mappings: MappingSchema | MappingSchema[]; }; }; }>
`changelogDestination.type`'WEBHOOK' | 'KAFKA'
`changelogDestination.agent`boolean | null
`changelogDestination.url`string
`clientId`string
`integrationType`string
`logAttributes.ingestUrl`string
`logAttributes.ingestId`string
`resyncState.status`'running' | 'completed' | 'failed'
`resyncState.lastResyncStart`string
`resyncState.lastResyncEnd`string | null
`resyncState.intervalInMinutes`number | null
`resyncState.nextResync`string | null
`resyncState.updatedAt`string
`_id`string | null
`_orgId`string | null
`spec.integrationSpec`object
`spec.appSpec.scheduledResyncInterval`string | null
`spec.appSpec.sendRawDataExamples`boolean | null
`statusInfo.integrationStatus.status`'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted'
`statusInfo.integrationStatus.lastSyncedAt`string | null
`statusInfo.integrationStatus.message`string | null
`statusInfo.createdAt`string | null
`statusInfo.updatedAt`string | null
+ /v1/integration: get: summary: Get all integrations From 6d8d15eed0867d718df8509b77255104b26e7c4a Mon Sep 17 00:00:00 2001 From: Shalev Avhar Date: Wed, 30 Oct 2024 21:08:44 +0200 Subject: [PATCH 03/17] feat: add /v1/integration get 200 --- static/apispec.yaml | 281 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 276 insertions(+), 5 deletions(-) diff --git a/static/apispec.yaml b/static/apispec.yaml index a4f86519f..e46a87d8f 100644 --- a/static/apispec.yaml +++ b/static/apispec.yaml @@ -15520,10 +15520,6 @@ paths: `config.createMissingRelatedEntities` boolean - - `config.resources` - Array<{ kind: string; selector: { query: string; }; port: { entity: { mappings: MappingSchema | MappingSchema[]; }; }; }> - `changelogDestination.type` 'WEBHOOK' | 'KAFKA' @@ -15629,7 +15625,282 @@ paths: - 'read:integrations' responses: '200': - description: Default Response + description: | + Successfully changed the entity. + The response will have the following structure: + + ```json + { + "ok": true, + "integrations": [ + { + "installationId": "my-aws-integration", + "installationAppType": "aws", + "version": "0.2.51", + "changelogDestination": {}, + "config": { + "deleteDependentEntities": true, + "createMissingRelatedEntities": true, + "enableMergeEntity": true, + "resources": [ + { + "kind": "AWS::Organizations::Account", + "selector": { + "query": "true" + }, + "port": { + "entity": { + "mappings": { + "identifier": ".Id", + "title": ".Name", + "blueprint": "\"awsAccount\"", + "properties": { + "arn": ".Arn", + "email": ".Email", + "status": ".Status", + "joined_method": ".JoinedMethod", + "joined_timestamp": ".JoinedTimestamp" + } + } + } + } + }, + { + "kind": "AWS::S3::Bucket", + "selector": { + "query": "true", + "useGetResourceAPI": true + }, + "port": { + "entity": { + "mappings": { + "identifier": ".Identifier", + "title": ".Identifier", + "blueprint": "\"cloudResource\"", + "properties": { + "kind": ".__Kind", + "region": ".Properties.RegionalDomainName | capture(\".*\\\\.(?[^\\\\.]+)\\\\.amazonaws\\\\.com\") | .region", + "tags": ".Properties.Tags", + "arn": ".Properties.Arn", + "link": ".Properties | select(.Arn != null) | \"https://console.aws.amazon.com/go/view?arn=\" + .Arn" + }, + "relations": { + "account": ".__AccountId" + } + } + } + } + }, + { + "kind": "AWS::EC2::Instance", + "selector": { + "query": "true" + }, + "port": { + "entity": { + "mappings": { + "identifier": ".Identifier", + "title": ".Identifier", + "blueprint": "\"cloudResource\"", + "properties": { + "kind": ".__Kind", + "region": ".__Region", + "tags": ".Properties.Tags", + "arn": ".Properties.Arn", + "link": ".Properties | select(.Arn != null) | \"https://console.aws.amazon.com/go/view?arn=\" + .Arn" + }, + "relations": { + "account": ".__AccountId" + } + } + } + } + }, + { + "kind": "AWS::ECS::Cluster", + "selector": { + "query": "true", + "useGetResourceAPI": true + }, + "port": { + "entity": { + "mappings": { + "identifier": ".Properties.Arn", + "title": ".Identifier", + "blueprint": "\"cloudResource\"", + "properties": { + "kind": ".__Kind", + "region": ".__Region", + "tags": ".Properties.Tags", + "arn": ".Properties.Arn", + "link": ".Properties | select(.Arn != null) | \"https://console.aws.amazon.com/go/view?arn=\" + .Arn" + }, + "relations": { + "account": ".__AccountId" + } + } + } + } + } + ] + }, + "installationType": "OnPrem", + "_orgId": "org_BneDtWovPqXaA2VZ", + "_id": "integration_wJZgALgT6Ui5ixT8", + "identifier": "my-aws-integration", + "integrationType": "aws", + "createdBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", + "updatedBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", + "createdAt": "2024-10-30T18:31:49.640Z", + "updatedAt": "2024-10-30T18:31:50.118Z", + "clientId": "", + "logAttributes": { + "ingestId": "xDb6lcT8uspGgBwm", + "ingestUrl": "http://localhost:3011/v1/logs/xDb6lcT8uspGgBwm" + }, + "resyncState": { + "status": "running", + "lastResyncEnd": null, + "lastResyncStart": "2024-10-30T18:31:50.115099+00:00", + "nextResync": "2024-10-31T18:31:48.758465+00:00", + "intervalInMinuets": 1440, + "updatedAt": "2024-10-30T18:31:50.118Z" + } + } + ] + } + ``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyType
`installationId`string
`title`string | null
`installationType`InstallationType
`installationAppType`string
`version`string
`config.deleteDependentEntities`boolean
`config.createMissingRelatedEntities`boolean
`config.resources`Array<{ kind: string; selector: { query: string; }; port: { entity: { mappings: MappingSchema | MappingSchema[]; }; }; }>
`changelogDestination.type`'WEBHOOK' | 'KAFKA'
`changelogDestination.agent`boolean | null
`changelogDestination.url`string
`clientId`string
`integrationType`string
`logAttributes.ingestUrl`string
`logAttributes.ingestId`string
`resyncState.status`'running' | 'completed' | 'failed'
`resyncState.lastResyncStart`string
`resyncState.lastResyncEnd`string | null
`resyncState.intervalInMinutes`number | null
`resyncState.nextResync`string | null
`resyncState.updatedAt`string
`_id`string | null
`_orgId`string | null
`spec.integrationSpec`object
`spec.appSpec.scheduledResyncInterval`string | null
`spec.appSpec.sendRawDataExamples`boolean | null
`statusInfo.integrationStatus.status`'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted'
`statusInfo.integrationStatus.lastSyncedAt`string | null
`statusInfo.integrationStatus.message`string | null
`statusInfo.createdAt`string | null
`statusInfo.updatedAt`string | null
post: summary: Create an integration description: This route allows you to create an integration in your Port organization.

To learn more about integrations, check out the [documentation](https://docs.getport.io/build-your-software-catalog/sync-data-to-catalog/). From 75bb4c19b549649fe2bbb760265091bf818cb86a Mon Sep 17 00:00:00 2001 From: Shalev Avhar Date: Wed, 30 Oct 2024 21:16:57 +0200 Subject: [PATCH 04/17] feat: add /v1/integration post 200 --- static/apispec.yaml | 177 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 176 insertions(+), 1 deletion(-) diff --git a/static/apispec.yaml b/static/apispec.yaml index e46a87d8f..57282c95e 100644 --- a/static/apispec.yaml +++ b/static/apispec.yaml @@ -16080,7 +16080,182 @@ paths: - 'create:integrations' responses: '200': - description: Default Response + description: | + Successfully changed the entity. + The response will have the following structure: + + ```json + { + "ok": true, + "integration": { + "installationId": "gitlab", + "installationAppType": "gitlab", + "version": "0.1.127", + "installationType": "Saas", + "config": {}, + "_orgId": "org_BneDtWovPqXaA2VZ", + "_id": "integration_ZdsSHyzxSGLaGNUT", + "identifier": "gitlab", + "integrationType": "gitlab", + "changelogDestination": {}, + "createdBy": "auth0|62ceaaa497ea00f09d7c4f41", + "updatedBy": "auth0|62ceaaa497ea00f09d7c4f41", + "createdAt": "2024-10-30T19:14:03.796Z", + "updatedAt": "2024-10-30T19:14:03.796Z", + "clientId": "", + "logAttributes": { + "ingestId": "wCnsemM3Pg5WZSA5", + "ingestUrl": "http://localhost:3011/v1/logs/wCnsemM3Pg5WZSA5" + }, + "spec": { + "integrationSpec": { + "gitlabHost": "https://gitlab.com", + "useSystemHook": false, + "tokenMapping": "_GITLAB_TOKEN_MAPPING", + "tokenGroupHooksOverrideMapping": "_GITLAB_TOKEN_GROUP_HOOKS_OVERRIDE_MAPPING" + }, + "appSpec": { + "scheduledResyncInterval": "1h", + "sendRawDataExamples": true + } + }, + "statusInfo": { + "integrationStatus": { + "status": "Creating" + }, + "createdAt": "2024-10-30T19:14:04.160Z", + "updatedAt": "2024-10-30T19:14:04.160Z" + } + } + } + ``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyType
`installationId`string
`title`string | null
`installationType`InstallationType
`installationAppType`string
`version`string
`config.deleteDependentEntities`boolean
`config.createMissingRelatedEntities`boolean
`changelogDestination.type`'WEBHOOK' | 'KAFKA'
`changelogDestination.agent`boolean | null
`changelogDestination.url`string
`clientId`string
`integrationType`string
`logAttributes.ingestUrl`string
`logAttributes.ingestId`string
`resyncState.status`'running' | 'completed' | 'failed'
`resyncState.lastResyncStart`string
`resyncState.lastResyncEnd`string | null
`resyncState.intervalInMinutes`number | null
`resyncState.nextResync`string | null
`resyncState.updatedAt`string
`_id`string | null
`_orgId`string | null
`spec.integrationSpec`object
`spec.appSpec.scheduledResyncInterval`string | null
`spec.appSpec.sendRawDataExamples`boolean | null
`statusInfo.integrationStatus.status`'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted'
`statusInfo.integrationStatus.lastSyncedAt`string | null
`statusInfo.integrationStatus.message`string | null
`statusInfo.createdAt`string | null
`statusInfo.updatedAt`string | null
'/v1/integration/{identifier}': get: summary: Get an integration From f4fd876cb6a8cf1536fc9f19c9ae580a7520c0c0 Mon Sep 17 00:00:00 2001 From: Shalev Avhar Date: Wed, 30 Oct 2024 21:20:44 +0200 Subject: [PATCH 05/17] feat: add /v1/integration/{identifier} get 200 --- static/apispec.yaml | 168 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 167 insertions(+), 1 deletion(-) diff --git a/static/apispec.yaml b/static/apispec.yaml index 57282c95e..248109064 100644 --- a/static/apispec.yaml +++ b/static/apispec.yaml @@ -16284,7 +16284,173 @@ paths: - 'read:integrations' responses: '200': - description: Default Response + description: | + Successfully changed the entity. + The response will have the following structure: + + ```json + { + "ok": true, + "integration": { + "installationId": "my-aws-integration", + "installationAppType": "aws", + "version": "0.2.51", + "changelogDestination": {}, + "config": { + "additionalProp1": {} + }, + "installationType": "OnPrem", + "_orgId": "org_BneDtWovPqXaA2VZ", + "_id": "integration_wJZgALgT6Ui5ixT8", + "identifier": "my-aws-integration", + "integrationType": "aws", + "createdBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", + "updatedBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", + "createdAt": "2024-10-30T18:31:49.640Z", + "updatedAt": "2024-10-30T18:37:48.884Z", + "clientId": "", + "logAttributes": { + "ingestId": "xDb6lcT8uspGgBwm", + "ingestUrl": "http://localhost:3011/v1/logs/xDb6lcT8uspGgBwm" + }, + "resyncState": { + "status": "completed", + "lastResyncEnd": "2024-10-30T18:37:48.879132+00:00", + "lastResyncStart": "2024-10-30T18:37:47.798319+00:00", + "nextResync": "2024-10-31T18:31:48.758465+00:00", + "intervalInMinuets": 1440, + "updatedAt": "2024-10-30T18:37:48.884Z" + } + } + } + ``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyType
`installationId`string
`title`string | null
`installationType`InstallationType
`installationAppType`string
`version`string
`config.deleteDependentEntities`boolean
`config.createMissingRelatedEntities`boolean
`changelogDestination.type`'WEBHOOK' | 'KAFKA'
`changelogDestination.agent`boolean | null
`changelogDestination.url`string
`clientId`string
`integrationType`string
`logAttributes.ingestUrl`string
`logAttributes.ingestId`string
`resyncState.status`'running' | 'completed' | 'failed'
`resyncState.lastResyncStart`string
`resyncState.lastResyncEnd`string | null
`resyncState.intervalInMinutes`number | null
`resyncState.nextResync`string | null
`resyncState.updatedAt`string
`_id`string | null
`_orgId`string | null
`spec.integrationSpec`object
`spec.appSpec.scheduledResyncInterval`string | null
`spec.appSpec.sendRawDataExamples`boolean | null
`statusInfo.integrationStatus.status`'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted'
`statusInfo.integrationStatus.lastSyncedAt`string | null
`statusInfo.integrationStatus.message`string | null
`statusInfo.createdAt`string | null
`statusInfo.updatedAt`string | null
patch: summary: Patch an integration description: | From 49624ffcbdfa3e2a06de29eaa770a9237d7846c9 Mon Sep 17 00:00:00 2001 From: Shalev Avhar Date: Wed, 30 Oct 2024 21:23:41 +0200 Subject: [PATCH 06/17] feat: add /v1/integration/{identifier} patch 200 --- static/apispec.yaml | 168 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 167 insertions(+), 1 deletion(-) diff --git a/static/apispec.yaml b/static/apispec.yaml index 248109064..cd2c3eb11 100644 --- a/static/apispec.yaml +++ b/static/apispec.yaml @@ -16626,7 +16626,173 @@ paths: - 'update:integrations' responses: '200': - description: Default Response + description: | + Successfully changed the entity. + The response will have the following structure: + + ```json + { + "ok": true, + "integration": { + "installationId": "my-aws-integration", + "installationAppType": "aws", + "version": "0.2.51", + "changelogDestination": {}, + "config": { + "additionalProp1": {} + }, + "installationType": "OnPrem", + "_orgId": "org_BneDtWovPqXaA2VZ", + "_id": "integration_wJZgALgT6Ui5ixT8", + "identifier": "my-aws-integration", + "integrationType": "aws", + "createdBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", + "updatedBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", + "createdAt": "2024-10-30T18:31:49.640Z", + "updatedAt": "2024-10-30T18:37:48.884Z", + "clientId": "", + "logAttributes": { + "ingestId": "xDb6lcT8uspGgBwm", + "ingestUrl": "http://localhost:3011/v1/logs/xDb6lcT8uspGgBwm" + }, + "resyncState": { + "status": "completed", + "lastResyncEnd": "2024-10-30T18:37:48.879132+00:00", + "lastResyncStart": "2024-10-30T18:37:47.798319+00:00", + "nextResync": "2024-10-31T18:31:48.758465+00:00", + "intervalInMinuets": 1440, + "updatedAt": "2024-10-30T18:37:48.884Z" + } + } + } + ``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyType
`installationId`string
`title`string | null
`installationType`InstallationType
`installationAppType`string
`version`string
`config.deleteDependentEntities`boolean
`config.createMissingRelatedEntities`boolean
`changelogDestination.type`'WEBHOOK' | 'KAFKA'
`changelogDestination.agent`boolean | null
`changelogDestination.url`string
`clientId`string
`integrationType`string
`logAttributes.ingestUrl`string
`logAttributes.ingestId`string
`resyncState.status`'running' | 'completed' | 'failed'
`resyncState.lastResyncStart`string
`resyncState.lastResyncEnd`string | null
`resyncState.intervalInMinutes`number | null
`resyncState.nextResync`string | null
`resyncState.updatedAt`string
`_id`string | null
`_orgId`string | null
`spec.integrationSpec`object
`spec.appSpec.scheduledResyncInterval`string | null
`spec.appSpec.sendRawDataExamples`boolean | null
`statusInfo.integrationStatus.status`'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted'
`statusInfo.integrationStatus.lastSyncedAt`string | null
`statusInfo.integrationStatus.message`string | null
`statusInfo.createdAt`string | null
`statusInfo.updatedAt`string | null
delete: summary: Delete an integration description: This route allows you to delete an integration in your Port organization.

To learn more about integrations, check out the [documentation](https://docs.getport.io/build-your-software-catalog/sync-data-to-catalog/). From e0466f3c623ae09add7e37c9693ef079e4a0ef0c Mon Sep 17 00:00:00 2001 From: Shalev Avhar Date: Wed, 30 Oct 2024 21:26:20 +0200 Subject: [PATCH 07/17] feat: add /v1/integration/{identifier} delete 200 --- static/apispec.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/static/apispec.yaml b/static/apispec.yaml index cd2c3eb11..74c61d062 100644 --- a/static/apispec.yaml +++ b/static/apispec.yaml @@ -16810,7 +16810,15 @@ paths: - 'delete:integrations' responses: '200': - description: Default Response + description: | + Successfully changed the entity. + The response will have the following structure: + + ```json + { + "ok": true, + } + ``` /v1/webhooks: post: summary: Create a webhook From df0074049498725eb6a2d7067def556a98829725 Mon Sep 17 00:00:00 2001 From: Shalev Avhar Date: Wed, 30 Oct 2024 22:57:19 +0200 Subject: [PATCH 08/17] feat: add /v1/webhook post 201 --- static/apispec.yaml | 177 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 175 insertions(+), 2 deletions(-) diff --git a/static/apispec.yaml b/static/apispec.yaml index 74c61d062..374f2bc6a 100644 --- a/static/apispec.yaml +++ b/static/apispec.yaml @@ -16931,8 +16931,181 @@ paths: - bearer: - 'create:integrations' responses: - '200': - description: Default Response + '201': + description: | + Successfully changed the entity. + The response will have the following structure: + + ```json + { + "ok": true, + "integration": { + "webhookKey": "ROabu3sT0tz2PbkP", + "identifier": "asdasdasd", + "title": "asdasdasd", + "icon": "Airflow", + "description": "asdasdasd", + "enabled": true, + "security": {}, + "createdBy": "auth0|62ceaaa497ea00f09d7c4f41", + "updatedBy": "auth0|62ceaaa497ea00f09d7c4f41", + "updatedAt": "2024-10-30T19:29:26.025Z", + "integrationType": "custom", + "_id": "67228916fd43f40783d855ed", + "mappings": [], + "createdAt": "2024-10-30T19:29:26.046Z", + "url": "http://localhost:3007/v1/trigger/ROabu3sT0tz2PbkP", + "events": [] + } + } + ``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyType
`identifier`string
`title`string
`icon`string | null
`description`string | null
`mappings`IntegrationMapping[] | null
`enabled`boolean
`integrationType`'custom' | 'template' | null
`createdBy`string
`updatedBy`string
`createdAt`string
`updatedAt`string
`security.signatureHeaderName`string | null
`security.signatureAlgorithm`string | null
`security.signaturePrefix`string | null
`security.requestIdentifierPath`string | null
`events.identifier`string
`events.webhookKey`string
`events.integrationId`string
`events.timestamp`string
`events.status`'Success' | 'Failure'
`events.reason`string | null
`events.idempotencyKey`string | null
`events.payload.body`object | null
`events.payload.headers`object | null
`events.payload.queryParams`object | null
`events.result.identifier`string | null
`events.result.title`string | null
`events.result.team`string[] | null
`events.result.icon`string | null
`events.result.properties`object
`events.result.relations`object | null
`events.result.blueprint`string
`events.result.operation`'create' | { type: 'create' } | 'delete' | { type: 'delete'; deleteDependents?: boolean }
`url`string
`_id`string
get: summary: Get all webhooks description: This route allows you to fetch all webhooks configured in your Port organization. You can also see them in the [data sources page](https://app.getport.io/settings/data-sources) of your Port account.

To learn more about webhooks, check out the [documentation](https://docs.getport.io/build-your-software-catalog/custom-integration/webhook/). From 77419484a92f0646ab0e5b7e9838796ed268905e Mon Sep 17 00:00:00 2001 From: Shalev Avhar Date: Wed, 30 Oct 2024 22:59:23 +0200 Subject: [PATCH 09/17] feat: add /v1/webhooks get 200 --- static/apispec.yaml | 177 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 176 insertions(+), 1 deletion(-) diff --git a/static/apispec.yaml b/static/apispec.yaml index 374f2bc6a..afeb626be 100644 --- a/static/apispec.yaml +++ b/static/apispec.yaml @@ -17116,7 +17116,182 @@ paths: - 'read:integrations' responses: '200': - description: Default Response + description: | + Successfully changed the entity. + The response will have the following structure: + + ```json + { + "ok": true, + "integrations": [ + { + "_id": "67228916fd43f40783d855ed", + "webhookKey": "ROabu3sT0tz2PbkP", + "orgId": "org_BneDtWovPqXaA2VZ", + "identifier": "asdasdasd", + "title": "asdasdasd", + "icon": "Airflow", + "description": "asdasdasd", + "enabled": true, + "security": {}, + "createdBy": "auth0|62ceaaa497ea00f09d7c4f41", + "updatedBy": "auth0|62ceaaa497ea00f09d7c4f41", + "updatedAt": "2024-10-30T19:29:26.025Z", + "integrationType": "custom", + "mappings": [], + "createdAt": "2024-10-30T19:29:26.046Z", + "url": "http://localhost:3007/v1/trigger/ROabu3sT0tz2PbkP" + } + ] + } + ``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyType
`identifier`string
`title`string
`icon`string | null
`description`string | null
`mappings`IntegrationMapping[] | null
`enabled`boolean
`integrationType`'custom' | 'template' | null
`createdBy`string
`updatedBy`string
`createdAt`string
`updatedAt`string
`security.signatureHeaderName`string | null
`security.signatureAlgorithm`string | null
`security.signaturePrefix`string | null
`security.requestIdentifierPath`string | null
`events.identifier`string
`events.webhookKey`string
`events.integrationId`string
`events.timestamp`string
`events.status`'Success' | 'Failure'
`events.reason`string | null
`events.idempotencyKey`string | null
`events.payload.body`object | null
`events.payload.headers`object | null
`events.payload.queryParams`object | null
`events.result.identifier`string | null
`events.result.title`string | null
`events.result.team`string[] | null
`events.result.icon`string | null
`events.result.properties`object
`events.result.relations`object | null
`events.result.blueprint`string
`events.result.operation`'create' | { type: 'create' } | 'delete' | { type: 'delete'; deleteDependents?: boolean }
`url`string
`_id`string
'/v1/webhooks/{identifier}': patch: summary: Patch a webhook From 6bbc9f58e8a1cbd521b3d46fdf8a6a025fd5ddb3 Mon Sep 17 00:00:00 2001 From: Shalev Avhar Date: Wed, 30 Oct 2024 23:09:55 +0200 Subject: [PATCH 10/17] feat: add rest of webhook --- static/apispec.yaml | 360 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 357 insertions(+), 3 deletions(-) diff --git a/static/apispec.yaml b/static/apispec.yaml index afeb626be..d9608a2a4 100644 --- a/static/apispec.yaml +++ b/static/apispec.yaml @@ -17408,7 +17408,180 @@ paths: - 'update:integrations' responses: '200': - description: Default Response + description: | + Successfully changed the entity. + The response will have the following structure: + + ```json + { + "ok": true, + "integration": { + "_id": "67228916fd43f40783d855ed", + "webhookKey": "ROabu3sT0tz2PbkP", + "identifier": "asdasdasd", + "title": "asdasdasd", + "icon": "Airflow", + "description": "asdasdasd", + "enabled": true, + "security": {}, + "createdBy": "auth0|62ceaaa497ea00f09d7c4f41", + "updatedBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", + "updatedAt": "2024-10-30T21:04:24.202Z", + "integrationType": "custom", + "mappings": [], + "createdAt": "2024-10-30T19:29:26.046Z", + "url": "http://localhost:3007/v1/trigger/ROabu3sT0tz2PbkP", + "events": [] + } + } + ``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyType
`identifier`string
`title`string
`icon`string | null
`description`string | null
`mappings`IntegrationMapping[] | null
`enabled`boolean
`integrationType`'custom' | 'template' | null
`createdBy`string
`updatedBy`string
`createdAt`string
`updatedAt`string
`security.signatureHeaderName`string | null
`security.signatureAlgorithm`string | null
`security.signaturePrefix`string | null
`security.requestIdentifierPath`string | null
`events.identifier`string
`events.webhookKey`string
`events.integrationId`string
`events.timestamp`string
`events.status`'Success' | 'Failure'
`events.reason`string | null
`events.idempotencyKey`string | null
`events.payload.body`object | null
`events.payload.headers`object | null
`events.payload.queryParams`object | null
`events.result.identifier`string | null
`events.result.title`string | null
`events.result.team`string[] | null
`events.result.icon`string | null
`events.result.properties`object
`events.result.relations`object | null
`events.result.blueprint`string
`events.result.operation`'create' | { type: 'create' } | 'delete' | { type: 'delete'; deleteDependents?: boolean }
`url`string
`_id`string
put: summary: Change a webhook description: This route allows you to modify a webhook in your Port organization. You can also modify it via the [data sources page](https://app.getport.io/settings/data-sources) of your Port account.

To learn more about webhooks, check out the [documentation](https://docs.getport.io/build-your-software-catalog/custom-integration/webhook/). @@ -17528,7 +17701,180 @@ paths: - 'update:integrations' responses: '200': - description: Default Response + description: | + Successfully changed the entity. + The response will have the following structure: + + ```json + { + "ok": true, + "integration": { + "_id": "67228916fd43f40783d855ed", + "webhookKey": "ROabu3sT0tz2PbkP", + "identifier": "asdasdasd", + "title": "asdasdasd", + "icon": "Airflow", + "description": "asdasdasd", + "enabled": true, + "security": {}, + "createdBy": "auth0|62ceaaa497ea00f09d7c4f41", + "updatedBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", + "updatedAt": "2024-10-30T21:07:07.640Z", + "integrationType": "custom", + "mappings": [], + "createdAt": "2024-10-30T19:29:26.046Z", + "url": "http://localhost:3007/v1/trigger/ROabu3sT0tz2PbkP", + "events": [] + } + } + ``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyType
`identifier`string
`title`string
`icon`string | null
`description`string | null
`mappings`IntegrationMapping[] | null
`enabled`boolean
`integrationType`'custom' | 'template' | null
`createdBy`string
`updatedBy`string
`createdAt`string
`updatedAt`string
`security.signatureHeaderName`string | null
`security.signatureAlgorithm`string | null
`security.signaturePrefix`string | null
`security.requestIdentifierPath`string | null
`events.identifier`string
`events.webhookKey`string
`events.integrationId`string
`events.timestamp`string
`events.status`'Success' | 'Failure'
`events.reason`string | null
`events.idempotencyKey`string | null
`events.payload.body`object | null
`events.payload.headers`object | null
`events.payload.queryParams`object | null
`events.result.identifier`string | null
`events.result.title`string | null
`events.result.team`string[] | null
`events.result.icon`string | null
`events.result.properties`object
`events.result.relations`object | null
`events.result.blueprint`string
`events.result.operation`'create' | { type: 'create' } | 'delete' | { type: 'delete'; deleteDependents?: boolean }
`url`string
`_id`string
get: summary: Get a webhook description: This route allows you to fetch a specific webhook in your Port organization. You can also see it in the [data sources page](https://app.getport.io/settings/data-sources) of your Port account.

To learn more about webhooks, check out the [documentation](https://docs.getport.io/build-your-software-catalog/custom-integration/webhook/). @@ -17564,7 +17910,15 @@ paths: - 'delete:integrations' responses: '200': - description: Default Response + description: | + Successfully changed the entity. + The response will have the following structure: + + ```json + { + "ok": true + } + ``` /v1/migrations: get: summary: Get all migrations From 4d8ef5c58e864ea5d194d6fc727c9cfc0dfb5d91 Mon Sep 17 00:00:00 2001 From: Shalev Avhar Date: Sun, 3 Nov 2024 09:23:27 +0200 Subject: [PATCH 11/17] feat: patch integration table --- static/apispec.yaml | 181 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 179 insertions(+), 2 deletions(-) diff --git a/static/apispec.yaml b/static/apispec.yaml index d9608a2a4..c765d5a58 100644 --- a/static/apispec.yaml +++ b/static/apispec.yaml @@ -15520,6 +15520,42 @@ paths: `config.createMissingRelatedEntities` boolean + + `config.resources.kind` + string + + + `config.resources.selector.query` + string + + + `config.resources.port.entity.mappings.identifier` + string | object + + + `config.resources.port.entity.mappings.identifier.combinator` + string + + + `config.resources.port.entity.mappings.identifier.rules` + object + + + `config.resources.port.entity.mappings.title` + string + + + `config.resources.port.entity.mappings.blueprint` + string + + + `config.resources.port.entity.mappings.properties` + object + + + `config.resources.port.entity.mappings.relations` + object + `changelogDestination.type` 'WEBHOOK' | 'KAFKA' @@ -15805,8 +15841,40 @@ paths: boolean - `config.resources` - Array<{ kind: string; selector: { query: string; }; port: { entity: { mappings: MappingSchema | MappingSchema[]; }; }; }> + `config.resources.kind` + string + + + `config.resources.selector.query` + string + + + `config.resources.port.entity.mappings.identifier` + string | object + + + `config.resources.port.entity.mappings.identifier.combinator` + string + + + `config.resources.port.entity.mappings.identifier.rules` + object + + + `config.resources.port.entity.mappings.title` + string + + + `config.resources.port.entity.mappings.blueprint` + string + + + `config.resources.port.entity.mappings.properties` + object + + + `config.resources.port.entity.mappings.relations` + object `changelogDestination.type` @@ -16163,6 +16231,42 @@ paths: `config.createMissingRelatedEntities` boolean + + `config.resources.kind` + string + + + `config.resources.selector.query` + string + + + `config.resources.port.entity.mappings.identifier` + string | object + + + `config.resources.port.entity.mappings.identifier.combinator` + string + + + `config.resources.port.entity.mappings.identifier.rules` + object + + + `config.resources.port.entity.mappings.title` + string + + + `config.resources.port.entity.mappings.blueprint` + string + + + `config.resources.port.entity.mappings.properties` + object + + + `config.resources.port.entity.mappings.relations` + object + `changelogDestination.type` 'WEBHOOK' | 'KAFKA' @@ -16256,6 +16360,7 @@ paths: string | null + '/v1/integration/{identifier}': get: summary: Get an integration @@ -16358,6 +16463,42 @@ paths: `config.createMissingRelatedEntities` boolean + + `config.resources.kind` + string + + + `config.resources.selector.query` + string + + + `config.resources.port.entity.mappings.identifier` + string | object + + + `config.resources.port.entity.mappings.identifier.combinator` + string + + + `config.resources.port.entity.mappings.identifier.rules` + object + + + `config.resources.port.entity.mappings.title` + string + + + `config.resources.port.entity.mappings.blueprint` + string + + + `config.resources.port.entity.mappings.properties` + object + + + `config.resources.port.entity.mappings.relations` + object + `changelogDestination.type` 'WEBHOOK' | 'KAFKA' @@ -16700,6 +16841,42 @@ paths: `config.createMissingRelatedEntities` boolean + + `config.resources.kind` + string + + + `config.resources.selector.query` + string + + + `config.resources.port.entity.mappings.identifier` + string | object + + + `config.resources.port.entity.mappings.identifier.combinator` + string + + + `config.resources.port.entity.mappings.identifier.rules` + object + + + `config.resources.port.entity.mappings.title` + string + + + `config.resources.port.entity.mappings.blueprint` + string + + + `config.resources.port.entity.mappings.properties` + object + + + `config.resources.port.entity.mappings.relations` + object + `changelogDestination.type` 'WEBHOOK' | 'KAFKA' From d3e0bddc6171422f3669e7141df298deca8d2281 Mon Sep 17 00:00:00 2001 From: Shalev Avhar Date: Sun, 3 Nov 2024 09:48:55 +0200 Subject: [PATCH 12/17] feat: replace integration jsons to type instead of example --- static/apispec.yaml | 515 ++++++++++++++++++++++---------------------- 1 file changed, 255 insertions(+), 260 deletions(-) diff --git a/static/apispec.yaml b/static/apispec.yaml index c765d5a58..25067d5f6 100644 --- a/static/apispec.yaml +++ b/static/apispec.yaml @@ -15282,17 +15282,11 @@ paths: "count": 1, "data": [ { - "message": "Parsing 1 raw results into entities", - "level": "INFO", - "timestamp": "2024-10-30T13:12:15.302Z", - "extra": { - "event_kind": "resync", - "event_trigger_type": "machine", - "event_id": "9a9a5f41-6c64-4073-9b79-491d7d8a9dca", - "kind": "AWS::Organizations::Account", - "resource_kind": "AWS::Organizations::Account" - }, - "id": "672230bd3805557b8ece3097" + "message": string, + "level": 'INFO' | 'ERROR' | 'WARNING' | 'DEBUG' | 'FATAL', + "timestamp": string, + "extra": object, + "id": string } ] } @@ -15456,34 +15450,59 @@ paths: ```json { "ok": true, - "integration": { - "installationId": "my-aws-integration", - "installationAppType": "aws", - "version": "0.2.51", - "changelogDestination": {}, - "installationType": "OnPrem", - "_orgId": "org_BneDtWovPqXaA2VZ", - "_id": "integration_I6ja4Ja7bTvLqT8p", - "identifier": "my-aws-integration", - "integrationType": "aws", - "createdBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", - "updatedBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", - "createdAt": "2024-10-30T13:12:05.632Z", - "updatedAt": "2024-10-30T14:14:23.476Z", - "clientId": "", - "logAttributes": { - "ingestId": "GEmBvfdIAwBtmZfH", - "ingestUrl": "http://localhost:3011/v1/logs/GEmBvfdIAwBtmZfH" - }, - "resyncState": { - "status": "completed", - "lastResyncEnd": "2024-10-30T13:13:03.489204+00:00", - "lastResyncStart": "2024-10-30T13:12:06.413819+00:00", - "nextResync": "2024-10-31T13:12:04.824611+00:00", - "intervalInMinuets": 1440, - "updatedAt": "2024-10-30T13:13:03.496Z" + "integration": { + "installationId": string, + "title"?: string | null, + "installationType": 'Saas' | 'OnPrem', + "installationAppType": string, + "version": string, + "config": { + "deleteDependentEntities": boolean, + "createMissingRelatedEntities": boolean, + "resources": object[] | null, + "changelogDestination": + | { + "type": 'WEBHOOK', + "agent"?: boolean, + "url": string, + } + | { + "type": 'KAFKA', + }, + "clientId": string, + "integrationType": string, + "logAttributes": { + "ingestUrl": string, + "ingestId": string, + }, + "resyncState"?: { + "status": 'running' | 'completed' | 'failed', + "lastResyncStart": string, + "lastResyncEnd": string | null, + "intervalInMinutes": number | null, + "nextResync": string | null, + "updatedAt": string, + }, + "_id"?: string, + "_orgId"?: string, + + "spec"?: { + "integrationSpec": Record, + "appSpec"?: { + "scheduledResyncInterval"?: string, + "sendRawDataExamples"?: boolean, + }, + }, + "statusInfo"?: { + "integrationStatus": { + "status": 'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted', + "lastSyncedAt"?: string, + "message"?: string, + }, + "createdAt"?: string, + "updatedAt"?: string, + }, } - } } ``` @@ -15670,138 +15689,57 @@ paths: "ok": true, "integrations": [ { - "installationId": "my-aws-integration", - "installationAppType": "aws", - "version": "0.2.51", - "changelogDestination": {}, + "installationId": string, + "title"?: string | null, + "installationType": 'Saas' | 'OnPrem', + "installationAppType": string, + "version": string, "config": { - "deleteDependentEntities": true, - "createMissingRelatedEntities": true, - "enableMergeEntity": true, - "resources": [ - { - "kind": "AWS::Organizations::Account", - "selector": { - "query": "true" - }, - "port": { - "entity": { - "mappings": { - "identifier": ".Id", - "title": ".Name", - "blueprint": "\"awsAccount\"", - "properties": { - "arn": ".Arn", - "email": ".Email", - "status": ".Status", - "joined_method": ".JoinedMethod", - "joined_timestamp": ".JoinedTimestamp" - } - } - } - } - }, - { - "kind": "AWS::S3::Bucket", - "selector": { - "query": "true", - "useGetResourceAPI": true - }, - "port": { - "entity": { - "mappings": { - "identifier": ".Identifier", - "title": ".Identifier", - "blueprint": "\"cloudResource\"", - "properties": { - "kind": ".__Kind", - "region": ".Properties.RegionalDomainName | capture(\".*\\\\.(?[^\\\\.]+)\\\\.amazonaws\\\\.com\") | .region", - "tags": ".Properties.Tags", - "arn": ".Properties.Arn", - "link": ".Properties | select(.Arn != null) | \"https://console.aws.amazon.com/go/view?arn=\" + .Arn" - }, - "relations": { - "account": ".__AccountId" - } - } - } - } - }, - { - "kind": "AWS::EC2::Instance", - "selector": { - "query": "true" - }, - "port": { - "entity": { - "mappings": { - "identifier": ".Identifier", - "title": ".Identifier", - "blueprint": "\"cloudResource\"", - "properties": { - "kind": ".__Kind", - "region": ".__Region", - "tags": ".Properties.Tags", - "arn": ".Properties.Arn", - "link": ".Properties | select(.Arn != null) | \"https://console.aws.amazon.com/go/view?arn=\" + .Arn" - }, - "relations": { - "account": ".__AccountId" - } - } - } - } - }, - { - "kind": "AWS::ECS::Cluster", - "selector": { - "query": "true", - "useGetResourceAPI": true - }, - "port": { - "entity": { - "mappings": { - "identifier": ".Properties.Arn", - "title": ".Identifier", - "blueprint": "\"cloudResource\"", - "properties": { - "kind": ".__Kind", - "region": ".__Region", - "tags": ".Properties.Tags", - "arn": ".Properties.Arn", - "link": ".Properties | select(.Arn != null) | \"https://console.aws.amazon.com/go/view?arn=\" + .Arn" - }, - "relations": { - "account": ".__AccountId" - } - } - } - } + "deleteDependentEntities": boolean, + "createMissingRelatedEntities": boolean, + "resources": object[] | null, + "changelogDestination": + | { + "type": 'WEBHOOK', + "agent"?: boolean, + "url": string, } - ] - }, - "installationType": "OnPrem", - "_orgId": "org_BneDtWovPqXaA2VZ", - "_id": "integration_wJZgALgT6Ui5ixT8", - "identifier": "my-aws-integration", - "integrationType": "aws", - "createdBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", - "updatedBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", - "createdAt": "2024-10-30T18:31:49.640Z", - "updatedAt": "2024-10-30T18:31:50.118Z", - "clientId": "", + | { + "type": 'KAFKA', + }, + "clientId": string, + "integrationType": string, "logAttributes": { - "ingestId": "xDb6lcT8uspGgBwm", - "ingestUrl": "http://localhost:3011/v1/logs/xDb6lcT8uspGgBwm" + "ingestUrl": string, + "ingestId": string, + }, + "resyncState"?: { + "status": 'running' | 'completed' | 'failed', + "lastResyncStart": string, + "lastResyncEnd": string | null, + "intervalInMinutes": number | null, + "nextResync": string | null, + "updatedAt": string, + }, + "_id"?: string, + "_orgId"?: string, + + "spec"?: { + "integrationSpec": Record, + "appSpec"?: { + "scheduledResyncInterval"?: string, + "sendRawDataExamples"?: boolean, + }, + }, + "statusInfo"?: { + "integrationStatus": { + "status": 'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted', + "lastSyncedAt"?: string, + "message"?: string, + }, + "createdAt"?: string, + "updatedAt"?: string, }, - "resyncState": { - "status": "running", - "lastResyncEnd": null, - "lastResyncStart": "2024-10-30T18:31:50.115099+00:00", - "nextResync": "2024-10-31T18:31:48.758465+00:00", - "intervalInMinuets": 1440, - "updatedAt": "2024-10-30T18:31:50.118Z" - } } ] } @@ -16156,44 +16094,57 @@ paths: { "ok": true, "integration": { - "installationId": "gitlab", - "installationAppType": "gitlab", - "version": "0.1.127", - "installationType": "Saas", - "config": {}, - "_orgId": "org_BneDtWovPqXaA2VZ", - "_id": "integration_ZdsSHyzxSGLaGNUT", - "identifier": "gitlab", - "integrationType": "gitlab", - "changelogDestination": {}, - "createdBy": "auth0|62ceaaa497ea00f09d7c4f41", - "updatedBy": "auth0|62ceaaa497ea00f09d7c4f41", - "createdAt": "2024-10-30T19:14:03.796Z", - "updatedAt": "2024-10-30T19:14:03.796Z", - "clientId": "", - "logAttributes": { - "ingestId": "wCnsemM3Pg5WZSA5", - "ingestUrl": "http://localhost:3011/v1/logs/wCnsemM3Pg5WZSA5" + "installationId": string, + "title"?: string | null, + "installationType": 'Saas' | 'OnPrem', + "installationAppType": string, + "version": string, + "config": { + "deleteDependentEntities": boolean, + "createMissingRelatedEntities": boolean, + "resources": object[] | null, + "changelogDestination": + | { + "type": 'WEBHOOK', + "agent"?: boolean, + "url": string, + } + | { + "type": 'KAFKA', + }, + "clientId": string, + "integrationType": string, + "logAttributes": { + "ingestUrl": string, + "ingestId": string, + }, + "resyncState"?: { + "status": 'running' | 'completed' | 'failed', + "lastResyncStart": string, + "lastResyncEnd": string | null, + "intervalInMinutes": number | null, + "nextResync": string | null, + "updatedAt": string, + }, + "_id"?: string, + "_orgId"?: string, + + "spec"?: { + "integrationSpec": Record, + "appSpec"?: { + "scheduledResyncInterval"?: string, + "sendRawDataExamples"?: boolean, }, - "spec": { - "integrationSpec": { - "gitlabHost": "https://gitlab.com", - "useSystemHook": false, - "tokenMapping": "_GITLAB_TOKEN_MAPPING", - "tokenGroupHooksOverrideMapping": "_GITLAB_TOKEN_GROUP_HOOKS_OVERRIDE_MAPPING" - }, - "appSpec": { - "scheduledResyncInterval": "1h", - "sendRawDataExamples": true - } + }, + "statusInfo"?: { + "integrationStatus": { + "status": 'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted', + "lastSyncedAt"?: string, + "message"?: string, }, - "statusInfo": { - "integrationStatus": { - "status": "Creating" - }, - "createdAt": "2024-10-30T19:14:04.160Z", - "updatedAt": "2024-10-30T19:14:04.160Z" - } + "createdAt"?: string, + "updatedAt"?: string, + }, } } ``` @@ -16397,36 +16348,58 @@ paths: { "ok": true, "integration": { - "installationId": "my-aws-integration", - "installationAppType": "aws", - "version": "0.2.51", - "changelogDestination": {}, - "config": { - "additionalProp1": {} - }, - "installationType": "OnPrem", - "_orgId": "org_BneDtWovPqXaA2VZ", - "_id": "integration_wJZgALgT6Ui5ixT8", - "identifier": "my-aws-integration", - "integrationType": "aws", - "createdBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", - "updatedBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", - "createdAt": "2024-10-30T18:31:49.640Z", - "updatedAt": "2024-10-30T18:37:48.884Z", - "clientId": "", - "logAttributes": { - "ingestId": "xDb6lcT8uspGgBwm", - "ingestUrl": "http://localhost:3011/v1/logs/xDb6lcT8uspGgBwm" - }, - "resyncState": { - "status": "completed", - "lastResyncEnd": "2024-10-30T18:37:48.879132+00:00", - "lastResyncStart": "2024-10-30T18:37:47.798319+00:00", - "nextResync": "2024-10-31T18:31:48.758465+00:00", - "intervalInMinuets": 1440, - "updatedAt": "2024-10-30T18:37:48.884Z" + "installationId": string, + "title"?: string | null, + "installationType": 'Saas' | 'OnPrem', + "installationAppType": string, + "version": string, + "config": { + "deleteDependentEntities": boolean, + "createMissingRelatedEntities": boolean, + "resources": object[] | null, + "changelogDestination": + | { + "type": 'WEBHOOK', + "agent"?: boolean, + "url": string, + } + | { + "type": 'KAFKA', + }, + "clientId": string, + "integrationType": string, + "logAttributes": { + "ingestUrl": string, + "ingestId": string, + }, + "resyncState"?: { + "status": 'running' | 'completed' | 'failed', + "lastResyncStart": string, + "lastResyncEnd": string | null, + "intervalInMinutes": number | null, + "nextResync": string | null, + "updatedAt": string, + }, + "_id"?: string, + "_orgId"?: string, + + "spec"?: { + "integrationSpec": Record, + "appSpec"?: { + "scheduledResyncInterval"?: string, + "sendRawDataExamples"?: boolean, + }, + }, + "statusInfo"?: { + "integrationStatus": { + "status": 'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted', + "lastSyncedAt"?: string, + "message"?: string, + }, + "createdAt"?: string, + "updatedAt"?: string, + }, } - } } ``` @@ -16775,36 +16748,58 @@ paths: { "ok": true, "integration": { - "installationId": "my-aws-integration", - "installationAppType": "aws", - "version": "0.2.51", - "changelogDestination": {}, - "config": { - "additionalProp1": {} - }, - "installationType": "OnPrem", - "_orgId": "org_BneDtWovPqXaA2VZ", - "_id": "integration_wJZgALgT6Ui5ixT8", - "identifier": "my-aws-integration", - "integrationType": "aws", - "createdBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", - "updatedBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", - "createdAt": "2024-10-30T18:31:49.640Z", - "updatedAt": "2024-10-30T18:37:48.884Z", - "clientId": "", - "logAttributes": { - "ingestId": "xDb6lcT8uspGgBwm", - "ingestUrl": "http://localhost:3011/v1/logs/xDb6lcT8uspGgBwm" - }, - "resyncState": { - "status": "completed", - "lastResyncEnd": "2024-10-30T18:37:48.879132+00:00", - "lastResyncStart": "2024-10-30T18:37:47.798319+00:00", - "nextResync": "2024-10-31T18:31:48.758465+00:00", - "intervalInMinuets": 1440, - "updatedAt": "2024-10-30T18:37:48.884Z" + "installationId": string, + "title"?: string | null, + "installationType": 'Saas' | 'OnPrem', + "installationAppType": string, + "version": string, + "config": { + "deleteDependentEntities": boolean, + "createMissingRelatedEntities": boolean, + "resources": object[] | null, + "changelogDestination": + | { + "type": 'WEBHOOK', + "agent"?: boolean, + "url": string, + } + | { + "type": 'KAFKA', + }, + "clientId": string, + "integrationType": string, + "logAttributes": { + "ingestUrl": string, + "ingestId": string, + }, + "resyncState"?: { + "status": 'running' | 'completed' | 'failed', + "lastResyncStart": string, + "lastResyncEnd": string | null, + "intervalInMinutes": number | null, + "nextResync": string | null, + "updatedAt": string, + }, + "_id"?: string, + "_orgId"?: string, + + "spec"?: { + "integrationSpec": Record, + "appSpec"?: { + "scheduledResyncInterval"?: string, + "sendRawDataExamples"?: boolean, + }, + }, + "statusInfo"?: { + "integrationStatus": { + "status": 'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted', + "lastSyncedAt"?: string, + "message"?: string, + }, + "createdAt"?: string, + "updatedAt"?: string, + }, } - } } ``` From 8ddc0c55448cd366cf239b40bcec7035c15d9650 Mon Sep 17 00:00:00 2001 From: Shalev Avhar Date: Sun, 3 Nov 2024 10:32:18 +0200 Subject: [PATCH 13/17] feat: add webhook type tables --- static/apispec.yaml | 455 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 444 insertions(+), 11 deletions(-) diff --git a/static/apispec.yaml b/static/apispec.yaml index 25067d5f6..52575c107 100644 --- a/static/apispec.yaml +++ b/static/apispec.yaml @@ -17154,8 +17154,60 @@ paths: string | null - `mappings` - IntegrationMapping[] | null + `mappings.blueprint` + string + + + `mappings.operation` + 'create' | 'delete' + + + `mappings.operation.type` + 'create' | 'delete' | object + + + `mappings.operation.deleteDependents` + boolean | null + + + `mappings.filter` + string | null + + + `mappings.itemsToParse` + string | null + + + `mappings.entity.identifier` + string | object + + + `mappings.entity.identifier.combinator` + string + + + `mappings.entity.identifier.rules` + object[] + + + `mappings.entity.title` + string | null + + + `mappings.entity.icon` + string | null + + + `mappings.entity.team` + string | null + + + `mappings.entity.properties` + object + + + `mappings.entity.relations` + object[] `enabled` @@ -17317,7 +17369,7 @@ paths: ] } ``` - + @@ -17340,8 +17392,60 @@ paths: - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -17607,7 +17711,7 @@ paths: } } ``` - +
Keystring | null
`mappings`IntegrationMapping[] | null`mappings.blueprint`string
`mappings.operation`'create' | 'delete'
`mappings.operation.type`'create' | 'delete' | object
`mappings.operation.deleteDependents`boolean | null
`mappings.filter`string | null
`mappings.itemsToParse`string | null
`mappings.entity.identifier`string | object
`mappings.entity.identifier.combinator`string
`mappings.entity.identifier.rules`object[]
`mappings.entity.title`string | null
`mappings.entity.icon`string | null
`mappings.entity.team`string | null
`mappings.entity.properties`object
`mappings.entity.relations`object[]
`enabled`
@@ -17630,8 +17734,60 @@ paths: - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -17923,8 +18079,60 @@ paths: - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -18064,7 +18272,232 @@ paths: - 'read:integrations' responses: '200': - description: Default Response + description: | + Successfully changed the entity. + The response will have the following structure: + + ```json + { + "ok": true, + "integration": { + "_id": "67228916fd43f40783d855ed", + "webhookKey": "ROabu3sT0tz2PbkP", + "identifier": "asdasdasd", + "title": "asdasdasd", + "icon": "Airflow", + "description": "asdasdasd", + "enabled": true, + "security": {}, + "createdBy": "auth0|62ceaaa497ea00f09d7c4f41", + "updatedBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", + "updatedAt": "2024-10-30T21:07:07.640Z", + "integrationType": "custom", + "mappings": [], + "createdAt": "2024-10-30T19:29:26.046Z", + "url": "http://localhost:3007/v1/trigger/ROabu3sT0tz2PbkP", + "events": [] + } + } + ``` + +
Keystring | null
`mappings`IntegrationMapping[] | null`mappings.blueprint`string
`mappings.operation`'create' | 'delete'
`mappings.operation.type`'create' | 'delete' | object
`mappings.operation.deleteDependents`boolean | null
`mappings.filter`string | null
`mappings.itemsToParse`string | null
`mappings.entity.identifier`string | object
`mappings.entity.identifier.combinator`string
`mappings.entity.identifier.rules`object[]
`mappings.entity.title`string | null
`mappings.entity.icon`string | null
`mappings.entity.team`string | null
`mappings.entity.properties`object
`mappings.entity.relations`object[]
`enabled`string | null
`mappings`IntegrationMapping[] | null`mappings.blueprint`string
`mappings.operation`'create' | 'delete'
`mappings.operation.type`'create' | 'delete' | object
`mappings.operation.deleteDependents`boolean | null
`mappings.filter`string | null
`mappings.itemsToParse`string | null
`mappings.entity.identifier`string | object
`mappings.entity.identifier.combinator`string
`mappings.entity.identifier.rules`object[]
`mappings.entity.title`string | null
`mappings.entity.icon`string | null
`mappings.entity.team`string | null
`mappings.entity.properties`object
`mappings.entity.relations`object[]
`enabled`
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyType
`identifier`string
`title`string
`icon`string | null
`description`string | null
`mappings.blueprint`string
`mappings.operation`'create' | 'delete'
`mappings.operation.type`'create' | 'delete' | object
`mappings.operation.deleteDependents`boolean | null
`mappings.filter`string | null
`mappings.itemsToParse`string | null
`mappings.entity.identifier`string | object
`mappings.entity.identifier.combinator`string
`mappings.entity.identifier.rules`object[]
`mappings.entity.title`string | null
`mappings.entity.icon`string | null
`mappings.entity.team`string | null
`mappings.entity.properties`object
`mappings.entity.relations`object[]
`enabled`boolean
`integrationType`'custom' | 'template' | null
`createdBy`string
`updatedBy`string
`createdAt`string
`updatedAt`string
`security.signatureHeaderName`string | null
`security.signatureAlgorithm`string | null
`security.signaturePrefix`string | null
`security.requestIdentifierPath`string | null
`events.identifier`string
`events.webhookKey`string
`events.integrationId`string
`events.timestamp`string
`events.status`'Success' | 'Failure'
`events.reason`string | null
`events.idempotencyKey`string | null
`events.payload.body`object | null
`events.payload.headers`object | null
`events.payload.queryParams`object | null
`events.result.identifier`string | null
`events.result.title`string | null
`events.result.team`string[] | null
`events.result.icon`string | null
`events.result.properties`object
`events.result.relations`object | null
`events.result.blueprint`string
`events.result.operation`'create' | { type: 'create' } | 'delete' | { type: 'delete'; deleteDependents?: boolean }
`url`string
`_id`string
delete: summary: Delete a webhook description: This route allows you to delete a webhook in your Port organization. You can also delete it via the [data sources page](https://app.getport.io/settings/data-sources) of your Port account.

To learn more about webhooks, check out the [documentation](https://docs.getport.io/build-your-software-catalog/custom-integration/webhook/). From 7b6bd6afb4d720f2e3bc000238ee209df8532bb2 Mon Sep 17 00:00:00 2001 From: Shalev Avhar Date: Sun, 3 Nov 2024 10:59:25 +0200 Subject: [PATCH 14/17] feat: change webhooks jsons --- static/apispec.yaml | 180 ++++++++++++++++++++++++-------------------- 1 file changed, 100 insertions(+), 80 deletions(-) diff --git a/static/apispec.yaml b/static/apispec.yaml index 52575c107..f7c9e5605 100644 --- a/static/apispec.yaml +++ b/static/apispec.yaml @@ -17112,22 +17112,26 @@ paths: { "ok": true, "integration": { - "webhookKey": "ROabu3sT0tz2PbkP", - "identifier": "asdasdasd", - "title": "asdasdasd", - "icon": "Airflow", - "description": "asdasdasd", - "enabled": true, - "security": {}, - "createdBy": "auth0|62ceaaa497ea00f09d7c4f41", - "updatedBy": "auth0|62ceaaa497ea00f09d7c4f41", - "updatedAt": "2024-10-30T19:29:26.025Z", - "integrationType": "custom", - "_id": "67228916fd43f40783d855ed", - "mappings": [], - "createdAt": "2024-10-30T19:29:26.046Z", - "url": "http://localhost:3007/v1/trigger/ROabu3sT0tz2PbkP", - "events": [] + "identifier": string, + "title": string, + "icon": string | null, + "description": string | null, + "mappings": object[] | null, + "enabled": boolean, + "integrationType": 'custom' | 'template' | null, + "createdBy": string, + "updatedBy": string, + "createdAt": string, + "updatedAt": string, + "security": { + "signatureHeaderName": string | null, + "signatureAlgorithm": string | null, + "signaturePrefix": string | null, + "requestIdentifierPath": string | null + }, + "events": object[], + "url": string, + "_id": string } } ``` @@ -17349,22 +17353,26 @@ paths: "ok": true, "integrations": [ { - "_id": "67228916fd43f40783d855ed", - "webhookKey": "ROabu3sT0tz2PbkP", - "orgId": "org_BneDtWovPqXaA2VZ", - "identifier": "asdasdasd", - "title": "asdasdasd", - "icon": "Airflow", - "description": "asdasdasd", - "enabled": true, - "security": {}, - "createdBy": "auth0|62ceaaa497ea00f09d7c4f41", - "updatedBy": "auth0|62ceaaa497ea00f09d7c4f41", - "updatedAt": "2024-10-30T19:29:26.025Z", - "integrationType": "custom", - "mappings": [], - "createdAt": "2024-10-30T19:29:26.046Z", - "url": "http://localhost:3007/v1/trigger/ROabu3sT0tz2PbkP" + "identifier": string, + "title": string, + "icon": string | null, + "description": string | null, + "mappings": object[] | null, + "enabled": boolean, + "integrationType": 'custom' | 'template' | null, + "createdBy": string, + "updatedBy": string, + "createdAt": string, + "updatedAt": string, + "security": { + "signatureHeaderName": string | null, + "signatureAlgorithm": string | null, + "signaturePrefix": string | null, + "requestIdentifierPath": string | null + }, + "events": object[], + "url": string, + "_id": string } ] } @@ -17692,22 +17700,26 @@ paths: { "ok": true, "integration": { - "_id": "67228916fd43f40783d855ed", - "webhookKey": "ROabu3sT0tz2PbkP", - "identifier": "asdasdasd", - "title": "asdasdasd", - "icon": "Airflow", - "description": "asdasdasd", - "enabled": true, - "security": {}, - "createdBy": "auth0|62ceaaa497ea00f09d7c4f41", - "updatedBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", - "updatedAt": "2024-10-30T21:04:24.202Z", - "integrationType": "custom", - "mappings": [], - "createdAt": "2024-10-30T19:29:26.046Z", - "url": "http://localhost:3007/v1/trigger/ROabu3sT0tz2PbkP", - "events": [] + "identifier": string, + "title": string, + "icon": string | null, + "description": string | null, + "mappings": object[] | null, + "enabled": boolean, + "integrationType": 'custom' | 'template' | null, + "createdBy": string, + "updatedBy": string, + "createdAt": string, + "updatedAt": string, + "security": { + "signatureHeaderName": string | null, + "signatureAlgorithm": string | null, + "signaturePrefix": string | null, + "requestIdentifierPath": string | null + }, + "events": object[], + "url": string, + "_id": string } } ``` @@ -18037,22 +18049,26 @@ paths: { "ok": true, "integration": { - "_id": "67228916fd43f40783d855ed", - "webhookKey": "ROabu3sT0tz2PbkP", - "identifier": "asdasdasd", - "title": "asdasdasd", - "icon": "Airflow", - "description": "asdasdasd", - "enabled": true, - "security": {}, - "createdBy": "auth0|62ceaaa497ea00f09d7c4f41", - "updatedBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", - "updatedAt": "2024-10-30T21:07:07.640Z", - "integrationType": "custom", - "mappings": [], - "createdAt": "2024-10-30T19:29:26.046Z", - "url": "http://localhost:3007/v1/trigger/ROabu3sT0tz2PbkP", - "events": [] + "identifier": string, + "title": string, + "icon": string | null, + "description": string | null, + "mappings": object[] | null, + "enabled": boolean, + "integrationType": 'custom' | 'template' | null, + "createdBy": string, + "updatedBy": string, + "createdAt": string, + "updatedAt": string, + "security": { + "signatureHeaderName": string | null, + "signatureAlgorithm": string | null, + "signaturePrefix": string | null, + "requestIdentifierPath": string | null + }, + "events": object[], + "url": string, + "_id": string } } ``` @@ -18280,22 +18296,26 @@ paths: { "ok": true, "integration": { - "_id": "67228916fd43f40783d855ed", - "webhookKey": "ROabu3sT0tz2PbkP", - "identifier": "asdasdasd", - "title": "asdasdasd", - "icon": "Airflow", - "description": "asdasdasd", - "enabled": true, - "security": {}, - "createdBy": "auth0|62ceaaa497ea00f09d7c4f41", - "updatedBy": "60EsooJtOqimlekxrNh7nfr2iOgTcyLZ", - "updatedAt": "2024-10-30T21:07:07.640Z", - "integrationType": "custom", - "mappings": [], - "createdAt": "2024-10-30T19:29:26.046Z", - "url": "http://localhost:3007/v1/trigger/ROabu3sT0tz2PbkP", - "events": [] + "identifier": string, + "title": string, + "icon": string | null, + "description": string | null, + "mappings": object[] | null, + "enabled": boolean, + "integrationType": 'custom' | 'template' | null, + "createdBy": string, + "updatedBy": string, + "createdAt": string, + "updatedAt": string, + "security": { + "signatureHeaderName": string | null, + "signatureAlgorithm": string | null, + "signaturePrefix": string | null, + "requestIdentifierPath": string | null + }, + "events": object[], + "url": string, + "_id": string } } ``` From f6bbd587f3c908ac6c8c89049988a34320522d9a Mon Sep 17 00:00:00 2001 From: Shalev Avhar Date: Sun, 3 Nov 2024 11:06:24 +0200 Subject: [PATCH 15/17] feat: fix integration jsons --- static/apispec.yaml | 431 ++++++++++++++++++++++---------------------- 1 file changed, 218 insertions(+), 213 deletions(-) diff --git a/static/apispec.yaml b/static/apispec.yaml index f7c9e5605..ceb868548 100644 --- a/static/apispec.yaml +++ b/static/apispec.yaml @@ -15450,59 +15450,60 @@ paths: ```json { "ok": true, - "integration": { - "installationId": string, - "title"?: string | null, - "installationType": 'Saas' | 'OnPrem', - "installationAppType": string, - "version": string, - "config": { - "deleteDependentEntities": boolean, - "createMissingRelatedEntities": boolean, - "resources": object[] | null, - "changelogDestination": - | { - "type": 'WEBHOOK', - "agent"?: boolean, - "url": string, - } - | { - "type": 'KAFKA', - }, - "clientId": string, - "integrationType": string, - "logAttributes": { - "ingestUrl": string, - "ingestId": string, - }, - "resyncState"?: { - "status": 'running' | 'completed' | 'failed', - "lastResyncStart": string, - "lastResyncEnd": string | null, - "intervalInMinutes": number | null, - "nextResync": string | null, - "updatedAt": string, - }, - "_id"?: string, - "_orgId"?: string, - - "spec"?: { - "integrationSpec": Record, - "appSpec"?: { - "scheduledResyncInterval"?: string, - "sendRawDataExamples"?: boolean, + "integration": { + "installationId": string, + "title": string | null, + "installationType": 'Saas' | 'OnPrem', + "installationAppType": string, + "version": string, + "config": { + "deleteDependentEntities": boolean, + "createMissingRelatedEntities": boolean, + "resources": object[] | null, + }, + "changelogDestination": + | { + "type": 'WEBHOOK', + "agent": boolean | null, + "url": string + } + | { + "type": 'KAFKA' }, + "clientId": string, + "integrationType": string, + "logAttributes": { + "ingestUrl": string, + "ingestId": string + }, + "resyncState": | null{ + "status": 'running' | 'completed' | 'failed', + "lastResyncStart": string, + "lastResyncEnd": string | null, + "intervalInMinutes": number | null, + "nextResync": string | null, + "updatedAt": string + }, + "_id": string | null, + "_orgId": string | null, + + "spec": | null{ + "integrationSpec": Record, + "appSpec": | null{ + "scheduledResyncInterval": string | null, + "sendRawDataExamples": boolean | null, }, - "statusInfo"?: { - "integrationStatus": { - "status": 'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted', - "lastSyncedAt"?: string, - "message"?: string, - }, - "createdAt"?: string, - "updatedAt"?: string, + }, + "statusInfo": | null{ + "integrationStatus": { + "status": 'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted', + "lastSyncedAt": string | null, + "message": string | null, }, + "createdAt": string | null, + "updatedAt": string | null, } + } } ``` @@ -15688,9 +15689,9 @@ paths: { "ok": true, "integrations": [ - { + { "installationId": string, - "title"?: string | null, + "title": string | null, "installationType": 'Saas' | 'OnPrem', "installationAppType": string, "version": string, @@ -15698,48 +15699,49 @@ paths: "deleteDependentEntities": boolean, "createMissingRelatedEntities": boolean, "resources": object[] | null, + }, "changelogDestination": | { "type": 'WEBHOOK', - "agent"?: boolean, - "url": string, + "agent": boolean | null, + "url": string } | { - "type": 'KAFKA', + "type": 'KAFKA' }, "clientId": string, "integrationType": string, "logAttributes": { "ingestUrl": string, - "ingestId": string, + "ingestId": string }, - "resyncState"?: { + "resyncState": | null{ "status": 'running' | 'completed' | 'failed', "lastResyncStart": string, "lastResyncEnd": string | null, "intervalInMinutes": number | null, "nextResync": string | null, - "updatedAt": string, + "updatedAt": string }, - "_id"?: string, - "_orgId"?: string, + "_id": string | null, + "_orgId": string | null, - "spec"?: { + "spec": | null{ "integrationSpec": Record, - "appSpec"?: { - "scheduledResyncInterval"?: string, - "sendRawDataExamples"?: boolean, + "appSpec": | null{ + "scheduledResyncInterval": string | null, + "sendRawDataExamples": boolean | null, }, }, - "statusInfo"?: { + "statusInfo": | null{ "integrationStatus": { "status": 'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted', - "lastSyncedAt"?: string, - "message"?: string, + "lastSyncedAt": string | null, + "message": string | null, }, - "createdAt"?: string, - "updatedAt"?: string, - }, + "createdAt": string | null, + "updatedAt": string | null, + } } ] } @@ -16094,58 +16096,59 @@ paths: { "ok": true, "integration": { - "installationId": string, - "title"?: string | null, - "installationType": 'Saas' | 'OnPrem', - "installationAppType": string, - "version": string, - "config": { - "deleteDependentEntities": boolean, - "createMissingRelatedEntities": boolean, - "resources": object[] | null, - "changelogDestination": - | { - "type": 'WEBHOOK', - "agent"?: boolean, - "url": string, - } - | { - "type": 'KAFKA', - }, - "clientId": string, - "integrationType": string, - "logAttributes": { - "ingestUrl": string, - "ingestId": string, - }, - "resyncState"?: { - "status": 'running' | 'completed' | 'failed', - "lastResyncStart": string, - "lastResyncEnd": string | null, - "intervalInMinutes": number | null, - "nextResync": string | null, - "updatedAt": string, - }, - "_id"?: string, - "_orgId"?: string, - - "spec"?: { - "integrationSpec": Record, - "appSpec"?: { - "scheduledResyncInterval"?: string, - "sendRawDataExamples"?: boolean, + "installationId": string, + "title": string | null, + "installationType": 'Saas' | 'OnPrem', + "installationAppType": string, + "version": string, + "config": { + "deleteDependentEntities": boolean, + "createMissingRelatedEntities": boolean, + "resources": object[] | null, + }, + "changelogDestination": + | { + "type": 'WEBHOOK', + "agent": boolean | null, + "url": string + } + | { + "type": 'KAFKA' }, + "clientId": string, + "integrationType": string, + "logAttributes": { + "ingestUrl": string, + "ingestId": string + }, + "resyncState": | null{ + "status": 'running' | 'completed' | 'failed', + "lastResyncStart": string, + "lastResyncEnd": string | null, + "intervalInMinutes": number | null, + "nextResync": string | null, + "updatedAt": string + }, + "_id": string | null, + "_orgId": string | null, + + "spec": | null{ + "integrationSpec": Record, + "appSpec": | null{ + "scheduledResyncInterval": string | null, + "sendRawDataExamples": boolean | null, }, - "statusInfo"?: { - "integrationStatus": { - "status": 'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted', - "lastSyncedAt"?: string, - "message"?: string, - }, - "createdAt"?: string, - "updatedAt"?: string, + }, + "statusInfo": | null{ + "integrationStatus": { + "status": 'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted', + "lastSyncedAt": string | null, + "message": string | null, }, + "createdAt": string | null, + "updatedAt": string | null, } + } } ``` @@ -16348,58 +16351,59 @@ paths: { "ok": true, "integration": { - "installationId": string, - "title"?: string | null, - "installationType": 'Saas' | 'OnPrem', - "installationAppType": string, - "version": string, - "config": { - "deleteDependentEntities": boolean, - "createMissingRelatedEntities": boolean, - "resources": object[] | null, - "changelogDestination": - | { - "type": 'WEBHOOK', - "agent"?: boolean, - "url": string, - } - | { - "type": 'KAFKA', - }, - "clientId": string, - "integrationType": string, - "logAttributes": { - "ingestUrl": string, - "ingestId": string, - }, - "resyncState"?: { - "status": 'running' | 'completed' | 'failed', - "lastResyncStart": string, - "lastResyncEnd": string | null, - "intervalInMinutes": number | null, - "nextResync": string | null, - "updatedAt": string, - }, - "_id"?: string, - "_orgId"?: string, - - "spec"?: { - "integrationSpec": Record, - "appSpec"?: { - "scheduledResyncInterval"?: string, - "sendRawDataExamples"?: boolean, + "installationId": string, + "title": string | null, + "installationType": 'Saas' | 'OnPrem', + "installationAppType": string, + "version": string, + "config": { + "deleteDependentEntities": boolean, + "createMissingRelatedEntities": boolean, + "resources": object[] | null, + }, + "changelogDestination": + | { + "type": 'WEBHOOK', + "agent": boolean | null, + "url": string + } + | { + "type": 'KAFKA' }, + "clientId": string, + "integrationType": string, + "logAttributes": { + "ingestUrl": string, + "ingestId": string + }, + "resyncState": | null{ + "status": 'running' | 'completed' | 'failed', + "lastResyncStart": string, + "lastResyncEnd": string | null, + "intervalInMinutes": number | null, + "nextResync": string | null, + "updatedAt": string + }, + "_id": string | null, + "_orgId": string | null, + + "spec": | null{ + "integrationSpec": Record, + "appSpec": | null{ + "scheduledResyncInterval": string | null, + "sendRawDataExamples": boolean | null, }, - "statusInfo"?: { - "integrationStatus": { - "status": 'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted', - "lastSyncedAt"?: string, - "message"?: string, - }, - "createdAt"?: string, - "updatedAt"?: string, + }, + "statusInfo": | null{ + "integrationStatus": { + "status": 'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted', + "lastSyncedAt": string | null, + "message": string | null, }, + "createdAt": string | null, + "updatedAt": string | null, } + } } ``` @@ -16748,58 +16752,59 @@ paths: { "ok": true, "integration": { - "installationId": string, - "title"?: string | null, - "installationType": 'Saas' | 'OnPrem', - "installationAppType": string, - "version": string, - "config": { - "deleteDependentEntities": boolean, - "createMissingRelatedEntities": boolean, - "resources": object[] | null, - "changelogDestination": - | { - "type": 'WEBHOOK', - "agent"?: boolean, - "url": string, - } - | { - "type": 'KAFKA', - }, - "clientId": string, - "integrationType": string, - "logAttributes": { - "ingestUrl": string, - "ingestId": string, - }, - "resyncState"?: { - "status": 'running' | 'completed' | 'failed', - "lastResyncStart": string, - "lastResyncEnd": string | null, - "intervalInMinutes": number | null, - "nextResync": string | null, - "updatedAt": string, - }, - "_id"?: string, - "_orgId"?: string, - - "spec"?: { - "integrationSpec": Record, - "appSpec"?: { - "scheduledResyncInterval"?: string, - "sendRawDataExamples"?: boolean, + "installationId": string, + "title": string | null, + "installationType": 'Saas' | 'OnPrem', + "installationAppType": string, + "version": string, + "config": { + "deleteDependentEntities": boolean, + "createMissingRelatedEntities": boolean, + "resources": object[] | null, + }, + "changelogDestination": + | { + "type": 'WEBHOOK', + "agent": boolean | null, + "url": string + } + | { + "type": 'KAFKA' }, + "clientId": string, + "integrationType": string, + "logAttributes": { + "ingestUrl": string, + "ingestId": string + }, + "resyncState": | null{ + "status": 'running' | 'completed' | 'failed', + "lastResyncStart": string, + "lastResyncEnd": string | null, + "intervalInMinutes": number | null, + "nextResync": string | null, + "updatedAt": string + }, + "_id": string | null, + "_orgId": string | null, + + "spec": | null{ + "integrationSpec": Record, + "appSpec": | null{ + "scheduledResyncInterval": string | null, + "sendRawDataExamples": boolean | null, }, - "statusInfo"?: { - "integrationStatus": { - "status": 'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted', - "lastSyncedAt"?: string, - "message"?: string, - }, - "createdAt"?: string, - "updatedAt"?: string, + }, + "statusInfo": | null{ + "integrationStatus": { + "status": 'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted', + "lastSyncedAt": string | null, + "message": string | null, }, + "createdAt": string | null, + "updatedAt": string | null, } + } } ``` From 383eac3f6b73f04c938048d7de7420a52bb258b6 Mon Sep 17 00:00:00 2001 From: Shalev Avhar Date: Sun, 3 Nov 2024 11:26:31 +0200 Subject: [PATCH 16/17] fix: webhook tables --- static/apispec.yaml | 114 ++++++++++++++++++++++++++++++-------------- 1 file changed, 77 insertions(+), 37 deletions(-) diff --git a/static/apispec.yaml b/static/apispec.yaml index ceb868548..9d4b23139 100644 --- a/static/apispec.yaml +++ b/static/apispec.yaml @@ -15476,30 +15476,30 @@ paths: "ingestUrl": string, "ingestId": string }, - "resyncState": | null{ + "resyncState": { "status": 'running' | 'completed' | 'failed', "lastResyncStart": string, "lastResyncEnd": string | null, "intervalInMinutes": number | null, "nextResync": string | null, "updatedAt": string - }, + } | null, "_id": string | null, "_orgId": string | null, - "spec": | null{ + "spec": { "integrationSpec": Record, - "appSpec": | null{ + "appSpec": { "scheduledResyncInterval": string | null, "sendRawDataExamples": boolean | null, - }, - }, - "statusInfo": | null{ + } | null, + } | null, + "statusInfo": { "integrationStatus": { "status": 'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted', "lastSyncedAt": string | null, "message": string | null, - }, + } | null, "createdAt": string | null, "updatedAt": string | null, } @@ -16121,30 +16121,30 @@ paths: "ingestUrl": string, "ingestId": string }, - "resyncState": | null{ + "resyncState": { "status": 'running' | 'completed' | 'failed', "lastResyncStart": string, "lastResyncEnd": string | null, "intervalInMinutes": number | null, "nextResync": string | null, "updatedAt": string - }, + } | null, "_id": string | null, "_orgId": string | null, - "spec": | null{ + "spec": { "integrationSpec": Record, - "appSpec": | null{ + "appSpec": { "scheduledResyncInterval": string | null, "sendRawDataExamples": boolean | null, - }, - }, - "statusInfo": | null{ + } | null, + } | null, + "statusInfo": { "integrationStatus": { "status": 'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted', "lastSyncedAt": string | null, "message": string | null, - }, + } | null, "createdAt": string | null, "updatedAt": string | null, } @@ -16376,30 +16376,30 @@ paths: "ingestUrl": string, "ingestId": string }, - "resyncState": | null{ + "resyncState": { "status": 'running' | 'completed' | 'failed', "lastResyncStart": string, "lastResyncEnd": string | null, "intervalInMinutes": number | null, "nextResync": string | null, "updatedAt": string - }, + } | null, "_id": string | null, "_orgId": string | null, - "spec": | null{ + "spec": { "integrationSpec": Record, - "appSpec": | null{ + "appSpec": { "scheduledResyncInterval": string | null, "sendRawDataExamples": boolean | null, - }, - }, - "statusInfo": | null{ + } | null, + } | null, + "statusInfo": { "integrationStatus": { "status": 'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted', "lastSyncedAt": string | null, "message": string | null, - }, + } | null, "createdAt": string | null, "updatedAt": string | null, } @@ -16777,30 +16777,30 @@ paths: "ingestUrl": string, "ingestId": string }, - "resyncState": | null{ + "resyncState": { "status": 'running' | 'completed' | 'failed', "lastResyncStart": string, "lastResyncEnd": string | null, "intervalInMinutes": number | null, "nextResync": string | null, "updatedAt": string - }, + } | null, "_id": string | null, "_orgId": string | null, - "spec": | null{ + "spec": { "integrationSpec": Record, - "appSpec": | null{ + "appSpec": { "scheduledResyncInterval": string | null, "sendRawDataExamples": boolean | null, - }, - }, - "statusInfo": | null{ + } | null, + } | null, + "statusInfo": { "integrationStatus": { "status": 'Creating' | 'Error' | 'Running' | 'UnHealthy' | 'Updating' | 'Deleting' | 'Deleted', "lastSyncedAt": string | null, "message": string | null, - }, + } | null, "createdAt": string | null, "updatedAt": string | null, } @@ -17328,7 +17328,15 @@ paths: `events.result.operation` - 'create' | { type: 'create' } | 'delete' | { type: 'delete'; deleteDependents?: boolean } + 'create' | 'delete' + + + `events.result.operation.type` + 'create' | 'delete' + + + `events.result.operatio.deleteDependents` + boolean | null `url` @@ -17570,7 +17578,15 @@ paths: `events.result.operation` - 'create' | { type: 'create' } | 'delete' | { type: 'delete'; deleteDependents?: boolean } + 'create' | 'delete' + + + `events.result.operation.type` + 'create' | 'delete' + + + `events.result.operatio.deleteDependents` + boolean | null `url` @@ -17916,7 +17932,15 @@ paths: `events.result.operation` - 'create' | { type: 'create' } | 'delete' | { type: 'delete'; deleteDependents?: boolean } + 'create' | 'delete' + + + `events.result.operation.type` + 'create' | 'delete' + + + `events.result.operatio.deleteDependents` + boolean | null `url` @@ -18265,7 +18289,15 @@ paths: `events.result.operation` - 'create' | { type: 'create' } | 'delete' | { type: 'delete'; deleteDependents?: boolean } + 'create' | 'delete' + + + `events.result.operation.type` + 'create' | 'delete' + + + `events.result.operatio.deleteDependents` + boolean | null `url` @@ -18512,7 +18544,15 @@ paths: `events.result.operation` - 'create' | { type: 'create' } | 'delete' | { type: 'delete'; deleteDependents?: boolean } + 'create' | 'delete' + + + `events.result.operation.type` + 'create' | 'delete' + + + `events.result.operatio.deleteDependents` + boolean | null `url` From 15bba088059e874f55ef8d6acb73cfbdffb9c7a8 Mon Sep 17 00:00:00 2001 From: Shalev Avhar Date: Sun, 3 Nov 2024 13:43:11 +0200 Subject: [PATCH 17/17] feat: add tiny example --- static/apispec.yaml | 69 +++++++++++++++------------------------------ 1 file changed, 23 insertions(+), 46 deletions(-) diff --git a/static/apispec.yaml b/static/apispec.yaml index 9d4b23139..a1bf1b10e 100644 --- a/static/apispec.yaml +++ b/static/apispec.yaml @@ -15272,52 +15272,29 @@ paths: - 'read:integrations' responses: '200': - description: | - Successfully changed the entity. - The response will have the following structure: - - ```json - { - "ok": true, - "count": 1, - "data": [ - { - "message": string, - "level": 'INFO' | 'ERROR' | 'WARNING' | 'DEBUG' | 'FATAL', - "timestamp": string, - "extra": object, - "id": string - } - ] - } - ``` - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyType
`message`string
`level`'INFO' | 'ERROR' | 'WARNING' | 'DEBUG' | 'FATAL'
`timestamp`string
`extra`object
`id`string
+ description: + content: + text/plain: + schema: + type: object + properties: + message: + type: string + level: + type: string + enum: ["INFO", "ERROR", "WARNING", "DEBUG", "FATAL"] + timestamp: + type: string + extra: + type: object + additionalProperties: true + id: + type: string + required: + - message + - level + - timestamp + - id '/v1/integration/{identifier}/config': patch: summary: Patch an integration's config