From 2705077fc1dad192c538bdc7b79357a31d1f8671 Mon Sep 17 00:00:00 2001 From: George J Padayatti Date: Tue, 17 Oct 2023 21:06:31 +0530 Subject: [PATCH] Upd: add individual, webhook endpoints Signed-off-by: George J Padayatti --- openapi/v2023.8.2/bundled.yaml | 776 +++++++++--------- openapi/v2023.8.2/definitions/Individual.yaml | 8 +- .../definitions/IndividualExtras.yaml | 56 +- openapi/v2023.8.2/definitions/Webhook.yaml | 1 + .../definitions/WebhookDelivery.yaml | 25 + .../v2023.8.2/definitions/WebhookPing.yaml | 29 + openapi/v2023.8.2/index.yaml | 31 +- .../paths/configCreateIndividual.yaml | 44 + .../v2023.8.2/paths/configCreateWebhook.yaml | 10 +- .../paths/configDeleteIndividual.yaml | 35 + .../v2023.8.2/paths/configDeleteWebhook.yaml | 12 +- .../configListAllRecentWebhookDeliveries.yaml | 22 +- .../paths/configListIndividuals.yaml | 35 + .../v2023.8.2/paths/configListWebhooks.yaml | 37 +- .../v2023.8.2/paths/configPingWebhook.yaml | 24 +- .../v2023.8.2/paths/configReadIndividual.yaml | 35 + .../configReadRecentWebhookDelivery.yaml | 145 +--- .../v2023.8.2/paths/configReadWebhook.yaml | 32 +- .../paths/configReadWebhookEventTypes.yaml | 2 +- .../paths/configRedeliverWebhook.yaml | 2 +- .../paths/configUpdateIndividual.yaml | 50 ++ .../v2023.8.2/paths/configUpdateWebhook.yaml | 55 +- .../paths/getWebhookPayloadContentTypes.yaml | 2 +- 23 files changed, 714 insertions(+), 754 deletions(-) create mode 100644 openapi/v2023.8.2/definitions/WebhookDelivery.yaml create mode 100644 openapi/v2023.8.2/definitions/WebhookPing.yaml create mode 100644 openapi/v2023.8.2/paths/configCreateIndividual.yaml create mode 100644 openapi/v2023.8.2/paths/configDeleteIndividual.yaml create mode 100644 openapi/v2023.8.2/paths/configListIndividuals.yaml create mode 100644 openapi/v2023.8.2/paths/configReadIndividual.yaml create mode 100644 openapi/v2023.8.2/paths/configUpdateIndividual.yaml diff --git a/openapi/v2023.8.2/bundled.yaml b/openapi/v2023.8.2/bundled.yaml index 7e0cdef..e9667ab 100644 --- a/openapi/v2023.8.2/bundled.yaml +++ b/openapi/v2023.8.2/bundled.yaml @@ -10,6 +10,7 @@ components: - skipSslVerification - timestamp type: object + title: Webhook properties: id: type: string @@ -437,8 +438,6 @@ components: title: Individual description: 'Shallowly models an Individual which may reference some instance in an external system (registration system, functional ID, foundational ID etc). An Individual instance of this model is not to be mistaken with a unique natural individual. It is up to the system owner to decide if this record permits mapping to a natural individual and/or if a single Individual row can map to several consent agreements.' x-not-in-database: false - required: - - id properties: id: type: string @@ -1664,68 +1663,211 @@ paths: x-specification-pii-or-sensitive: 'False' x-specification-scenario: '' x-specification-usecase: UC-C-PIC-A-003 - /config/webhooks/event-types: + /config/individual: + post: + tags: + - config + summary: CREATE - Create an individual + operationId: configCreatePolicy + description: CREATE - Creates an Individual in the Consent system + parameters: [] + x-specification-usecase: '' + x-specification-scenario: '' + x-specification-pii-or-sensitive: 'True' + x-specification-crudl-model: Individual + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + individual: + allOf: + - $ref: '#/components/schemas/Individual' + - $ref: '#/paths/~1config~1individual/post/requestBody/content/application~1json/schema/properties/individual/allOf/1' + description: An object of type Individual + '400': + description: bad input parameter + security: + - BearerAuth: [] + requestBody: + content: + application/json: + schema: + type: object + properties: + individual: + allOf: + - $ref: '#/components/schemas/Individual' + - type: object + title: IndividualExtras + required: + - name + - email + - phone + properties: + name: + type: string + description: Name of the individual + iamId: + type: string + description: Create a user in keycloak and save the `id` as `iamId` + email: + type: string + description: Email Id + phone: + type: string + description: Phone + description: An object of type Individual + required: + - individual + '/config/individual/{individualId}': get: - operationId: configReadWebhookEventTypes - description: Get webhook event types - summary: READ - Read webhook event types tags: - config + summary: READ - Read an individual + operationId: configReadIndividual + description: READ - Fetch an Individual in the Consent system + parameters: + - in: path + name: individualId + description: Unique ID of an object + required: true + schema: + type: string + x-specification-usecase: '' + x-specification-scenario: '' + x-specification-pii-or-sensitive: 'True' + x-specification-crudl-model: Individual responses: '200': - description: OK + description: '' content: application/json: schema: - required: - - eventTypes type: object properties: - eventTypes: - type: array - items: - type: string - title: WebhookEventType - enum: - - data.update.initiated - - data.update.cancelled - - consent.allowed - - consent.disallowed - - consent.auto_expiry - - org.unsubscribed - - data.delete.initiated - - data.download.initiated - - data.delete.cancelled - - data.download.cancelled - - org.subscribed - deprecated: false + individual: + allOf: + - $ref: '#/components/schemas/Individual' + - $ref: '#/paths/~1config~1individual/post/requestBody/content/application~1json/schema/properties/individual/allOf/1' + '400': + description: bad input parameter security: - BearerAuth: [] - /config/webhooks/payload/content-types: + put: + tags: + - config + summary: UPDATE - Update an individual + operationId: configUpdateIndividual + description: UPDATE - Updates an Individual in the Consent system + parameters: + - in: path + name: individualId + description: Unique ID of an object + required: true + schema: + type: string + x-specification-usecase: '' + x-specification-scenario: '' + x-specification-pii-or-sensitive: 'True' + x-specification-crudl-model: Individual + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + individual: + allOf: + - $ref: '#/components/schemas/Individual' + - $ref: '#/paths/~1config~1individual/post/requestBody/content/application~1json/schema/properties/individual/allOf/1' + '400': + description: bad input parameter + security: + - BearerAuth: [] + requestBody: + content: + application/json: + schema: + type: object + properties: + individual: + allOf: + - $ref: '#/components/schemas/Individual' + - $ref: '#/paths/~1config~1individual/post/requestBody/content/application~1json/schema/properties/individual/allOf/1' + description: An object of type Individual + required: + - individual + delete: + tags: + - config + summary: DELETE - Delete an individual + operationId: configDeleteIndividual + description: DELETE - entirely removes an individual from the system and cascades necessary actions to related DataAgreementRecord objects + parameters: + - in: path + name: individualId + description: Unique ID of an object + required: true + schema: + type: string + x-specification-usecase: '' + x-specification-scenario: '' + x-specification-pii-or-sensitive: 'True' + x-specification-crudl-model: Individual + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + individual: + allOf: + - $ref: '#/components/schemas/Individual' + - $ref: '#/paths/~1config~1individual/post/requestBody/content/application~1json/schema/properties/individual/allOf/1' + '400': + description: bad input parameter + security: + - BearerAuth: [] + /config/individuals: get: - operationId: getWebhookPayloadContentTypes.yaml - summary: Get webhook payload content types - description: Get webhook payload content types tags: - config + summary: LIST - List all individuals + operationId: configListIndividuals + description: LIST - lists individuals in the system + parameters: + - $ref: '#/paths/~1config~1policies/get/parameters/1' + - $ref: '#/paths/~1config~1policies/get/parameters/2' + x-specification-usecase: '' + x-specification-scenario: '' + x-specification-pii-or-sensitive: 'True' + x-specification-crudl-model: Individual responses: '200': - description: OK + description: '' content: application/json: schema: - required: - - ContentTypes type: object properties: - ContentTypes: + individuals: type: array items: - type: string - enum: - - application/json - - application/x-www-form-urlencoded - deprecated: false + allOf: + - $ref: '#/components/schemas/Individual' + - $ref: '#/paths/~1config~1individual/post/requestBody/content/application~1json/schema/properties/individual/allOf/1' + pagination: + $ref: '#/components/schemas/Pagination' + '400': + description: bad input parameter security: - BearerAuth: [] /config/webhook: @@ -1739,7 +1881,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Webhook' + type: object + properties: + webhook: + $ref: '#/components/schemas/Webhook' required: true responses: '201': @@ -1747,51 +1892,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Webhook' + type: object + properties: + webhook: + $ref: '#/components/schemas/Webhook' deprecated: false security: - BearerAuth: [] - /config/webhooks: + '/config/webhook/{webhookId}': get: - operationId: configListWebhooks - summary: Get all webhooks for an organisation - description: Get all webhooks for an organisation + operationId: configReadWebhook + summary: READ - Read webhook + description: Get a webhook by ID tags: - config + parameters: + - name: webhookId + in: path + required: true + style: simple + schema: + type: string responses: '200': description: OK content: application/json: schema: - type: array - items: - required: - - ID - - PayloadURL - - Disabled - - TimeStamp - - IsLastDeliverySuccess - type: object - properties: - ID: - type: string - PayloadURL: - type: string - Disabled: - type: boolean - TimeStamp: - type: string - IsLastDeliverySuccess: - type: boolean + type: object + properties: + webhook: + $ref: '#/components/schemas/Webhook' deprecated: false security: - BearerAuth: [] - '/config/webhook/{webhookId}': - get: - operationId: configReadWebhook - summary: READ - Read webhook - description: Get a webhook by ID + put: + operationId: configUpdateWebhook + summary: UPDATE - Update webhook + description: UPDATE - Update webhook tags: - config parameters: @@ -1801,44 +1939,25 @@ paths: style: simple schema: type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + webhook: + $ref: '#/components/schemas/Webhook' + required: true responses: '200': description: OK content: application/json: schema: - required: - - ID - - OrgID - - PayloadURL - - ContentType - - SubscribedEvents - - Disabled - - SecretKey - - SkipSSLVerification - - TimeStamp type: object properties: - ID: - type: string - OrgID: - type: string - PayloadURL: - type: string - ContentType: - type: string - SubscribedEvents: - type: array - items: - type: string - Disabled: - type: boolean - SecretKey: - type: string - SkipSSLVerification: - type: boolean - TimeStamp: - type: string + webhook: + $ref: '#/components/schemas/Webhook' deprecated: false security: - BearerAuth: [] @@ -1856,91 +1975,44 @@ paths: schema: type: string responses: - '204': - description: No Content - content: {} + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + webhook: + $ref: '#/components/schemas/Webhook' deprecated: false security: - BearerAuth: [] - put: - operationId: configUpdateWebhook - summary: UPDATE - Update webhook - description: UPDATE - Update webhook + /config/webhooks: + get: + operationId: configListWebhooks + summary: LIST - List all webhooks + description: Get all webhooks for an organisation tags: - config parameters: - - name: webhookId - in: path - required: true - style: simple - schema: - type: string - requestBody: - content: - application/json: - schema: - required: - - payloadurl - - subscribedevents - - contenttype - - secretkey - - disabled - - skipsslverification - type: object - properties: - payloadurl: - type: string - subscribedevents: - type: array - items: - type: string - contenttype: - type: string - secretkey: - type: string - disabled: - type: boolean - skipsslverification: - type: boolean - required: true + - $ref: '#/paths/~1config~1policies/get/parameters/1' + - $ref: '#/paths/~1config~1policies/get/parameters/2' responses: '200': description: OK content: application/json: schema: - required: - - ID - - OrgID - - PayloadURL - - ContentType - - SubscribedEvents - - Disabled - - SecretKey - - SkipSSLVerification - - TimeStamp type: object properties: - ID: - type: string - OrgID: - type: string - PayloadURL: - type: string - ContentType: - type: string - SubscribedEvents: + webhooks: type: array items: - type: string - Disabled: - type: boolean - SecretKey: - type: string - SkipSSLVerification: - type: boolean - TimeStamp: - type: string + oneOf: + - $ref: '#/components/schemas/Webhook' + description: Webhook + pagination: + $ref: '#/components/schemas/Pagination' deprecated: false security: - BearerAuth: [] @@ -1964,28 +2036,38 @@ paths: content: application/json: schema: - required: - - ResponseStatusCode - - ResponseStatusStr - - ExecutionStartTimeStamp - - ExecutionEndTimeStamp - - Status - - StatusDescription type: object properties: - ResponseStatusCode: - type: integer - format: int32 - ResponseStatusStr: - type: string - ExecutionStartTimeStamp: - type: string - ExecutionEndTimeStamp: - type: string - Status: - type: string - StatusDescription: - type: string + webhookPing: + type: object + title: WebhookPing + required: + - responseStatusCode + - responseStatusStr + - executionStartTimeStamp + - executionEndTimeStamp + - status + - statusDescription + properties: + responseStatusCode: + type: integer + format: int32 + description: Response status code + responseStatusStr: + type: string + description: Response status string + executionStartTimestamp: + type: string + description: Execution start timestamp + executionEndTimestamp: + type: string + description: Execution end timestamp + status: + type: string + description: Status of webhook + statusDescription: + type: string + description: Status description deprecated: false security: - BearerAuth: [] @@ -2019,23 +2101,33 @@ paths: webhookDeliveries: type: array items: - type: object - properties: - id: - type: string - webhookId: - type: string - responseStatusCode: - type: integer - format: int32 - responseStatusStr: - type: string - timestamp: - type: string - status: - type: string - statusDescription: - type: string + oneOf: + - type: object + title: WebhookDelivery + properties: + id: + type: string + description: Webhook delivery Id + webhookId: + type: string + description: Webhook Id + responseStatusCode: + type: integer + format: int32 + description: Response status code + responseStatusStr: + type: string + description: Response status string + timestamp: + type: string + description: Response timestamp + status: + type: string + description: Webhook delivery status + statusDescription: + type: string + description: Webhook delivery status description + description: WebhookDelivery pagination: $ref: '#/components/schemas/Pagination' deprecated: false @@ -2068,146 +2160,15 @@ paths: application/json: schema: required: - - ID - - RequestHeaders - - RequestPayload - - ResponseHeaders - - ResponseBody - - ResponseStatusCode - - ResponseStatusStr - - ExecutionStartTimeStamp - - ExecutionEndTimeStamp - - Status - - StatusDescription + - webhookDelivery type: object properties: - ID: - type: string - RequestHeaders: - required: - - Accept - - Content-Type - - User-Agent - - X-Igrant-Signature - type: object - properties: - Accept: - type: array - items: - type: string - Content-Type: - type: array - items: - type: string - User-Agent: - type: array - items: - type: string - X-Igrant-Signature: - type: array - items: - type: string - RequestPayload: - required: - - data - - deliveryid - - timestamp - - type - - webhookid - type: object - properties: - data: - required: - - attribute - - consentID - - days - - organisationID - - purposeID - - timestamp - - userID - type: object - properties: - attribute: - type: array - items: - type: string - consentID: - type: string - days: - type: integer - format: int32 - organisationID: - type: string - purposeID: - type: string - timestamp: - type: string - userID: - type: string - deliveryid: - type: string - timestamp: - type: string - type: - type: string - webhookid: - type: string - ResponseHeaders: - ResponseHeaders: null - title: ResponseHeaders - required: - - Cache-Control - - Content-Type - - Date - - Server - - Vary - - X-Request-Id - - X-Token-Id - type: object - properties: - Cache-Control: - type: array - items: - type: string - Content-Type: - type: array - items: - type: string - Date: - type: array - items: - type: string - Server: - type: array - items: - type: string - Vary: - type: array - items: - type: string - X-Request-Id: - type: array - items: - type: string - X-Token-Id: - type: array - items: - type: string - ResponseBody: - type: string - ResponseStatusCode: - type: integer - format: int32 - ResponseStatusStr: - type: string - ExecutionStartTimeStamp: - type: string - ExecutionEndTimeStamp: - type: string - Status: - type: string - StatusDescription: - type: string + webhookDelivery: + type: array + items: + oneOf: + - $ref: '#/paths/~1config~1webhooks~1%7BwebhookId%7D~1deliveries/get/responses/200/content/application~1json/schema/properties/webhookDeliveries/items/oneOf/0' + description: WebhookDelivery deprecated: false security: - BearerAuth: [] @@ -2238,12 +2199,76 @@ paths: schema: type: string responses: - '200': + '204': description: OK content: {} deprecated: false security: - BearerAuth: [] + /config/webhooks/event-types: + get: + operationId: configReadWebhookEventTypes + description: Get webhook event types + summary: LIST - List all webhook event types + tags: + - config + responses: + '200': + description: OK + content: + application/json: + schema: + required: + - eventTypes + type: object + properties: + eventTypes: + type: array + items: + type: string + title: WebhookEventType + enum: + - data.update.initiated + - data.update.cancelled + - consent.allowed + - consent.disallowed + - consent.auto_expiry + - org.unsubscribed + - data.delete.initiated + - data.download.initiated + - data.delete.cancelled + - data.download.cancelled + - org.subscribed + deprecated: false + security: + - BearerAuth: [] + /config/webhooks/payload/content-types: + get: + operationId: getWebhookPayloadContentTypes.yaml + summary: LIST - List all webhook payload content types + description: Get webhook payload content types + tags: + - config + responses: + '200': + description: OK + content: + application/json: + schema: + required: + - ContentTypes + type: object + properties: + ContentTypes: + type: array + items: + type: string + enum: + - application/json + - application/x-www-form-urlencoded + deprecated: false + security: + - BearerAuth: [] /onboard/admin/login: post: tags: @@ -2342,64 +2367,7 @@ paths: individual: allOf: - $ref: '#/components/schemas/Individual' - - type: object - title: IndividualExtras - properties: - name: - type: string - iamId: - type: string - email: - type: string - phone: - type: string - imageId: - type: string - imageUrl: - type: string - lastVisit: - type: string - orgs: - type: array - items: - required: - - id - - name - - location - - type - - typeId - - eulaAccepted - type: object - properties: - id: - type: string - name: - type: string - location: - type: string - type: - type: string - typeId: - type: string - eulaAccepted: - type: boolean - apiKey: - type: string - roles: - type: array - items: - required: - - roleId - - orgId - type: object - properties: - roleId: - type: integer - format: int32 - orgId: - type: string - incompleteProfile: - type: boolean + - $ref: '#/paths/~1config~1individual/post/requestBody/content/application~1json/schema/properties/individual/allOf/1' token: $ref: '#/paths/~1onboard~1admin~1login/post/responses/200/content/application~1json/schema' deprecated: false diff --git a/openapi/v2023.8.2/definitions/Individual.yaml b/openapi/v2023.8.2/definitions/Individual.yaml index 27b7573..d35a9bd 100644 --- a/openapi/v2023.8.2/definitions/Individual.yaml +++ b/openapi/v2023.8.2/definitions/Individual.yaml @@ -2,11 +2,7 @@ type: object title: Individual description: "Shallowly models an Individual which may reference some instance in an external system (registration system, functional ID, foundational ID etc). An Individual instance of this model is not to be mistaken with a unique natural individual. It is up to the system owner to decide if this record permits mapping to a natural individual and/or if a single Individual row can map to several consent agreements." x-not-in-database: false - -required: - - id properties: - id: type: string format: "" @@ -23,10 +19,10 @@ properties: type: string format: "" example: "" - description: "External id type specifier. A string. For instance \"email\" or \"foundational id\". Can be used in later queries." + description: 'External id type specifier. A string. For instance "email" or "foundational id". Can be used in later queries.' identityProviderId: type: string format: "" example: "" - description: "This could be an FK, but for now we do not have a mapping of identity providers. IDBB may have more requirements." \ No newline at end of file + description: "This could be an FK, but for now we do not have a mapping of identity providers. IDBB may have more requirements." diff --git a/openapi/v2023.8.2/definitions/IndividualExtras.yaml b/openapi/v2023.8.2/definitions/IndividualExtras.yaml index d840a93..d5c36a1 100644 --- a/openapi/v2023.8.2/definitions/IndividualExtras.yaml +++ b/openapi/v2023.8.2/definitions/IndividualExtras.yaml @@ -1,58 +1,20 @@ type: object title: IndividualExtras +required: + - name + - email + - phone properties: name: type: string + description: "Name of the individual" iamId: type: string + description: "Create a user in keycloak and save the `id` as `iamId`" email: type: string + description: "Email Id" phone: type: string - imageId: - type: string - imageUrl: - type: string - lastVisit: - type: string - orgs: - type: array - items: - required: - - id - - name - - location - - type - - typeId - - eulaAccepted - type: object - properties: - id: - type: string - name: - type: string - location: - type: string - type: - type: string - typeId: - type: string - eulaAccepted: - type: boolean - apiKey: - type: string - roles: - type: array - items: - required: - - roleId - - orgId - type: object - properties: - roleId: - type: integer - format: int32 - orgId: - type: string - incompleteProfile: - type: boolean + description: "Phone" + diff --git a/openapi/v2023.8.2/definitions/Webhook.yaml b/openapi/v2023.8.2/definitions/Webhook.yaml index 57ff85c..d89fa30 100644 --- a/openapi/v2023.8.2/definitions/Webhook.yaml +++ b/openapi/v2023.8.2/definitions/Webhook.yaml @@ -7,6 +7,7 @@ required: - skipSslVerification - timestamp type: object +title: Webhook properties: id: type: string diff --git a/openapi/v2023.8.2/definitions/WebhookDelivery.yaml b/openapi/v2023.8.2/definitions/WebhookDelivery.yaml new file mode 100644 index 0000000..0a515ba --- /dev/null +++ b/openapi/v2023.8.2/definitions/WebhookDelivery.yaml @@ -0,0 +1,25 @@ +type: object +title: WebhookDelivery +properties: + id: + type: string + description: "Webhook delivery Id" + webhookId: + type: string + description: "Webhook Id" + responseStatusCode: + type: integer + format: int32 + description: "Response status code" + responseStatusStr: + type: string + description: "Response status string" + timestamp: + type: string + description: "Response timestamp" + status: + type: string + description: "Webhook delivery status" + statusDescription: + type: string + description: "Webhook delivery status description" diff --git a/openapi/v2023.8.2/definitions/WebhookPing.yaml b/openapi/v2023.8.2/definitions/WebhookPing.yaml new file mode 100644 index 0000000..3f5deaa --- /dev/null +++ b/openapi/v2023.8.2/definitions/WebhookPing.yaml @@ -0,0 +1,29 @@ +type: object +title: WebhookPing +required: + - responseStatusCode + - responseStatusStr + - executionStartTimeStamp + - executionEndTimeStamp + - status + - statusDescription +properties: + responseStatusCode: + type: integer + format: int32 + description: "Response status code" + responseStatusStr: + type: string + description: "Response status string" + executionStartTimestamp: + type: string + description: "Execution start timestamp" + executionEndTimestamp: + type: string + description: "Execution end timestamp" + status: + type: string + description: "Status of webhook" + statusDescription: + type: string + description: "Status description" diff --git a/openapi/v2023.8.2/index.yaml b/openapi/v2023.8.2/index.yaml index 4f5de76..f12f931 100644 --- a/openapi/v2023.8.2/index.yaml +++ b/openapi/v2023.8.2/index.yaml @@ -127,25 +127,32 @@ paths: /config/policy/{policyId}/revisions: get: $ref: ./paths/configListPolicyRevisions.yaml - /config/webhooks/event-types: + /config/individual: + post: + $ref: ./paths/configCreateIndividual.yaml + /config/individual/{individualId}: get: - $ref: "./paths/configReadWebhookEventTypes.yaml" - /config/webhooks/payload/content-types: + $ref: ./paths/configReadIndividual.yaml + put: + $ref: ./paths/configUpdateIndividual.yaml + delete: + $ref: ./paths/configDeleteIndividual.yaml + /config/individuals: get: - $ref: "./paths/getWebhookPayloadContentTypes.yaml" + $ref: ./paths/configListIndividuals.yaml /config/webhook: post: $ref: "./paths/configCreateWebhook.yaml" - /config/webhooks: - get: - $ref: "./paths/configListWebhooks.yaml" /config/webhook/{webhookId}: get: $ref: "./paths/configReadWebhook.yaml" - delete: - $ref: "./paths/configDeleteWebhook.yaml" put: $ref: "./paths/configUpdateWebhook.yaml" + delete: + $ref: "./paths/configDeleteWebhook.yaml" + /config/webhooks: + get: + $ref: "./paths/configListWebhooks.yaml" /config/webhook/{webhookId}/ping: post: $ref: "./paths/configPingWebhook.yaml" @@ -158,6 +165,12 @@ paths: /config/webhooks/{webhookId}/delivery/{deliveryId}/redeliver: post: $ref: "./paths/configRedeliverWebhook.yaml" + /config/webhooks/event-types: + get: + $ref: "./paths/configReadWebhookEventTypes.yaml" + /config/webhooks/payload/content-types: + get: + $ref: "./paths/getWebhookPayloadContentTypes.yaml" /onboard/admin/login: post: $ref: ./paths/loginOrganisationAdmin.yaml diff --git a/openapi/v2023.8.2/paths/configCreateIndividual.yaml b/openapi/v2023.8.2/paths/configCreateIndividual.yaml new file mode 100644 index 0000000..eab2f94 --- /dev/null +++ b/openapi/v2023.8.2/paths/configCreateIndividual.yaml @@ -0,0 +1,44 @@ +tags: + - config +summary: "CREATE - Create an individual" +operationId: "configCreatePolicy" +description: "CREATE - Creates an Individual in the Consent system" +parameters: [] +x-specification-usecase: "" +x-specification-scenario: "" +x-specification-pii-or-sensitive: "True" +x-specification-crudl-model: "Individual" +responses: + "200": + description: "" + + content: + application/json: + schema: + type: object + properties: + individual: + allOf: + - $ref: "../definitions/Individual.yaml" + - $ref: "../definitions/IndividualExtras.yaml" + description: An object of type Individual + + "400": + description: bad input parameter +security: + - BearerAuth: [] + +requestBody: + content: + application/json: + schema: + type: object + properties: + individual: + allOf: + - $ref: "../definitions/Individual.yaml" + - $ref: "../definitions/IndividualExtras.yaml" + description: An object of type Individual + + required: + - individual diff --git a/openapi/v2023.8.2/paths/configCreateWebhook.yaml b/openapi/v2023.8.2/paths/configCreateWebhook.yaml index e1f44d4..27d0f57 100644 --- a/openapi/v2023.8.2/paths/configCreateWebhook.yaml +++ b/openapi/v2023.8.2/paths/configCreateWebhook.yaml @@ -7,7 +7,10 @@ requestBody: content: application/json: schema: - $ref: "../definitions/Webhook.yaml" + type: object + properties: + webhook: + $ref: "../definitions/Webhook.yaml" required: true responses: "201": @@ -15,7 +18,10 @@ responses: content: application/json: schema: - $ref: "../definitions/Webhook.yaml" + type: object + properties: + webhook: + $ref: "../definitions/Webhook.yaml" deprecated: false security: - BearerAuth: [] diff --git a/openapi/v2023.8.2/paths/configDeleteIndividual.yaml b/openapi/v2023.8.2/paths/configDeleteIndividual.yaml new file mode 100644 index 0000000..0f85ad8 --- /dev/null +++ b/openapi/v2023.8.2/paths/configDeleteIndividual.yaml @@ -0,0 +1,35 @@ +tags: + - config +summary: "DELETE - Delete an individual" +operationId: "configDeleteIndividual" +description: "DELETE - entirely removes an individual from the system and cascades necessary actions to related DataAgreementRecord objects" +parameters: + - in: path + name: "individualId" + description: "Unique ID of an object" + required: true + schema: + type: string + +x-specification-usecase: "" +x-specification-scenario: "" +x-specification-pii-or-sensitive: "True" +x-specification-crudl-model: "Individual" +responses: + "200": + description: "" + + content: + application/json: + schema: + type: object + properties: + individual: + allOf: + - $ref: "../definitions/Individual.yaml" + - $ref: "../definitions/IndividualExtras.yaml" + + "400": + description: bad input parameter +security: + - BearerAuth: [] diff --git a/openapi/v2023.8.2/paths/configDeleteWebhook.yaml b/openapi/v2023.8.2/paths/configDeleteWebhook.yaml index ef4a143..aedc1c5 100644 --- a/openapi/v2023.8.2/paths/configDeleteWebhook.yaml +++ b/openapi/v2023.8.2/paths/configDeleteWebhook.yaml @@ -11,9 +11,15 @@ parameters: schema: type: string responses: - "204": - description: No Content - content: {} + "200": + description: OK + content: + application/json: + schema: + type: object + properties: + webhook: + $ref: "../definitions/Webhook.yaml" deprecated: false security: - BearerAuth: [] \ No newline at end of file diff --git a/openapi/v2023.8.2/paths/configListAllRecentWebhookDeliveries.yaml b/openapi/v2023.8.2/paths/configListAllRecentWebhookDeliveries.yaml index a2a839c..274c00a 100644 --- a/openapi/v2023.8.2/paths/configListAllRecentWebhookDeliveries.yaml +++ b/openapi/v2023.8.2/paths/configListAllRecentWebhookDeliveries.yaml @@ -26,25 +26,11 @@ responses: webhookDeliveries: type: array items: - type: object - properties: - id: - type: string - webhookId: - type: string - responseStatusCode: - type: integer - format: int32 - responseStatusStr: - type: string - timestamp: - type: string - status: - type: string - statusDescription: - type: string + oneOf: + - $ref: "../definitions/WebhookDelivery.yaml" + description: WebhookDelivery pagination: $ref: "../definitions/Pagination.yaml" deprecated: false security: - - BearerAuth: [] \ No newline at end of file + - BearerAuth: [] diff --git a/openapi/v2023.8.2/paths/configListIndividuals.yaml b/openapi/v2023.8.2/paths/configListIndividuals.yaml new file mode 100644 index 0000000..e463a38 --- /dev/null +++ b/openapi/v2023.8.2/paths/configListIndividuals.yaml @@ -0,0 +1,35 @@ +tags: + - config +summary: "LIST - List all individuals" +operationId: "configListIndividuals" +description: "LIST - lists individuals in the system" +parameters: + - $ref: "../parameters/offset.yaml" + - $ref: "../parameters/limit.yaml" + +x-specification-usecase: "" +x-specification-scenario: "" +x-specification-pii-or-sensitive: "True" +x-specification-crudl-model: "Individual" +responses: + "200": + description: "" + + content: + application/json: + schema: + type: object + properties: + individuals: + type: array + items: + allOf: + - $ref: "../definitions/Individual.yaml" + - $ref: "../definitions/IndividualExtras.yaml" + pagination: + $ref: "../definitions/Pagination.yaml" + + "400": + description: bad input parameter +security: + - BearerAuth: [] diff --git a/openapi/v2023.8.2/paths/configListWebhooks.yaml b/openapi/v2023.8.2/paths/configListWebhooks.yaml index 09c24fa..a65f140 100644 --- a/openapi/v2023.8.2/paths/configListWebhooks.yaml +++ b/openapi/v2023.8.2/paths/configListWebhooks.yaml @@ -1,34 +1,27 @@ operationId: configListWebhooks -summary: Get all webhooks for an organisation +summary: LIST - List all webhooks description: Get all webhooks for an organisation tags: - config +parameters: + - $ref: "../parameters/offset.yaml" + - $ref: "../parameters/limit.yaml" responses: "200": description: OK content: application/json: schema: - type: array - items: - required: - - ID - - PayloadURL - - Disabled - - TimeStamp - - IsLastDeliverySuccess - type: object - properties: - ID: - type: string - PayloadURL: - type: string - Disabled: - type: boolean - TimeStamp: - type: string - IsLastDeliverySuccess: - type: boolean + type: object + properties: + webhooks: + type: array + items: + oneOf: + - $ref: "../definitions/Webhook.yaml" + description: "Webhook" + pagination: + $ref: "../definitions/Pagination.yaml" deprecated: false security: - - BearerAuth: [] \ No newline at end of file + - BearerAuth: [] diff --git a/openapi/v2023.8.2/paths/configPingWebhook.yaml b/openapi/v2023.8.2/paths/configPingWebhook.yaml index 19370ba..4158aeb 100644 --- a/openapi/v2023.8.2/paths/configPingWebhook.yaml +++ b/openapi/v2023.8.2/paths/configPingWebhook.yaml @@ -16,28 +16,10 @@ responses: content: application/json: schema: - required: - - ResponseStatusCode - - ResponseStatusStr - - ExecutionStartTimeStamp - - ExecutionEndTimeStamp - - Status - - StatusDescription type: object properties: - ResponseStatusCode: - type: integer - format: int32 - ResponseStatusStr: - type: string - ExecutionStartTimeStamp: - type: string - ExecutionEndTimeStamp: - type: string - Status: - type: string - StatusDescription: - type: string + webhookPing: + $ref: "../definitions/WebhookPing.yaml" deprecated: false security: - - BearerAuth: [] \ No newline at end of file + - BearerAuth: [] diff --git a/openapi/v2023.8.2/paths/configReadIndividual.yaml b/openapi/v2023.8.2/paths/configReadIndividual.yaml new file mode 100644 index 0000000..4f323d1 --- /dev/null +++ b/openapi/v2023.8.2/paths/configReadIndividual.yaml @@ -0,0 +1,35 @@ +tags: + - config +summary: "READ - Read an individual" +operationId: "configReadIndividual" +description: "READ - Fetch an Individual in the Consent system" +parameters: + - in: path + name: "individualId" + description: "Unique ID of an object" + required: true + schema: + type: string + +x-specification-usecase: "" +x-specification-scenario: "" +x-specification-pii-or-sensitive: "True" +x-specification-crudl-model: "Individual" +responses: + "200": + description: "" + + content: + application/json: + schema: + type: object + properties: + individual: + allOf: + - $ref: "../definitions/Individual.yaml" + - $ref: "../definitions/IndividualExtras.yaml" + + "400": + description: bad input parameter +security: + - BearerAuth: [] diff --git a/openapi/v2023.8.2/paths/configReadRecentWebhookDelivery.yaml b/openapi/v2023.8.2/paths/configReadRecentWebhookDelivery.yaml index dea5222..d66f741 100644 --- a/openapi/v2023.8.2/paths/configReadRecentWebhookDelivery.yaml +++ b/openapi/v2023.8.2/paths/configReadRecentWebhookDelivery.yaml @@ -23,146 +23,15 @@ responses: application/json: schema: required: - - ID - - RequestHeaders - - RequestPayload - - ResponseHeaders - - ResponseBody - - ResponseStatusCode - - ResponseStatusStr - - ExecutionStartTimeStamp - - ExecutionEndTimeStamp - - Status - - StatusDescription + - webhookDelivery type: object properties: - ID: - type: string - RequestHeaders: - required: - - Accept - - Content-Type - - User-Agent - - X-Igrant-Signature - type: object - properties: - Accept: - type: array - items: - type: string - Content-Type: - type: array - items: - type: string - User-Agent: - type: array - items: - type: string - X-Igrant-Signature: - type: array - items: - type: string - RequestPayload: - required: - - data - - deliveryid - - timestamp - - type - - webhookid - type: object - properties: - data: - required: - - attribute - - consentID - - days - - organisationID - - purposeID - - timestamp - - userID - type: object - properties: - attribute: - type: array - items: - type: string - consentID: - type: string - days: - type: integer - format: int32 - organisationID: - type: string - purposeID: - type: string - timestamp: - type: string - userID: - type: string - deliveryid: - type: string - timestamp: - type: string - type: - type: string - webhookid: - type: string - ResponseHeaders: - ResponseHeaders: null - title: ResponseHeaders - required: - - Cache-Control - - Content-Type - - Date - - Server - - Vary - - X-Request-Id - - X-Token-Id - type: object - properties: - Cache-Control: - type: array - items: - type: string - Content-Type: - type: array - items: - type: string - Date: - type: array - items: - type: string - Server: - type: array - items: - type: string - Vary: - type: array - items: - type: string - X-Request-Id: - type: array - items: - type: string - X-Token-Id: - type: array - items: - type: string - ResponseBody: - type: string - ResponseStatusCode: - type: integer - format: int32 - ResponseStatusStr: - type: string - ExecutionStartTimeStamp: - type: string - ExecutionEndTimeStamp: - type: string - Status: - type: string - StatusDescription: - type: string + webhookDelivery: + type: array + items: + oneOf: + - $ref: "../definitions/WebhookDelivery.yaml" + description: WebhookDelivery deprecated: false security: - BearerAuth: [] \ No newline at end of file diff --git a/openapi/v2023.8.2/paths/configReadWebhook.yaml b/openapi/v2023.8.2/paths/configReadWebhook.yaml index 01c7be0..60e9d24 100644 --- a/openapi/v2023.8.2/paths/configReadWebhook.yaml +++ b/openapi/v2023.8.2/paths/configReadWebhook.yaml @@ -16,38 +16,10 @@ responses: content: application/json: schema: - required: - - ID - - OrgID - - PayloadURL - - ContentType - - SubscribedEvents - - Disabled - - SecretKey - - SkipSSLVerification - - TimeStamp type: object properties: - ID: - type: string - OrgID: - type: string - PayloadURL: - type: string - ContentType: - type: string - SubscribedEvents: - type: array - items: - type: string - Disabled: - type: boolean - SecretKey: - type: string - SkipSSLVerification: - type: boolean - TimeStamp: - type: string + webhook: + $ref: "../definitions/Webhook.yaml" deprecated: false security: - BearerAuth: [] \ No newline at end of file diff --git a/openapi/v2023.8.2/paths/configReadWebhookEventTypes.yaml b/openapi/v2023.8.2/paths/configReadWebhookEventTypes.yaml index fd858c1..9e0db95 100644 --- a/openapi/v2023.8.2/paths/configReadWebhookEventTypes.yaml +++ b/openapi/v2023.8.2/paths/configReadWebhookEventTypes.yaml @@ -1,6 +1,6 @@ operationId: configReadWebhookEventTypes description: Get webhook event types -summary: READ - Read webhook event types +summary: LIST - List all webhook event types tags: - config responses: diff --git a/openapi/v2023.8.2/paths/configRedeliverWebhook.yaml b/openapi/v2023.8.2/paths/configRedeliverWebhook.yaml index b6395b0..0bbd4b0 100644 --- a/openapi/v2023.8.2/paths/configRedeliverWebhook.yaml +++ b/openapi/v2023.8.2/paths/configRedeliverWebhook.yaml @@ -23,7 +23,7 @@ parameters: schema: type: string responses: - "200": + "204": description: OK content: {} deprecated: false diff --git a/openapi/v2023.8.2/paths/configUpdateIndividual.yaml b/openapi/v2023.8.2/paths/configUpdateIndividual.yaml new file mode 100644 index 0000000..4941c02 --- /dev/null +++ b/openapi/v2023.8.2/paths/configUpdateIndividual.yaml @@ -0,0 +1,50 @@ +tags: + - config +summary: "UPDATE - Update an individual" +operationId: "configUpdateIndividual" +description: "UPDATE - Updates an Individual in the Consent system" +parameters: + - in: path + name: "individualId" + description: "Unique ID of an object" + required: true + schema: + type: string + +x-specification-usecase: "" +x-specification-scenario: "" +x-specification-pii-or-sensitive: "True" +x-specification-crudl-model: "Individual" +responses: + '200': + description: "" + + content: + application/json: + schema: + type: object + properties: + individual: + allOf: + - $ref: "../definitions/Individual.yaml" + - $ref: "../definitions/IndividualExtras.yaml" + + '400': + description: bad input parameter +security: + - BearerAuth: [] + +requestBody: + content: + application/json: + schema: + type: object + properties: + individual: + allOf: + - $ref: "../definitions/Individual.yaml" + - $ref: "../definitions/IndividualExtras.yaml" + description: An object of type Individual + + required: + - individual \ No newline at end of file diff --git a/openapi/v2023.8.2/paths/configUpdateWebhook.yaml b/openapi/v2023.8.2/paths/configUpdateWebhook.yaml index 5af2884..b59b356 100644 --- a/openapi/v2023.8.2/paths/configUpdateWebhook.yaml +++ b/openapi/v2023.8.2/paths/configUpdateWebhook.yaml @@ -14,29 +14,10 @@ requestBody: content: application/json: schema: - required: - - payloadurl - - subscribedevents - - contenttype - - secretkey - - disabled - - skipsslverification type: object properties: - payloadurl: - type: string - subscribedevents: - type: array - items: - type: string - contenttype: - type: string - secretkey: - type: string - disabled: - type: boolean - skipsslverification: - type: boolean + webhook: + $ref: "../definitions/Webhook.yaml" required: true responses: "200": @@ -44,38 +25,10 @@ responses: content: application/json: schema: - required: - - ID - - OrgID - - PayloadURL - - ContentType - - SubscribedEvents - - Disabled - - SecretKey - - SkipSSLVerification - - TimeStamp type: object properties: - ID: - type: string - OrgID: - type: string - PayloadURL: - type: string - ContentType: - type: string - SubscribedEvents: - type: array - items: - type: string - Disabled: - type: boolean - SecretKey: - type: string - SkipSSLVerification: - type: boolean - TimeStamp: - type: string + webhook: + $ref: "../definitions/Webhook.yaml" deprecated: false security: - BearerAuth: [] \ No newline at end of file diff --git a/openapi/v2023.8.2/paths/getWebhookPayloadContentTypes.yaml b/openapi/v2023.8.2/paths/getWebhookPayloadContentTypes.yaml index bba9eee..7162ccc 100644 --- a/openapi/v2023.8.2/paths/getWebhookPayloadContentTypes.yaml +++ b/openapi/v2023.8.2/paths/getWebhookPayloadContentTypes.yaml @@ -1,5 +1,5 @@ operationId: getWebhookPayloadContentTypes.yaml -summary: Get webhook payload content types +summary: LIST - List all webhook payload content types description: Get webhook payload content types tags: - config