diff --git a/openapi/v2023.8.2/bundled.yaml b/openapi/v2023.8.2/bundled.yaml index f46c3b0..1b74ad6 100644 --- a/openapi/v2023.8.2/bundled.yaml +++ b/openapi/v2023.8.2/bundled.yaml @@ -651,10 +651,10 @@ components: description: 'When a timeout occurs, a list of pending operations may be shared' securitySchemes: BearerAuth: + bearerFormat: JWT description: Access token passed with Bearer prefix in Authorization header - type: http scheme: bearer - bearerFormat: JWT + type: http info: contact: email: support@igrant.io @@ -668,14 +668,14 @@ info: version: 2023.8.2 openapi: 3.1.0 paths: - '/audit/data-agreement/{dataAgreementId}': + '/audit/data-agreement-record/{dataAgreementRecordId}': get: - description: READ - Fetch a single data agreement. - operationId: auditReadRecord + description: READ - Fetch a single data agreement record + operationId: auditConsentRecordRead parameters: - description: Unique ID of an object in: path - name: dataAgreementId + name: dataAgreementRecordId required: true schema: type: string @@ -684,23 +684,23 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Agreement' + $ref: '#/components/schemas/ConsentRecord' description: '' '400': description: bad input parameter security: - BearerAuth: [] - summary: READ - Fetch a single data agreement. + summary: READ - Fetch a single data agreement record tags: - auditor x-specification-crudl-model: '' x-specification-pii-or-sensitive: 'False' x-specification-scenario: '' - x-specification-usecase: 'UC-C-PIC-AT-001, UC-C-PIC-AT-003' - /audit/data-agreements/: + x-specification-usecase: '' + /audit/data-agreement-records: post: - description: LIST - Fetch all data agreements stored in the system - operationId: auditAgreementList + description: LIST - Fetch all consent records + operationId: auditConsentRecordList parameters: - description: Requested index for start of resources to be provided in response requested by client in: query @@ -719,11 +719,11 @@ paths: application/json: schema: properties: - agreementFilter: - $ref: '#/components/schemas/AgreementFilter' - description: An object of type AgreementFilter + consentRecordFilter: + $ref: '#/components/schemas/ConsentRecordFilter' + description: An object of type ConsentRecordFilter required: - - agreementFilter + - consentRecordFilter type: object responses: '200': @@ -732,28 +732,28 @@ paths: schema: items: oneOf: - - $ref: '#/components/schemas/Agreement' + - $ref: '#/components/schemas/ConsentRecord' type: array description: '' '400': description: bad input parameter security: - BearerAuth: [] - summary: LIST - Fetch all data agreements stored in the system + summary: LIST - Fetch all consent records tags: - auditor x-specification-crudl-model: '' x-specification-pii-or-sensitive: 'False' x-specification-scenario: '' - x-specification-usecase: 'UC-C-PIC-AT-001, UC-C-PIC-AT-003' - '/audit/data-agreement-record/{dataAgreementRecordId}': + x-specification-usecase: UC-C-PIC-AT-003 + '/audit/data-agreement/{dataAgreementId}': get: - description: READ - Fetch a single data agreement record - operationId: auditConsentRecordRead + description: READ - Fetch a single data agreement. + operationId: auditReadRecord parameters: - description: Unique ID of an object in: path - name: dataAgreementRecordId + name: dataAgreementId required: true schema: type: string @@ -762,23 +762,23 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ConsentRecord' + $ref: '#/components/schemas/Agreement' description: '' '400': description: bad input parameter security: - BearerAuth: [] - summary: READ - Fetch a single data agreement record + summary: READ - Fetch a single data agreement. tags: - auditor x-specification-crudl-model: '' x-specification-pii-or-sensitive: 'False' x-specification-scenario: '' - x-specification-usecase: '' - /audit/data-agreement-records: + x-specification-usecase: 'UC-C-PIC-AT-001, UC-C-PIC-AT-003' + /audit/data-agreements/: post: - description: LIST - Fetch all consent records - operationId: auditConsentRecordList + description: LIST - Fetch all data agreements stored in the system + operationId: auditAgreementList parameters: - description: Requested index for start of resources to be provided in response requested by client in: query @@ -797,11 +797,11 @@ paths: application/json: schema: properties: - consentRecordFilter: - $ref: '#/components/schemas/ConsentRecordFilter' - description: An object of type ConsentRecordFilter + agreementFilter: + $ref: '#/components/schemas/AgreementFilter' + description: An object of type AgreementFilter required: - - consentRecordFilter + - agreementFilter type: object responses: '200': @@ -810,20 +810,20 @@ paths: schema: items: oneOf: - - $ref: '#/components/schemas/ConsentRecord' + - $ref: '#/components/schemas/Agreement' type: array description: '' '400': description: bad input parameter security: - BearerAuth: [] - summary: LIST - Fetch all consent records + summary: LIST - Fetch all data agreements stored in the system tags: - auditor x-specification-crudl-model: '' x-specification-pii-or-sensitive: 'False' x-specification-scenario: '' - x-specification-usecase: UC-C-PIC-AT-003 + x-specification-usecase: 'UC-C-PIC-AT-001, UC-C-PIC-AT-003' /config/data-agreement: post: description: CREATE - Create a new data agreement and returned together with revision @@ -1285,6 +1285,526 @@ paths: x-specification-pii-or-sensitive: 'False' x-specification-scenario: '' x-specification-usecase: UC-C-PIC-A-003 + /onboard/admin/login: + post: + tags: + - onboard + description: Login organisation admin + operationId: loginOrganisationAdmin + parameters: [] + requestBody: + content: + application/json: + schema: + required: + - username + - password + type: object + properties: + username: + type: string + password: + type: string + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + required: + - accessToken + - expiresIn + - refreshExpiresIn + - refreshToken + - tokenType + type: object + title: Token + properties: + accessToken: + type: string + expiresIn: + type: integer + format: int32 + refreshExpiresIn: + type: integer + format: int32 + refreshToken: + type: string + tokenType: + type: string + '401': + description: Unauthorized + content: + application/json: + schema: + required: + - errorCode + - errorDescription + type: object + properties: + errorCode: + type: string + errorDescription: + type: string + deprecated: false + /onboard/individual/login: + post: + tags: + - onboard + description: Login individual + operationId: loginIndividual + parameters: [] + requestBody: + content: + application/json: + schema: + required: + - username + - password + type: object + properties: + username: + type: string + password: + type: string + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + required: + - individual + - token + type: object + properties: + 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 + token: + $ref: '#/paths/~1onboard~1admin~1login/post/responses/200/content/application~1json/schema' + deprecated: false + /onboard/organisation: + get: + deprecated: false + description: Get organization + operationId: getOrganisation + responses: + '200': + content: + application/json: + schema: + properties: + Organization: + required: + - name + - location + - description + - policyUrl + type: object + properties: + id: + type: string + name: + type: string + location: + type: string + policyurl: + type: string + coverImageId: + type: string + coverImageUrl: + type: string + logoImageId: + type: string + logoImageUrl: + type: string + required: + - Organization + type: object + description: OK + security: + - BearerAuth: [] + tags: + - onboard + put: + deprecated: false + description: Update organization + operationId: updateOrganisation + parameters: + - in: path + name: organizationId + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + description: + type: string + location: + type: string + name: + type: string + policyurl: + type: string + required: + - name + - location + - description + - policyurl + type: object + required: true + responses: + '202': + content: {} + description: Accepted + security: + - BearerAuth: [] + tags: + - onboard + /onboard/organisation/coverimage: + get: + deprecated: false + description: Get organization cover image + operationId: getOrganisationCoverImage + responses: + '200': + headers: {} + security: + - BearerAuth: [] + tags: + - onboard + post: + deprecated: false + description: Update organization cover image + operationId: updateOrganisationCoverImage + requestBody: + content: + multipart/form-data: + encoding: {} + schema: + properties: + orgimage: + format: binary + type: string + required: + - orgimage + type: object + required: false + responses: + '200': + content: + application/json: + schema: + properties: + coverImageId: + type: string + coverImageUrl: + type: string + required: + - coverImageId + - coverImageUrl + type: object + description: OK + security: + - BearerAuth: [] + tags: + - onboard + /onboard/organisation/logoimage: + get: + deprecated: false + description: Get organization logo image + operationId: getOrganisationLogoImage + responses: + '200': + headers: {} + security: + - BearerAuth: [] + tags: + - onboard + post: + deprecated: false + description: Update organization logo image + operationId: updateOrganisationLogoImage + parameters: + - in: path + name: organizationId + required: true + schema: + type: string + requestBody: + content: + multipart/form-data: + encoding: {} + schema: + properties: + orgimage: + format: binary + type: string + required: + - orgimage + type: object + required: false + responses: + '200': + content: + application/json: + schema: + properties: + logoImageId: + type: string + logoImageUrl: + type: string + required: + - logoImageId + - logoImageUrl + type: object + description: OK + security: + - BearerAuth: [] + tags: + - onboard + /onboard/token/refresh: + post: + deprecated: false + description: Refresh access token + operationId: refreshToken + parameters: [] + requestBody: + content: + application/json: + schema: + properties: + clientid: + type: string + refreshtoken: + type: string + required: + - refreshtoken + - clientid + type: object + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/paths/~1onboard~1admin~1login/post/responses/200/content/application~1json/schema' + description: OK + security: [] + tags: + - onboard + /onboard/validate/email: + post: + operationId: validateEmail + tags: + - onboard + description: Validate email + parameters: [] + requestBody: + content: + application/json: + schema: + required: + - email + type: object + properties: + email: + type: string + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + required: + - result + - message + type: object + properties: + result: + type: boolean + message: + type: string + example: + result: true + message: Email address is valid and not in use in our system + deprecated: false + security: + - BearerAuth: [] + /onboard/validate/phone: + post: + operationId: validatePhone + tags: + - onboard + description: Validate phone + parameters: [] + requestBody: + content: + application/json: + schema: + required: + - phone + type: object + properties: + phone: + type: string + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + required: + - result + - message + type: object + properties: + result: + type: boolean + message: + type: string + example: + result: false + message: Phone number is in use + deprecated: false + security: + - BearerAuth: [] + /onboard/verify/otp: + post: + operationId: verifyOtp + tags: + - onboard + description: Verify OTP + parameters: [] + requestBody: + content: + application/json: + schema: + required: + - phone + - otp + type: object + properties: + phone: + type: string + otp: + type: string + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + required: + - result + - message + type: object + properties: + result: + type: boolean + message: + type: string + example: + result: true + message: Otp validatiation Succeeded + deprecated: false + security: + - BearerAuth: [] + /onboard/verify/phone: + post: + operationId: verifyPhone + tags: + - onboard + description: For OTP verification of the given phone number + parameters: [] + requestBody: + content: + application/json: + schema: + required: + - email + - phone + type: object + properties: + email: + type: string + phone: + type: string + required: true + responses: + '204': + description: No Content + content: {} + deprecated: false + security: + - BearerAuth: [] '/service/data-agreement/{dataAgreementId}': get: description: READ - Fetches the latest version of an Agreement @@ -1446,42 +1966,57 @@ paths: x-specification-pii-or-sensitive: 'True' x-specification-scenario: '' x-specification-usecase: UC-C-PIC-I-001 - '/service/individual/record/data-agreement/{dataAgreementId}': - get: - description: READ - Fetch the current record for data agreement. There should be one unambiguous ConsentRecord for an Individual and an Agreement. The individualId is supplied as HTTP header. - operationId: serviceReadIndividualRecordRead - parameters: - - description: Unique ID of an object - in: path - name: dataAgreementId - required: true - schema: - type: string + /service/individual/record/data-agreement-record: + post: + description: CREATE - Create a paired consent record and signature object. Returns the same objects with the PK defined. + operationId: serviceCreateIndividualConsentRecordAndSignature + parameters: [] + requestBody: + content: + application/json: + schema: + properties: + consentRecord: + $ref: '#/components/schemas/ConsentRecord' + description: An object of type ConsentRecord + signature: + $ref: '#/components/schemas/Signature' + description: An object of type Signature + required: + - consentRecord + - signature + type: object responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ConsentRecord' + items: + oneOf: + - $ref: '#/components/schemas/ConsentRecord' + - $ref: '#/components/schemas/Revision' + - $ref: '#/components/schemas/Signature' + type: array description: '' '400': description: bad input parameter security: - BearerAuth: [] - summary: READ - Fetch the current record for data agreement + summary: CREATE - Create a paired consent record and signature object tags: - service x-specification-crudl-model: '' x-specification-pii-or-sensitive: 'True' - x-specification-scenario: '' - x-specification-usecase: UC-C-PIC-I-001 - post: - description: 'CREATE - For a particular individual and a particular data agreement, create a new data agreement record pointing to the current revision of a given data agreement. The individualId supplied as HTTP header.' - operationId: serviceCreateIndividualConsentRecord + x-specification-scenario: '1.2' + x-specification-usecase: UC-C-PIC-I-002 + '/service/individual/record/data-agreement-record/{dataAgreementRecordId}': + put: + description: UPDATE* - Update a particular data agreement record. The individualId supplied as HTTP header. Note that updating a signed Consent Record invalidates its signature. + operationId: serviceUpdateIndividualConsentRecord parameters: - description: Unique ID of an object in: path - name: dataAgreementId + name: dataAgreementRecordId required: true schema: type: string @@ -1491,6 +2026,12 @@ paths: required: true schema: type: string + - description: An object with id dataAgreementId + in: query + name: dataAgreementId + required: true + schema: + type: string - description: An object with id revisionId in: query name: revisionId @@ -1512,75 +2053,61 @@ paths: description: bad input parameter security: - BearerAuth: [] - summary: CREATE - Create a data agreement record + summary: UPDATE* - Update a particular data agreement record tags: - service x-specification-crudl-model: '' x-specification-pii-or-sensitive: 'True' - x-specification-scenario: '1.2' - x-specification-usecase: UC-C-PIC-I-002 - '/service/individual/record/data-agreement/{dataAgreementId}/all': - get: - description: LIST - Fetches all data agreement records given to a data agreement. The individualId is supplied as header. - operationId: serviceListIndividualAgreementConsentRecordList + x-specification-scenario: '' + x-specification-usecase: UC-C-PIC-I-003 + '/service/individual/record/data-agreement-record/{dataAgreementRecordId}/signature': + post: + description: CREATE - Creates and returns a blank Signature object for the data agreement record + operationId: serviceCreateIndividualConsentRecordSignature parameters: - description: Unique ID of an object in: path - name: dataAgreementId + name: dataAgreementRecordId required: true schema: type: string - - description: Requested index for start of resources to be provided in response requested by client - in: query - name: offset - required: false - schema: - type: integer - - description: Requested number of resources to be provided in response requested by client - in: query - name: limit - required: false - schema: - type: integer responses: '200': content: application/json: schema: - items: - oneOf: - - $ref: '#/components/schemas/ConsentRecord' - type: array + $ref: '#/components/schemas/Signature' description: '' '400': description: bad input parameter security: - BearerAuth: [] - summary: LIST - Fetches all data agreement records given to a data agreement + summary: CREATE - Creates and returns a blank Signature object for the data agreement record tags: - service x-specification-crudl-model: '' x-specification-pii-or-sensitive: 'True' x-specification-scenario: '' - x-specification-usecase: UC-C-PIC-I-001 - /service/individual/record/data-agreement-record: - post: - description: CREATE - Create a paired consent record and signature object. Returns the same objects with the PK defined. - operationId: serviceCreateIndividualConsentRecordAndSignature - parameters: [] + x-specification-usecase: UC-Post-Partum-001-Registration_PostPartum_and_InfantCare + put: + description: UPDATE - Updates a Signature object for a Consent Record. This is used to add a signature to an existing unsigned Signature object. Consent BB is responsible for updating the Consent Record state. + operationId: serviceUpdateIndividualConsentRecordSignature + parameters: + - description: Unique ID of an object + in: path + name: dataAgreementRecordId + required: true + schema: + type: string requestBody: content: application/json: schema: properties: - consentRecord: - $ref: '#/components/schemas/ConsentRecord' - description: An object of type ConsentRecord signature: $ref: '#/components/schemas/Signature' description: An object of type Signature required: - - consentRecord - signature type: object responses: @@ -1588,77 +2115,55 @@ paths: content: application/json: schema: - items: - oneOf: - - $ref: '#/components/schemas/ConsentRecord' - - $ref: '#/components/schemas/Revision' - - $ref: '#/components/schemas/Signature' - type: array + $ref: '#/components/schemas/Signature' description: '' '400': description: bad input parameter security: - BearerAuth: [] - summary: CREATE - Create a paired consent record and signature object + summary: UPDATE - Updates a Signature object for a Consent Record tags: - service x-specification-crudl-model: '' x-specification-pii-or-sensitive: 'True' - x-specification-scenario: '1.2' - x-specification-usecase: UC-C-PIC-I-002 - /service/individual/record/data-agreement-record/draft: - post: - description: CREATE - Create a DRAFT (unsaved) consent record and signature objects (without a PK) for a given dataAgreementId. - operationId: serviceCreateIndividualConsentRecordDraft + x-specification-scenario: '' + x-specification-usecase: UC-Post-Partum-001-Registration_PostPartum_and_InfantCare + '/service/individual/record/data-agreement/{dataAgreementId}': + get: + description: READ - Fetch the current record for data agreement. There should be one unambiguous ConsentRecord for an Individual and an Agreement. The individualId is supplied as HTTP header. + operationId: serviceReadIndividualRecordRead parameters: - - description: An object with id individualId - in: query - name: individualId - required: true - schema: - type: string - - description: An object with id dataAgreementId - in: query + - description: Unique ID of an object + in: path name: dataAgreementId required: true schema: type: string - - description: An object with id revisionId - in: query - name: revisionId - required: false - schema: - type: string responses: '200': content: application/json: schema: - items: - oneOf: - - $ref: '#/components/schemas/ConsentRecord' - - $ref: '#/components/schemas/Signature' - type: array + $ref: '#/components/schemas/ConsentRecord' description: '' '400': description: bad input parameter security: - BearerAuth: [] - summary: CREATE - Create a DRAFT (unsaved) consent record and signature objects (without a PK) for a given dataAgreementId. + summary: READ - Fetch the current record for data agreement tags: - service x-specification-crudl-model: '' x-specification-pii-or-sensitive: 'True' - x-specification-scenario: '1.2' - x-specification-usecase: UC-C-PIC-I-002 - '/service/individual/record/data-agreement-record/{dataAgreementRecordId}': - put: - description: UPDATE* - Update a particular data agreement record. The individualId supplied as HTTP header. Note that updating a signed Consent Record invalidates its signature. - operationId: serviceUpdateIndividualConsentRecord + x-specification-scenario: '' + x-specification-usecase: UC-C-PIC-I-001 + post: + description: 'CREATE - For a particular individual and a particular data agreement, create a new data agreement record pointing to the current revision of a given data agreement. The individualId supplied as HTTP header.' + operationId: serviceCreateIndividualConsentRecord parameters: - description: Unique ID of an object in: path - name: dataAgreementRecordId + name: dataAgreementId required: true schema: type: string @@ -1668,12 +2173,6 @@ paths: required: true schema: type: string - - description: An object with id dataAgreementId - in: query - name: dataAgreementId - required: true - schema: - type: string - description: An object with id revisionId in: query name: revisionId @@ -1695,81 +2194,57 @@ paths: description: bad input parameter security: - BearerAuth: [] - summary: UPDATE* - Update a particular data agreement record + summary: CREATE - Create a data agreement record tags: - service x-specification-crudl-model: '' x-specification-pii-or-sensitive: 'True' - x-specification-scenario: '' - x-specification-usecase: UC-C-PIC-I-003 - '/service/individual/record/data-agreement-record/{dataAgreementRecordId}/signature': - post: - description: CREATE - Creates and returns a blank Signature object for the data agreement record - operationId: serviceCreateIndividualConsentRecordSignature + x-specification-scenario: '1.2' + x-specification-usecase: UC-C-PIC-I-002 + '/service/individual/record/data-agreement/{dataAgreementId}/all': + get: + description: LIST - Fetches all data agreement records given to a data agreement. The individualId is supplied as header. + operationId: serviceListIndividualAgreementConsentRecordList parameters: - description: Unique ID of an object in: path - name: dataAgreementRecordId + name: dataAgreementId required: true schema: type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Signature' - description: '' - '400': - description: bad input parameter - security: - - BearerAuth: [] - summary: CREATE - Creates and returns a blank Signature object for the data agreement record - tags: - - service - x-specification-crudl-model: '' - x-specification-pii-or-sensitive: 'True' - x-specification-scenario: '' - x-specification-usecase: UC-Post-Partum-001-Registration_PostPartum_and_InfantCare - put: - description: UPDATE - Updates a Signature object for a Consent Record. This is used to add a signature to an existing unsigned Signature object. Consent BB is responsible for updating the Consent Record state. - operationId: serviceUpdateIndividualConsentRecordSignature - parameters: - - description: Unique ID of an object - in: path - name: dataAgreementRecordId - required: true + - description: Requested index for start of resources to be provided in response requested by client + in: query + name: offset + required: false schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - signature: - $ref: '#/components/schemas/Signature' - description: An object of type Signature - required: - - signature - type: object + type: integer + - description: Requested number of resources to be provided in response requested by client + in: query + name: limit + required: false + schema: + type: integer responses: '200': content: application/json: schema: - $ref: '#/components/schemas/Signature' + items: + oneOf: + - $ref: '#/components/schemas/ConsentRecord' + type: array description: '' '400': description: bad input parameter security: - BearerAuth: [] - summary: UPDATE - Updates a Signature object for a Consent Record + summary: LIST - Fetches all data agreement records given to a data agreement tags: - service x-specification-crudl-model: '' x-specification-pii-or-sensitive: 'True' x-specification-scenario: '' - x-specification-usecase: UC-Post-Partum-001-Registration_PostPartum_and_InfantCare + x-specification-usecase: UC-C-PIC-I-001 '/service/individual/{individualId}': delete: description: DELETE - Entirely removes an individual from the system and cascades necessary actions to related ConsentRecord objects @@ -1943,6 +2418,55 @@ paths: x-specification-pii-or-sensitive: 'False' x-specification-scenario: '' x-specification-usecase: UC-C-PIC-A-003 + /service/verification/data-agreement-records: + post: + description: 'LIST - Fetch consent records (latest revision). For a given ConsentRecordFilter, query if consent exists.' + operationId: serviceVerificationConsentRecordList + parameters: + - description: Requested index for start of resources to be provided in response requested by client + in: query + name: offset + required: false + schema: + type: integer + - description: Requested number of resources to be provided in response requested by client + in: query + name: limit + required: false + schema: + type: integer + requestBody: + content: + application/json: + schema: + properties: + consentRecordFilter: + $ref: '#/components/schemas/ConsentRecordFilter' + description: An object of type ConsentRecordFilter + required: + - consentRecordFilter + type: object + responses: + '200': + content: + application/json: + schema: + items: + oneOf: + - $ref: '#/components/schemas/ConsentRecord' + type: array + description: '' + '400': + description: bad input parameter + security: + - BearerAuth: [] + summary: 'LIST - Fetch consent records (latest revision). For a given ConsentRecordFilter, query if consent exists.' + tags: + - service + x-specification-crudl-model: '' + x-specification-pii-or-sensitive: 'True' + x-specification-scenario: '3.1, 1.2' + x-specification-usecase: UC-C-PIC-A-003 '/service/verification/data-agreement/{dataAgreementId}': get: description: READ - Fetch a specific data agreement record (latest revision). The individualId is supplied as HTTP header. @@ -2062,55 +2586,6 @@ paths: x-specification-pii-or-sensitive: 'False' x-specification-scenario: '1.1' x-specification-usecase: UC-C-PIC-A-003 - /service/verification/data-agreement-records: - post: - description: 'LIST - Fetch consent records (latest revision). For a given ConsentRecordFilter, query if consent exists.' - operationId: serviceVerificationConsentRecordList - parameters: - - description: Requested index for start of resources to be provided in response requested by client - in: query - name: offset - required: false - schema: - type: integer - - description: Requested number of resources to be provided in response requested by client - in: query - name: limit - required: false - schema: - type: integer - requestBody: - content: - application/json: - schema: - properties: - consentRecordFilter: - $ref: '#/components/schemas/ConsentRecordFilter' - description: An object of type ConsentRecordFilter - required: - - consentRecordFilter - type: object - responses: - '200': - content: - application/json: - schema: - items: - oneOf: - - $ref: '#/components/schemas/ConsentRecord' - type: array - description: '' - '400': - description: bad input parameter - security: - - BearerAuth: [] - summary: 'LIST - Fetch consent records (latest revision). For a given ConsentRecordFilter, query if consent exists.' - tags: - - service - x-specification-crudl-model: '' - x-specification-pii-or-sensitive: 'True' - x-specification-scenario: '3.1, 1.2' - x-specification-usecase: UC-C-PIC-A-003 servers: - description: Development server url: 'https://api.bb-consent.dev/v2' diff --git a/openapi/v2023.8.2/definitions/Error.yaml b/openapi/v2023.8.2/definitions/Error.yaml new file mode 100644 index 0000000..baa0c60 --- /dev/null +++ b/openapi/v2023.8.2/definitions/Error.yaml @@ -0,0 +1,9 @@ +required: + - errorCode + - errorDescription +type: object +properties: + errorCode: + type: string + errorDescription: + type: string \ No newline at end of file diff --git a/openapi/v2023.8.2/definitions/IndividualExtras.yaml b/openapi/v2023.8.2/definitions/IndividualExtras.yaml new file mode 100644 index 0000000..d840a93 --- /dev/null +++ b/openapi/v2023.8.2/definitions/IndividualExtras.yaml @@ -0,0 +1,58 @@ +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 diff --git a/openapi/v2023.8.2/definitions/Organisation.yaml b/openapi/v2023.8.2/definitions/Organisation.yaml new file mode 100644 index 0000000..0858f25 --- /dev/null +++ b/openapi/v2023.8.2/definitions/Organisation.yaml @@ -0,0 +1,24 @@ +required: + - name + - location + - description + - policyUrl +type: object +properties: + id: + type: string + name: + type: string + location: + type: string + policyurl: + type: string + coverImageId: + type: string + coverImageUrl: + type: string + logoImageId: + type: string + logoImageUrl: + type: string + \ No newline at end of file diff --git a/openapi/v2023.8.2/definitions/Token.yaml b/openapi/v2023.8.2/definitions/Token.yaml new file mode 100644 index 0000000..c192922 --- /dev/null +++ b/openapi/v2023.8.2/definitions/Token.yaml @@ -0,0 +1,21 @@ +required: + - accessToken + - expiresIn + - refreshExpiresIn + - refreshToken + - tokenType +type: object +title: Token +properties: + accessToken: + type: string + expiresIn: + type: integer + format: int32 + refreshExpiresIn: + type: integer + format: int32 + refreshToken: + type: string + tokenType: + type: string diff --git a/openapi/v2023.8.2/index copy.yaml b/openapi/v2023.8.2/index copy.yaml deleted file mode 100644 index add8725..0000000 --- a/openapi/v2023.8.2/index copy.yaml +++ /dev/null @@ -1,2074 +0,0 @@ -openapi: "3.1.0" -info: - version: "2023.8.2" - title: "Consent Building Block APIs" - description: > - The Consent Building Block enables services for individuals to approve the use - of their personal data by defining the principles, functions, and architecture - of an information system. For organisations that process personal data, it - provides the ability to know the individual's will and legitimately process such - personal data. The Consent Building Block is a process-oriented GovStack Building Block - facilitating auditable bilateral agreements within a multi-agent environment that - integrates with most other Building Blocks. - contact: - email: support@igrant.io - name: iGrant.io - url: https://igrant.io - license: - name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0 -servers: - - url: https://api.bb-consent.dev/v2 - description: Development server - - url: https://staging-consent-bb-api.igrant.io/v2 - description: Staging server - - url: https://demo-consent-bb-api.igrant.io/v2 - description: Demo server -tags: - - name: audit - x-tag-expanded: false - description: > - Operations for external auditing systems to query detailed data from the system and subscribe to notifications. - - name: config - x-tag-expanded: false - description: > - Secured operations available to organization API integration - - name: service - x-tag-expanded: false - description: > - Secured operations for individuals, data consumers and applications to record and verify consent - - name: onboard - x-tag-expanded: false - description: > - These are used for onboard the organisation, organisation admin and individual users to the system. - It also deals with all authentication and authorisation APIs that can be configured towards external IDPs. -paths: - /config/policy/: - post: - tags: - - config - summary: "CREATE - Creates a new Policy object and returns the new object and a PolicyRevision" - operationId: "configCreatePolicy" - description: "CREATE - Creates a new Policy object and returns the new object and a PolicyRevision" - parameters: [] - x-specification-usecase: "UC-C-PIC-A-001" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "Policy" - responses: - "200": - description: "A set consisting of the new Policy object created, together with the initial Revision object." - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/Policy" - - $ref: "#/components/schemas/Revision" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - requestBody: - content: - application/json: - schema: - type: object - properties: - policy: - $ref: "#/components/schemas/Policy" - description: An object of type Policy - - required: - - policy - - /config/policy/{policyId}/: - get: - tags: - - config - summary: "READ - get a Policy object + latest Revision. If a PolicyFilter is supplied and contains a revision_id, then this specific revision is returned." - operationId: "configReadPolicy" - description: "READ - get a Policy object + latest Revision. If a PolicyFilter is supplied and contains a revision_id, then this specific revision is returned." - parameters: - - in: path - name: "policyId" - description: "Unique ID of an object" - required: true - schema: - type: string - - - in: query - name: revisionId - description: "An object with id revisionId" - required: false - schema: - type: string - - x-specification-usecase: "UC-C-PIC-A-003" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "Policy" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/Policy" - - $ref: "#/components/schemas/Revision" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - put: - tags: - - config - summary: "UPDATE - Updates an existing Policy object, returning the updated version and a new revision. Updating a Policy does not affect existing references in Agreement, the new revision should be specified for Agreement." - operationId: "configUpdatePolicy" - description: "UPDATE - Updates an existing Policy object, returning the updated version and a new revision. Updating a Policy does not affect existing references in Agreement, the new revision should be specified for Agreement." - parameters: - - in: path - name: "policyId" - description: "Unique ID of an object" - required: true - schema: - type: string - - x-specification-usecase: "UC-C-PIC-A-002" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "Policy" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/Policy" - - $ref: "#/components/schemas/Revision" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - requestBody: - content: - application/json: - schema: - type: object - properties: - policy: - $ref: "#/components/schemas/Policy" - description: An object of type Policy - - required: - - policy - - delete: - tags: - - config - summary: "DELETE - Deletes an existing Policy object, returning the updated version and a new revision. Deleting a Policy is not possible if it's associated with active Agreement." - operationId: "configDeletePolicy" - description: "DELETE - Deletes an existing Policy object, returning the updated version and a new revision. Deleting a Policy is not possible if it's associated with active Agreement." - parameters: - - in: path - name: "policyId" - description: "Unique ID of an object" - required: true - schema: - type: string - - x-specification-usecase: "UC-C-PIC-A-004" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "Policy" - responses: - "200": - description: "" - - content: - application/json: - schema: - $ref: "#/components/schemas/Revision" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - /config/policy/{policyId}/revisions/: - get: - tags: - - config - summary: "LIST - returns the current Policy" - operationId: "configListPolicyRevisions" - description: "LIST - returns the current Policy" - parameters: - - in: path - name: "policyId" - description: "Unique ID of an object" - required: true - schema: - type: string - - - in: query - name: "offset" - description: "Requested index for start of resources to be provided in response requested by client" - required: false - schema: - type: integer - - - in: query - name: "limit" - description: "Requested number of resources to be provided in response requested by client" - required: false - schema: - type: integer - - x-specification-usecase: "UC-C-PIC-A-003" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "Revision" - responses: - "200": - description: "" - - content: - application/json: - schema: - $ref: "#/components/schemas/Policy" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - /config/policies/: - get: - tags: - - config - summary: "Returns a list of readable Policy objects" - operationId: "configListPolicy" - description: "LIST - Fetches list of readable Policy objects" - parameters: - - in: query - name: revisionId - description: "An object with id revisionId" - required: false - schema: - type: string - - - in: query - name: "offset" - description: "Requested index for start of resources to be provided in response requested by client" - required: false - schema: - type: integer - - - in: query - name: "limit" - description: "Requested number of resources to be provided in response requested by client" - required: false - schema: - type: integer - - x-specification-usecase: "UC-C-PIC-A-001, UC-C-PIC-A-002" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "Policy" - responses: - "200": - description: "A list of Policy objects readable for the current session's credentials." - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/Policy" - - "400": - description: bad input parameter - security: - - OAuth2: [admin] - - /config/agreement/{agreementId}/: - get: - tags: - - config - summary: "READ - fetches the latest version of an Agreement" - operationId: "configReadAgreement" - description: "READ - fetches the latest version of an Agreement" - parameters: - - in: path - name: "agreementId" - description: "Unique ID of an object" - required: true - schema: - type: string - - x-specification-usecase: "UC-C-PIC-A-003" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "Agreement" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/Agreement" - - $ref: "#/components/schemas/Revision" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - put: - tags: - - config - summary: "UPDATE - An existing Agreement object is created and returned together with AgreementRevision" - operationId: "configUpdateAgreement" - description: "UPDATE - An existing Agreement object is created and returned together with AgreementRevision" - parameters: - - in: path - name: "agreementId" - description: "Unique ID of an object" - required: true - schema: - type: string - - x-specification-usecase: "UC-C-PIC-A-002" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "Agreement" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/Agreement" - - $ref: "#/components/schemas/Revision" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - requestBody: - content: - application/json: - schema: - type: object - properties: - agreement: - $ref: "#/components/schemas/Agreement" - description: An object of type Agreement - - required: - - agreement - - delete: - tags: - - config - summary: "" - operationId: "configDeleteAgreement" - description: "" - parameters: - - in: path - name: "agreementId" - description: "Unique ID of an object" - required: true - schema: - type: string - - x-specification-usecase: "UC-C-PIC-A-004" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "Agreement" - responses: - "200": - description: "" - - content: - application/json: - schema: - $ref: "#/components/schemas/Revision" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - /config/agreement/: - post: - tags: - - config - summary: "CREATE - A new Agreement object is created and returned together with AgreementRevision" - operationId: "configCreateAgreement" - description: "CREATE - A new Agreement object is created and returned together with AgreementRevision" - parameters: [] - x-specification-usecase: "UC-C-PIC-A-001" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "Agreement" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/Agreement" - - $ref: "#/components/schemas/Revision" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - requestBody: - content: - application/json: - schema: - type: object - properties: - agreement: - $ref: "#/components/schemas/Agreement" - description: An object of type Agreement - - required: - - agreement - - /config/agreements/: - get: - tags: - - config - summary: "LIST - fetch all Agreements" - operationId: "configListAgreement" - description: "LIST - fetch all Agreements" - parameters: - - in: query - name: "offset" - description: "Requested index for start of resources to be provided in response requested by client" - required: false - schema: - type: integer - - - in: query - name: "limit" - description: "Requested number of resources to be provided in response requested by client" - required: false - schema: - type: integer - - x-specification-usecase: "UC-C-PIC-A-003" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "Agreement" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/Agreement" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - post: - tags: - - config - summary: "LIST - fetch Agreements matching AgreementFilter" - operationId: "configListAgreementFilter" - description: "LIST - fetch Agreements matching AgreementFilter" - parameters: - - in: query - name: "offset" - description: "Requested index for start of resources to be provided in response requested by client" - required: false - schema: - type: integer - - - in: query - name: "limit" - description: "Requested number of resources to be provided in response requested by client" - required: false - schema: - type: integer - - x-specification-usecase: "UC-C-PIC-A-003" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "Agreement" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/Agreement" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - requestBody: - content: - application/json: - schema: - type: object - properties: - agreementFilter: - $ref: "#/components/schemas/AgreementFilter" - description: An object of type AgreementFilter - - required: - - agreementFilter - - /service/individual/: - post: - tags: - - service - summary: "CREATE - Creates an Individual in the Consent system" - operationId: "serviceIndividualCreate" - 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: - $ref: "#/components/schemas/Individual" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - requestBody: - content: - application/json: - schema: - type: object - properties: - individual: - $ref: "#/components/schemas/Individual" - description: An object of type Individual - - required: - - individual - - /service/individual/{individualId}/: - get: - tags: - - service - summary: "READ - Fetch an Individual in the Consent system" - operationId: "serviceIndividualRead" - 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: - $ref: "#/components/schemas/Individual" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - put: - tags: - - service - summary: "UPDATE - Updates an Individual in the Consent system" - operationId: "serviceIndividualUpdate" - 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: - $ref: "#/components/schemas/Individual" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - requestBody: - content: - application/json: - schema: - type: object - properties: - individual: - $ref: "#/components/schemas/Individual" - description: An object of type Individual - - required: - - individual - - delete: - tags: - - service - summary: "DELETE - entirely removes an individual from the system and cascades necessary actions to related ConsentRecord objects" - operationId: "serviceIndividualDelete" - description: "DELETE - entirely removes an individual from the system and cascades necessary actions to related ConsentRecord 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: - $ref: "#/components/schemas/Individual" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - /service/individuals/: - get: - tags: - - service - summary: "LIST - lists individuals in the system" - operationId: "serviceIndividualList" - description: "LIST - lists individuals in the system" - parameters: - - in: query - name: "offset" - description: "Requested index for start of resources to be provided in response requested by client" - required: false - schema: - type: integer - - - in: query - name: "limit" - description: "Requested number of resources to be provided in response requested by client" - required: false - schema: - type: integer - - 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: array - items: - oneOf: - - $ref: "#/components/schemas/Individual" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - post: - tags: - - service - summary: "LIST - lists individuals in the system" - operationId: "serviceIndividualListFilter" - description: "LIST - lists individuals in the system" - parameters: - - in: query - name: "offset" - description: "Requested index for start of resources to be provided in response requested by client" - required: false - schema: - type: integer - - - in: query - name: "limit" - description: "Requested number of resources to be provided in response requested by client" - required: false - schema: - type: integer - - 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: array - items: - oneOf: - - $ref: "#/components/schemas/Individual" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - requestBody: - content: - application/json: - schema: - type: object - properties: - individualFilter: - $ref: "#/components/schemas/IndividualFilter" - description: An object of type IndividualFilter - - required: - - individualFilter - - /service/agreement/{agreementId}/: - get: - tags: - - service - summary: "READ - fetches the latest version of an Agreement" - operationId: "serviceAgreementRead" - description: "READ - fetches the latest version of an Agreement" - parameters: - - in: path - name: "agreementId" - description: "Unique ID of an object" - required: true - schema: - type: string - - x-specification-usecase: "UC-C-PIC-A-003" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "Agreement" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/Agreement" - - $ref: "#/components/schemas/Revision" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - /service/policy/{policyId}/: - get: - tags: - - service - summary: "READ - fetches the latest version of a Policy and the presented revisionId of an associated Agreement" - operationId: "servicePolicyRead" - description: "READ - fetches the latest version of a Policy and the presented revisionId of an associated Agreement" - parameters: - - in: path - name: "policyId" - description: "Unique ID of an object" - required: true - schema: - type: string - - - in: query - name: revisionId - description: "An object with id revisionId" - required: false - schema: - type: string - - x-specification-usecase: "UC-C-PIC-A-003" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "Policy" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/Policy" - - $ref: "#/components/schemas/Revision" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - /service/purpose/{purposeId}/: - get: - tags: - - service - summary: "READ - fetches the latest version of an AgreementPurpose and the presented revisionId of that Agreement" - operationId: "serviceAgreementPurposeRead" - description: "READ - fetches the latest version of an AgreementPurpose and the presented revisionId of that Agreement" - parameters: - - in: path - name: "purposeId" - description: "Unique ID of an object" - required: true - schema: - type: string - - - in: query - name: revisionId - description: "An object with id revisionId" - required: false - schema: - type: string - - x-specification-usecase: "UC-C-PIC-A-003" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "AgreementPurpose" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/AgreementPurpose" - - $ref: "#/components/schemas/Revision" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - /service/agreement/{agreementId}/agreementdata/: - get: - tags: - - service - summary: "READ - fetches a list of latest versions of AgreementData associated with an Agreement and the presented revisionId of that Agreement" - operationId: "serviceAgreementDataRead" - description: "READ - fetches a list of latest versions of AgreementData associated with an Agreement and the presented revisionId of that Agreement" - parameters: - - in: path - name: "agreementId" - description: "Unique ID of an object" - required: true - schema: - type: string - - - in: query - name: revisionId - description: "An object with id revisionId" - required: false - schema: - type: string - - x-specification-usecase: "UC-C-PIC-A-003" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "AgreementData" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/AgreementData" - - "400": - description: bad input parameter - security: - - OAuth2: [org] - - /service/verification/agreements/: - get: - tags: - - service - summary: "LIST - Fetch consent records" - operationId: "serviceVerificationAgreementList" - description: "LIST - Fetch consent records" - parameters: - - in: query - name: "offset" - description: "Requested index for start of resources to be provided in response requested by client" - required: false - schema: - type: integer - - - in: query - name: "limit" - description: "Requested number of resources to be provided in response requested by client" - required: false - schema: - type: integer - - x-specification-usecase: "UC-C-PIC-A-003" - x-specification-scenario: "1.1" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/ConsentRecord" - - "400": - description: bad input parameter - security: - - OAuth2: [consumer] - - post: - tags: - - service - summary: "LIST - Fetch consent records for supplied AgreementFilter" - operationId: "serviceVerificationAgreementListFilter" - description: "LIST - Fetch consent records for supplied AgreementFilter" - parameters: - - in: query - name: "offset" - description: "Requested index for start of resources to be provided in response requested by client" - required: false - schema: - type: integer - - - in: query - name: "limit" - description: "Requested number of resources to be provided in response requested by client" - required: false - schema: - type: integer - - x-specification-usecase: "UC-C-PIC-A-003" - x-specification-scenario: "1.1" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/ConsentRecord" - - "400": - description: bad input parameter - security: - - OAuth2: [consumer] - - requestBody: - content: - application/json: - schema: - type: object - properties: - agreementFilter: - $ref: "#/components/schemas/AgreementFilter" - description: An object of type AgreementFilter - - required: - - agreementFilter - - /service/verification/agreement/{agreementId}/: - get: - tags: - - service - summary: "READ - Fetch a specific Consent Record (latest revision). Individual ID supplied as HTTP header." - operationId: "serviceVerificationAgreementConsentRecordRead" - description: "READ - Fetch a specific Consent Record (latest revision). Individual ID supplied as HTTP header." - parameters: - - in: path - name: "agreementId" - description: "Unique ID of an object" - required: true - schema: - type: string - - x-specification-usecase: "UC-C-PIC-A-003" - x-specification-scenario: "1.2" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/ConsentRecord" - - $ref: "#/components/schemas/Revision" - - "400": - description: bad input parameter - security: - - OAuth2: [consumer] - - /service/verification/consentrecords/: - post: - tags: - - service - summary: "LIST - Fetch consent records (latest revision). For a given ConsentRecordFilter, query if consent exists." - operationId: "serviceVerificationConsentRecordList" - description: "LIST - Fetch consent records (latest revision). For a given ConsentRecordFilter, query if consent exists." - parameters: - - in: query - name: "offset" - description: "Requested index for start of resources to be provided in response requested by client" - required: false - schema: - type: integer - - - in: query - name: "limit" - description: "Requested number of resources to be provided in response requested by client" - required: false - schema: - type: integer - - x-specification-usecase: "UC-C-PIC-A-003" - x-specification-scenario: "3.1, 1.2" - x-specification-pii-or-sensitive: "True" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/ConsentRecord" - - "400": - description: bad input parameter - security: - - OAuth2: [consumer] - - requestBody: - content: - application/json: - schema: - type: object - properties: - consentRecordFilter: - $ref: "#/components/schemas/ConsentRecordFilter" - description: An object of type ConsentRecordFilter - - required: - - consentRecordFilter - - /service/individual/record/agreement/{agreementId}/: - post: - tags: - - service - summary: "CREATE - For a particular Individual and a particular Agreement, create a new Consent Record pointing to the current Revision of a given Agreement. Individual ID supplied as HTTP header." - operationId: "serviceCreateIndividualConsentRecord" - description: "CREATE - For a particular Individual and a particular Agreement, create a new Consent Record pointing to the current Revision of a given Agreement. Individual ID supplied as HTTP header." - parameters: - - in: path - name: "agreementId" - description: "Unique ID of an object" - required: true - schema: - type: string - - - in: query - name: individualId - description: "An object with id individualId" - required: true - schema: - type: string - - - in: query - name: revisionId - description: "An object with id revisionId" - required: false - schema: - type: string - - x-specification-usecase: "UC-C-PIC-I-002" - x-specification-scenario: "1.2" - x-specification-pii-or-sensitive: "True" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/ConsentRecord" - - $ref: "#/components/schemas/Revision" - - "400": - description: bad input parameter - security: - - OAuth2: [individual] - - get: - tags: - - service - summary: "READ - Individual ID supplied as HTTP header. Fetches the current ConsentRecord for an Agreement. There should be one unambiguous ConsentRecord for an Individual and an Agreement." - operationId: "serviceReadIndividualRecordRead" - description: "READ - Individual ID supplied as HTTP header. Fetches the current ConsentRecord for an Agreement. There should be one unambiguous ConsentRecord for an Individual and an Agreement." - parameters: - - in: path - name: "agreementId" - description: "Unique ID of an object" - required: true - schema: - type: string - - x-specification-usecase: "UC-C-PIC-I-001" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "True" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - $ref: "#/components/schemas/ConsentRecord" - - "400": - description: bad input parameter - security: - - OAuth2: [individual] - - /service/individual/record/consentrecord/draft/: - post: - tags: - - service - summary: "CREATE - Gets a DRAFT (unsaved) ConsentRecord and Signature objects (without a PK) for a given agreementId." - operationId: "serviceCreateIndividualConsentRecordDraft" - description: "CREATE - Gets a DRAFT (unsaved) ConsentRecord and Signature objects (without a PK) for a given agreementId." - parameters: - - in: query - name: individualId - description: "An object with id individualId" - required: true - schema: - type: string - - - in: query - name: agreementId - description: "An object with id agreementId" - required: true - schema: - type: string - - - in: query - name: revisionId - description: "An object with id revisionId" - required: false - schema: - type: string - - x-specification-usecase: "UC-C-PIC-I-002" - x-specification-scenario: "1.2" - x-specification-pii-or-sensitive: "True" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/ConsentRecord" - - $ref: "#/components/schemas/Signature" - - "400": - description: bad input parameter - security: - - OAuth2: [individual] - - /service/individual/record/consentrecord/: - post: - tags: - - service - summary: "CREATE - Creates a paired ConsentRecord and Signature object. Returns the same objects with the PK defined." - operationId: "serviceCreateIndividualConsentRecordAndSignature" - description: "CREATE - Creates a paired ConsentRecord and Signature object. Returns the same objects with the PK defined." - parameters: [] - x-specification-usecase: "UC-C-PIC-I-002" - x-specification-scenario: "1.2" - x-specification-pii-or-sensitive: "True" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/ConsentRecord" - - $ref: "#/components/schemas/Revision" - - $ref: "#/components/schemas/Signature" - - "400": - description: bad input parameter - security: - - OAuth2: [individual] - - requestBody: - content: - application/json: - schema: - type: object - properties: - consentRecord: - $ref: "#/components/schemas/ConsentRecord" - description: An object of type ConsentRecord - - signature: - $ref: "#/components/schemas/Signature" - description: An object of type Signature - - required: - - consentRecord - - - signature - - /service/individual/record/consentrecord/{consentRecordId}/: - put: - tags: - - service - summary: "UPDATE* - Update a particular Consent Record. Individual ID supplied as HTTP header. Note that updating a signed Consent Record invalidates its signature." - operationId: "serviceUpdateIndividualConsentRecord" - description: "UPDATE* - Update a particular Consent Record. Individual ID supplied as HTTP header. Note that updating a signed Consent Record invalidates its signature." - parameters: - - in: path - name: "consentRecordId" - description: "Unique ID of an object" - required: true - schema: - type: string - - - in: query - name: individualId - description: "An object with id individualId" - required: true - schema: - type: string - - - in: query - name: agreementId - description: "An object with id agreementId" - required: true - schema: - type: string - - - in: query - name: revisionId - description: "An object with id revisionId" - required: false - schema: - type: string - - x-specification-usecase: "UC-C-PIC-I-003" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "True" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/ConsentRecord" - - $ref: "#/components/schemas/Revision" - - "400": - description: bad input parameter - security: - - OAuth2: [individual] - - /service/individual/record/consentrecord/{consentRecordId}/signature/: - post: - tags: - - service - summary: "CREATE - Creates and returns a blank Signature object for the Consent Record." - operationId: "serviceCreateIndividualConsentRecordSignature" - description: "CREATE - Creates and returns a blank Signature object for the Consent Record." - parameters: - - in: path - name: "consentRecordId" - description: "Unique ID of an object" - required: true - schema: - type: string - - x-specification-usecase: "UC-Post-Partum-001-Registration_PostPartum_and_InfantCare" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "True" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - $ref: "#/components/schemas/Signature" - - "400": - description: bad input parameter - security: - - OAuth2: [individual] - - put: - tags: - - service - summary: "UPDATE - Updates a Signature object for a Consent Record. This is used to add a signature to an existing unsigned Signature object. Consent BB is responsible for updating the Consent Record state." - operationId: "serviceUpdateIndividualConsentRecordSignature" - description: "UPDATE - Updates a Signature object for a Consent Record. This is used to add a signature to an existing unsigned Signature object. Consent BB is responsible for updating the Consent Record state." - parameters: - - in: path - name: "consentRecordId" - description: "Unique ID of an object" - required: true - schema: - type: string - - x-specification-usecase: "UC-Post-Partum-001-Registration_PostPartum_and_InfantCare" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "True" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - $ref: "#/components/schemas/Signature" - - "400": - description: bad input parameter - security: - - OAuth2: [individual] - - requestBody: - content: - application/json: - schema: - type: object - properties: - signature: - $ref: "#/components/schemas/Signature" - description: An object of type Signature - - required: - - signature - - /service/individual/record/agreement/{agreementId}/all/: - get: - tags: - - service - summary: "LIST - Fetches all consent records given to a particular agreement. Individual ID supplied as HTTP header." - operationId: "serviceListIndividualAgreementConsentRecordList" - description: "LIST - Fetches all consent records given to a particular agreement. Individual ID supplied as HTTP header." - parameters: - - in: path - name: "agreementId" - description: "Unique ID of an object" - required: true - schema: - type: string - - - in: query - name: "offset" - description: "Requested index for start of resources to be provided in response requested by client" - required: false - schema: - type: integer - - - in: query - name: "limit" - description: "Requested number of resources to be provided in response requested by client" - required: false - schema: - type: integer - - x-specification-usecase: "UC-C-PIC-I-001" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "True" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/ConsentRecord" - - "400": - description: bad input parameter - security: - - OAuth2: [individual] - - /service/individual/record/: - get: - tags: - - service - summary: "LIST - Fetches all current unambiguous consent records stored for Individual ID. Individual ID supplied as HTTP header." - operationId: "serviceListIndividualConsentRecordList" - description: "LIST - Fetches all current unambiguous consent records stored for Individual ID. Individual ID supplied as HTTP header." - parameters: - - in: query - name: "offset" - description: "Requested index for start of resources to be provided in response requested by client" - required: false - schema: - type: integer - - - in: query - name: "limit" - description: "Requested number of resources to be provided in response requested by client" - required: false - schema: - type: integer - - x-specification-usecase: "UC-C-PIC-I-001" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "True" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/ConsentRecord" - - "400": - description: bad input parameter - security: - - OAuth2: [individual] - - delete: - tags: - - service - summary: 'DELETE - Cascading delete operation for Right To Be Forgotten, deletes all Consent Records that shall not be retained and have a "forgettable" Agreement. May also delete an unsigned Consent Record, for instance in cases where the user exits the signing process. Individual ID supplied as HTTP header.' - operationId: "serviceDeleteAllRecords" - description: 'DELETE - Cascading delete operation for Right To Be Forgotten, deletes all Consent Records that shall not be retained and have a "forgettable" Agreement. May also delete an unsigned Consent Record, for instance in cases where the user exits the signing process. Individual ID supplied as HTTP header.' - parameters: [] - x-specification-usecase: "UC-C-PIC-I-003" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "True" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - "400": - description: bad input parameter - security: - - OAuth2: [individual] - - /audit/trackers/: - get: - tags: - - auditor - summary: "LIST - show available AuditTracker objects" - operationId: "auditListTrackers" - description: "LIST - show available AuditTracker objects" - parameters: - - in: query - name: "offset" - description: "Requested index for start of resources to be provided in response requested by client" - required: false - schema: - type: integer - - - in: query - name: "limit" - description: "Requested number of resources to be provided in response requested by client" - required: false - schema: - type: integer - - x-specification-usecase: "UC-C-PIC-AT-001, UC-C-PIC-AT-002" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/AuditTracker" - - "400": - description: bad input parameter - security: - - OAuth2: [] - - /audit/tracker/: - post: - tags: - - auditor - summary: "CREATE - A new AuditTracker is set up" - operationId: "auditCreateTracker" - description: "CREATE - A new AuditTracker is set up" - parameters: [] - x-specification-usecase: "UC-C-PIC-AT-001, UC-C-PIC-AT-002" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - $ref: "#/components/schemas/AuditTracker" - - "400": - description: bad input parameter - security: - - OAuth2: [] - - requestBody: - content: - application/json: - schema: - type: object - properties: - auditTracker: - $ref: "#/components/schemas/AuditTracker" - description: An object of type AuditTracker - - required: - - auditTracker - - /audit/tracker/{trackerId}/: - get: - tags: - - auditor - summary: "READ - get the details of an AuditTracker" - operationId: "auditReadTracker" - description: "READ - get the details of an AuditTracker" - parameters: - - in: path - name: "trackerId" - description: "Unique ID of an object" - required: true - schema: - type: string - - x-specification-usecase: "UC-C-PIC-AT-001, UC-C-PIC-AT-002" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - $ref: "#/components/schemas/AuditTracker" - - "400": - description: bad input parameter - security: - - OAuth2: [] - - put: - tags: - - auditor - summary: "UPDATE - get the details of an AuditTracker" - operationId: "auditUpdateTracker" - description: "UPDATE - get the details of an AuditTracker" - parameters: - - in: path - name: "trackerId" - description: "Unique ID of an object" - required: true - schema: - type: string - - x-specification-usecase: "UC-C-PIC-AT-001, UC-C-PIC-AT-002" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - $ref: "#/components/schemas/AuditTracker" - - "400": - description: bad input parameter - security: - - OAuth2: [] - - requestBody: - content: - application/json: - schema: - type: object - properties: - auditTracker: - $ref: "#/components/schemas/AuditTracker" - description: An object of type AuditTracker - - required: - - auditTracker - - delete: - tags: - - auditor - summary: "DELETE - removes an AuditTracker" - operationId: "auditDeleteTracker" - description: "DELETE - removes an AuditTracker" - parameters: - - in: path - name: "trackerId" - description: "Unique ID of an object" - required: true - schema: - type: string - - x-specification-usecase: "UC-C-PIC-AT-001, UC-C-PIC-AT-002" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - $ref: "#/components/schemas/AuditTracker" - - "400": - description: bad input parameter - security: - - OAuth2: [] - - /audit/consentrecords/: - post: - tags: - - auditor - summary: "LIST - fetch ConsentRecord objects" - operationId: "auditConsentRecordList" - description: "LIST - fetch ConsentRecord objects" - parameters: - - in: query - name: "offset" - description: "Requested index for start of resources to be provided in response requested by client" - required: false - schema: - type: integer - - - in: query - name: "limit" - description: "Requested number of resources to be provided in response requested by client" - required: false - schema: - type: integer - - x-specification-usecase: "UC-C-PIC-AT-003" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/ConsentRecord" - - "400": - description: bad input parameter - security: - - OAuth2: [] - - requestBody: - content: - application/json: - schema: - type: object - properties: - consentRecordFilter: - $ref: "#/components/schemas/ConsentRecordFilter" - description: An object of type ConsentRecordFilter - - required: - - consentRecordFilter - - /audit/consentrecord/{consentRecordId}/: - get: - tags: - - auditor - summary: "READ" - operationId: "auditConsentRecordRead" - description: "READ" - parameters: - - in: path - name: "consentRecordId" - description: "Unique ID of an object" - required: true - schema: - type: string - - x-specification-usecase: "" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - $ref: "#/components/schemas/ConsentRecord" - - "400": - description: bad input parameter - security: - - OAuth2: [] - - /audit/agreements/: - post: - tags: - - auditor - summary: "LIST - fetch all Agreements stored in the system." - operationId: "auditAgreementList" - description: "LIST - fetch all Agreements stored in the system." - parameters: - - in: query - name: "offset" - description: "Requested index for start of resources to be provided in response requested by client" - required: false - schema: - type: integer - - - in: query - name: "limit" - description: "Requested number of resources to be provided in response requested by client" - required: false - schema: - type: integer - - x-specification-usecase: "UC-C-PIC-AT-001, UC-C-PIC-AT-003" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: "#/components/schemas/Agreement" - - "400": - description: bad input parameter - security: - - OAuth2: [] - - requestBody: - content: - application/json: - schema: - type: object - properties: - agreementFilter: - $ref: "#/components/schemas/AgreementFilter" - description: An object of type AgreementFilter - - required: - - agreementFilter - - /audit/agreement/{agreementId}/: - get: - tags: - - auditor - summary: "READ - fetch a single Agreement." - operationId: "auditReadRecord" - description: "READ - fetch a single Agreement." - parameters: - - in: path - name: "agreementId" - description: "Unique ID of an object" - required: true - schema: - type: string - - x-specification-usecase: "UC-C-PIC-AT-001, UC-C-PIC-AT-003" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - content: - application/json: - schema: - $ref: "#/components/schemas/Agreement" - - "400": - description: bad input parameter - security: - - OAuth2: [] - - /status/startup/: - get: - tags: - - status - summary: "DRAFT: This endpoint relates to a proposal for generic liveness/readiness API endpoints for building blocks" - operationId: "statusStartup" - description: "DRAFT: This endpoint relates to a proposal for generic liveness/readiness API endpoints for building blocks" - parameters: [] - x-specification-usecase: "" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - "400": - description: bad input parameter - security: - - OAuth2: [] - - /status/readiness/: - get: - tags: - - status - summary: "DRAFT: This endpoint relates to a proposal for generic liveness/readiness API endpoints for building blocks" - operationId: "statusReadiness" - description: "DRAFT: This endpoint relates to a proposal for generic liveness/readiness API endpoints for building blocks" - parameters: [] - x-specification-usecase: "" - x-specification-scenario: "" - x-specification-pii-or-sensitive: "False" - x-specification-crudl-model: "" - responses: - "200": - description: "" - - "400": - description: bad input parameter - security: - - OAuth2: [] - -components: - schemas: - Individual: - $ref: "./definitions/Individual.yaml" - - Agreement: - $ref: "./definitions/Agreement.yaml" - - AgreementData: - $ref: "./definitions/AgreementData.yaml" - - Policy: - $ref: "./definitions/Policy.yaml" - - ConsentRecord: - $ref: "./definitions/ConsentRecord.yaml" - Revision: - $ref: "./definitions/Revision.yaml" - - AgreementFilter: - $ref: "./definitions/AgreementFilter.yaml" - - ConsentRecordFilter: - $ref: "./definitions/ConsentRecordFilter.yaml" - - Controller: - $ref: "./definitions/Controller.yaml" - - Signature: - $ref: "./definitions/Signature.yaml" - AgreementPurpose: - $ref: "./definitions/AgreementPurpose.yaml" - AgreementLifecycle: - $ref: "./definitions/AgreementLifecycle.yaml" - - IndividualFilter: - $ref: "./definitions/IndividualFilter.yaml" - - AuditTracker: - $ref: "./definitions/AuditTracker.yaml" - AuditEventType: - $ref: "./definitions/AuditEventType.yaml" - - StatusStartup: - $ref: "./definitions/StatusStartup.yaml" - - StatusReadiness: - $ref: "./definitions/StatusReadiness.yaml" - securitySchemes: - BearerAuth: - description: Access token passed with Bearer prefix in Authorization header - type: http - scheme: bearer - bearerFormat: JWT diff --git a/openapi/v2023.8.2/index.yaml b/openapi/v2023.8.2/index.yaml index 54ca973..8863550 100644 --- a/openapi/v2023.8.2/index.yaml +++ b/openapi/v2023.8.2/index.yaml @@ -36,23 +36,22 @@ components: $ref: ./definitions/StatusStartup.yaml securitySchemes: BearerAuth: + bearerFormat: JWT description: Access token passed with Bearer prefix in Authorization header - type: http scheme: bearer - bearerFormat: JWT + type: http info: contact: email: support@igrant.io name: iGrant.io url: https://igrant.io - description: - "The Consent Building Block enables services for individuals to approve + description: The Consent Building Block enables services for individuals to approve the use of their personal data by defining the principles, functions, and architecture of an information system. For organisations that process personal data, it provides the ability to know the individual's will and legitimately process such personal data. The Consent Building Block is a process-oriented GovStack Building Block facilitating auditable bilateral data-agreements within a multi-agent environment that integrates - with most other Building Blocks." + with most other Building Blocks. license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 @@ -60,18 +59,18 @@ info: version: 2023.8.2 openapi: 3.1.0 paths: - /audit/data-agreement/{dataAgreementId}: - get: - $ref: ./paths/auditReadRecord.yaml - /audit/data-agreements/: - post: - $ref: ./paths/auditAgreementList.yaml /audit/data-agreement-record/{dataAgreementRecordId}: get: $ref: ./paths/auditConsentRecordRead.yaml /audit/data-agreement-records: post: $ref: ./paths/auditConsentRecordList.yaml + /audit/data-agreement/{dataAgreementId}: + get: + $ref: ./paths/auditReadRecord.yaml + /audit/data-agreements/: + post: + $ref: ./paths/auditAgreementList.yaml /config/data-agreement: post: $ref: ./paths/configCreateAgreement.yaml @@ -103,6 +102,42 @@ paths: /config/policy/{policyId}/revisions: get: $ref: ./paths/configListPolicyRevisions.yaml + /onboard/admin/login: + post: + $ref: ./paths/loginOrganisationAdmin.yaml + /onboard/individual/login: + post: + $ref: ./paths/loginIndividual.yaml + /onboard/organisation: + get: + $ref: ./paths/getOrganisation.yaml + put: + $ref: ./paths/updateOrganisation.yaml + /onboard/organisation/coverimage: + get: + $ref: ./paths/getOrganisationCoverImage.yaml + post: + $ref: ./paths/updateOrganisationCoverImage.yaml + /onboard/organisation/logoimage: + get: + $ref: ./paths/getOrganisationLogoImage.yaml + post: + $ref: ./paths/updateOrganisationLogoImage.yaml + /onboard/token/refresh: + post: + $ref: ./paths/refreshToken.yaml + /onboard/validate/email: + post: + $ref: ./paths/validateEmail.yaml + /onboard/validate/phone: + post: + $ref: ./paths/validatePhone.yaml + /onboard/verify/otp: + post: + $ref: ./paths/verifyOtp.yaml + /onboard/verify/phone: + post: + $ref: ./paths/verifyPhone.yaml /service/data-agreement/{dataAgreementId}: get: $ref: ./paths/serviceAgreementRead.yaml @@ -117,20 +152,9 @@ paths: $ref: ./paths/serviceDeleteAllRecords.yaml get: $ref: ./paths/serviceListIndividualConsentRecordList.yaml - /service/individual/record/data-agreement/{dataAgreementId}: - get: - $ref: ./paths/serviceReadIndividualRecordRead.yaml - post: - $ref: ./paths/serviceCreateIndividualConsentRecord.yaml - /service/individual/record/data-agreement/{dataAgreementId}/all: - get: - $ref: ./paths/serviceListIndividualAgreementConsentRecordList.yaml /service/individual/record/data-agreement-record: post: $ref: ./paths/serviceCreateIndividualConsentRecordAndSignature.yaml - /service/individual/record/data-agreement-record/draft: - post: - $ref: ./paths/serviceCreateIndividualConsentRecordDraft.yaml /service/individual/record/data-agreement-record/{dataAgreementRecordId}: put: $ref: ./paths/serviceUpdateIndividualConsentRecord.yaml @@ -139,6 +163,14 @@ paths: $ref: ./paths/serviceCreateIndividualConsentRecordSignature.yaml put: $ref: ./paths/serviceUpdateIndividualConsentRecordSignature.yaml + /service/individual/record/data-agreement/{dataAgreementId}: + get: + $ref: ./paths/serviceReadIndividualRecordRead.yaml + post: + $ref: ./paths/serviceCreateIndividualConsentRecord.yaml + /service/individual/record/data-agreement/{dataAgreementId}/all: + get: + $ref: ./paths/serviceListIndividualAgreementConsentRecordList.yaml /service/individual/{individualId}: delete: $ref: ./paths/serviceIndividualDelete.yaml @@ -152,6 +184,9 @@ paths: /service/policy/{policyId}: get: $ref: ./paths/servicePolicyRead.yaml + /service/verification/data-agreement-records: + post: + $ref: ./paths/serviceVerificationConsentRecordList.yaml /service/verification/data-agreement/{dataAgreementId}: get: $ref: ./paths/serviceVerificationAgreementConsentRecordRead.yaml @@ -160,33 +195,27 @@ paths: $ref: ./paths/serviceVerificationAgreementList.yaml post: $ref: ./paths/serviceVerificationAgreementListFilter.yaml - /service/verification/data-agreement-records: - post: - $ref: ./paths/serviceVerificationConsentRecordList.yaml servers: - - description: Development server - url: https://api.bb-consent.dev/v2 - - description: Staging server - url: https://staging-consent-bb-api.igrant.io/v2 - - description: Demo server - url: https://demo-consent-bb-api.igrant.io/v2 +- description: Development server + url: https://api.bb-consent.dev/v2 +- description: Staging server + url: https://staging-consent-bb-api.igrant.io/v2 +- description: Demo server + url: https://demo-consent-bb-api.igrant.io/v2 tags: - - description: - "Operations for external auditing systems to query detailed data from - the system and subscribe to notifications." - name: audit - x-tag-expanded: false - - description: "Secured operations available to organization API integration" - name: config - x-tag-expanded: false - - description: - "Secured operations for individuals, data consumers and applications - to record and verify consent" - name: service - x-tag-expanded: false - - description: - "These are used for onboard the organisation, organisation admin and - individual users to the system. It also deals with all authentication and authorisation - APIs that can be configured towards external IDPs." - name: onboard - x-tag-expanded: false +- description: Operations for external auditing systems to query detailed data from + the system and subscribe to notifications. + name: audit + x-tag-expanded: false +- description: Secured operations available to organization API integration + name: config + x-tag-expanded: false +- description: Secured operations for individuals, data consumers and applications + to record and verify consent + name: service + x-tag-expanded: false +- description: These are used for onboard the organisation, organisation admin and + individual users to the system. It also deals with all authentication and authorisation + APIs that can be configured towards external IDPs. + name: onboard + x-tag-expanded: false diff --git a/openapi/v2023.8.2/paths/getOrganisation.yaml b/openapi/v2023.8.2/paths/getOrganisation.yaml new file mode 100644 index 0000000..7fb5736 --- /dev/null +++ b/openapi/v2023.8.2/paths/getOrganisation.yaml @@ -0,0 +1,19 @@ +deprecated: false +description: Get organization +operationId: getOrganisation +responses: + '200': + content: + application/json: + schema: + properties: + Organization: + $ref: ../definitions/Organisation.yaml + required: + - Organization + type: object + description: OK +security: +- BearerAuth: [] +tags: +- onboard diff --git a/openapi/v2023.8.2/paths/getOrganisationCoverImage.yaml b/openapi/v2023.8.2/paths/getOrganisationCoverImage.yaml new file mode 100644 index 0000000..1497cd6 --- /dev/null +++ b/openapi/v2023.8.2/paths/getOrganisationCoverImage.yaml @@ -0,0 +1,10 @@ +deprecated: false +description: Get organization cover image +operationId: getOrganisationCoverImage +responses: + '200': + headers: {} +security: +- BearerAuth: [] +tags: +- onboard diff --git a/openapi/v2023.8.2/paths/getOrganisationLogoImage.yaml b/openapi/v2023.8.2/paths/getOrganisationLogoImage.yaml new file mode 100644 index 0000000..6b5c9ff --- /dev/null +++ b/openapi/v2023.8.2/paths/getOrganisationLogoImage.yaml @@ -0,0 +1,10 @@ +deprecated: false +description: Get organization logo image +operationId: getOrganisationLogoImage +responses: + '200': + headers: {} +security: +- BearerAuth: [] +tags: +- onboard diff --git a/openapi/v2023.8.2/paths/loginIndividual.yaml b/openapi/v2023.8.2/paths/loginIndividual.yaml new file mode 100644 index 0000000..267caeb --- /dev/null +++ b/openapi/v2023.8.2/paths/loginIndividual.yaml @@ -0,0 +1,37 @@ +tags: + - onboard +description: Login individual +operationId: loginIndividual +parameters: [] +requestBody: + content: + application/json: + schema: + required: + - username + - password + type: object + properties: + username: + type: string + password: + type: string + required: true +responses: + "200": + description: OK + content: + application/json: + schema: + required: + - individual + - token + type: object + properties: + individual: + allOf: + - $ref: "../definitions/Individual.yaml" + - $ref: "../definitions/IndividualExtras.yaml" + token: + $ref: "../definitions/Token.yaml" +deprecated: false diff --git a/openapi/v2023.8.2/paths/loginOrganisationAdmin.yaml b/openapi/v2023.8.2/paths/loginOrganisationAdmin.yaml new file mode 100644 index 0000000..71e7360 --- /dev/null +++ b/openapi/v2023.8.2/paths/loginOrganisationAdmin.yaml @@ -0,0 +1,34 @@ +tags: + - onboard +description: Login organisation admin +operationId: loginOrganisationAdmin +parameters: [] +requestBody: + content: + application/json: + schema: + required: + - username + - password + type: object + properties: + username: + type: string + password: + type: string + required: true +responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "../definitions/Token.yaml" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "../definitions/Error.yaml" + +deprecated: false diff --git a/openapi/v2023.8.2/paths/refreshToken.yaml b/openapi/v2023.8.2/paths/refreshToken.yaml new file mode 100644 index 0000000..7434100 --- /dev/null +++ b/openapi/v2023.8.2/paths/refreshToken.yaml @@ -0,0 +1,28 @@ +deprecated: false +description: Refresh access token +operationId: refreshToken +parameters: [] +requestBody: + content: + application/json: + schema: + properties: + clientid: + type: string + refreshtoken: + type: string + required: + - refreshtoken + - clientid + type: object + required: true +responses: + "200": + content: + application/json: + schema: + $ref: "../definitions/Token.yaml" + description: OK +security: [] +tags: + - onboard diff --git a/openapi/v2023.8.2/paths/updateOrganisation.yaml b/openapi/v2023.8.2/paths/updateOrganisation.yaml new file mode 100644 index 0000000..feba445 --- /dev/null +++ b/openapi/v2023.8.2/paths/updateOrganisation.yaml @@ -0,0 +1,37 @@ +deprecated: false +description: Update organization +operationId: updateOrganisation +parameters: +- in: path + name: organizationId + required: true + schema: + type: string +requestBody: + content: + application/json: + schema: + properties: + description: + type: string + location: + type: string + name: + type: string + policyurl: + type: string + required: + - name + - location + - description + - policyurl + type: object + required: true +responses: + '202': + content: {} + description: Accepted +security: +- BearerAuth: [] +tags: +- onboard diff --git a/openapi/v2023.8.2/paths/updateOrganisationCoverImage.yaml b/openapi/v2023.8.2/paths/updateOrganisationCoverImage.yaml new file mode 100644 index 0000000..7cf5af7 --- /dev/null +++ b/openapi/v2023.8.2/paths/updateOrganisationCoverImage.yaml @@ -0,0 +1,35 @@ +deprecated: false +description: Update organization cover image +operationId: updateOrganisationCoverImage +requestBody: + content: + multipart/form-data: + encoding: {} + schema: + properties: + orgimage: + format: binary + type: string + required: + - orgimage + type: object + required: false +responses: + '200': + content: + application/json: + schema: + properties: + coverImageId: + type: string + coverImageUrl: + type: string + required: + - coverImageId + - coverImageUrl + type: object + description: OK +security: +- BearerAuth: [] +tags: +- onboard diff --git a/openapi/v2023.8.2/paths/updateOrganisationLogoImage.yaml b/openapi/v2023.8.2/paths/updateOrganisationLogoImage.yaml new file mode 100644 index 0000000..fcddd27 --- /dev/null +++ b/openapi/v2023.8.2/paths/updateOrganisationLogoImage.yaml @@ -0,0 +1,41 @@ +deprecated: false +description: Update organization logo image +operationId: updateOrganisationLogoImage +parameters: +- in: path + name: organizationId + required: true + schema: + type: string +requestBody: + content: + multipart/form-data: + encoding: {} + schema: + properties: + orgimage: + format: binary + type: string + required: + - orgimage + type: object + required: false +responses: + '200': + content: + application/json: + schema: + properties: + logoImageId: + type: string + logoImageUrl: + type: string + required: + - logoImageId + - logoImageUrl + type: object + description: OK +security: +- BearerAuth: [] +tags: +- onboard diff --git a/openapi/v2023.8.2/paths/validateEmail.yaml b/openapi/v2023.8.2/paths/validateEmail.yaml new file mode 100644 index 0000000..8544f00 --- /dev/null +++ b/openapi/v2023.8.2/paths/validateEmail.yaml @@ -0,0 +1,37 @@ +operationId: validateEmail +tags: + - onboard +description: Validate email +parameters: [] +requestBody: + content: + application/json: + schema: + required: + - email + type: object + properties: + email: + type: string + required: true +responses: + "200": + description: OK + content: + application/json: + schema: + required: + - result + - message + type: object + properties: + result: + type: boolean + message: + type: string + example: + result: true + message: Email address is valid and not in use in our system +deprecated: false +security: + - BearerAuth: [] \ No newline at end of file diff --git a/openapi/v2023.8.2/paths/validatePhone.yaml b/openapi/v2023.8.2/paths/validatePhone.yaml new file mode 100644 index 0000000..a333326 --- /dev/null +++ b/openapi/v2023.8.2/paths/validatePhone.yaml @@ -0,0 +1,37 @@ +operationId: validatePhone +tags: + - onboard +description: Validate phone +parameters: [] +requestBody: + content: + application/json: + schema: + required: + - phone + type: object + properties: + phone: + type: string + required: true +responses: + "200": + description: OK + content: + application/json: + schema: + required: + - result + - message + type: object + properties: + result: + type: boolean + message: + type: string + example: + result: false + message: Phone number is in use +deprecated: false +security: + - BearerAuth: [] \ No newline at end of file diff --git a/openapi/v2023.8.2/paths/verifyOtp.yaml b/openapi/v2023.8.2/paths/verifyOtp.yaml new file mode 100644 index 0000000..6e80625 --- /dev/null +++ b/openapi/v2023.8.2/paths/verifyOtp.yaml @@ -0,0 +1,40 @@ +operationId: verifyOtp +tags: + - onboard +description: Verify OTP +parameters: [] +requestBody: + content: + application/json: + schema: + required: + - phone + - otp + type: object + properties: + phone: + type: string + otp: + type: string + required: true +responses: + "200": + description: OK + content: + application/json: + schema: + required: + - result + - message + type: object + properties: + result: + type: boolean + message: + type: string + example: + result: true + message: Otp validatiation Succeeded +deprecated: false +security: + - BearerAuth: [] \ No newline at end of file diff --git a/openapi/v2023.8.2/paths/verifyPhone.yaml b/openapi/v2023.8.2/paths/verifyPhone.yaml new file mode 100644 index 0000000..5dd0cad --- /dev/null +++ b/openapi/v2023.8.2/paths/verifyPhone.yaml @@ -0,0 +1,26 @@ +operationId: verifyPhone +tags: + - onboard +description: For OTP verification of the given phone number +parameters: [] +requestBody: + content: + application/json: + schema: + required: + - email + - phone + type: object + properties: + email: + type: string + phone: + type: string + required: true +responses: + "204": + description: No Content + content: {} +deprecated: false +security: + - BearerAuth: []