Links

8 Service APIs

This section provides a reference for APIs that should be implemented by this Building Block.

8 Service APIs

This section provides a reference for APIs that should be implemented by this Building Block. The APIs defined here establish a blueprint for how the Building Block will interact with other Building Blocks. Additional APIs may be implemented by the Building Block, but the listed APIs define a minimal set of functionality that should be provided by any implementation of this Building Block.
The GovStack non-functional requirements document provides additional information on how 'adaptors' may be used to translate an existing API to the patterns described here. This section also provides guidance on how candidate products are tested and how GovStack validates a product's API against the API specifications defined here.
The tests for the Consent Building Block can be found in this GitHub repository.

8.1 API specification

The following is an automated rendition of our latest OpenAPI YAML specification.

8.1.1 Config APIs

post
https://app.swaggerhub.com/apis/GovStack/consent-management-bb/
/config/policy/
CREATE - Creates a new Policy object and returns the new object and a PolicyRevision
get
https://app.swaggerhub.com/apis/GovStack/consent-management-bb/
/config/policy/{policyId}/
READ - get a Policy object + latest Revision. If a PolicyFilter is supplied and contains a revision_id, then this specific revision is returned.
put
https://app.swaggerhub.com/apis/GovStack/consent-management-bb/
/config/policy/{policyId}/
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.
delete
https://app.swaggerhub.com/apis/GovStack/consent-management-bb/
/config/policy/{policyId}/
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.
get
https://app.swaggerhub.com/apis/GovStack/consent-management-bb/
/config/policy/{policyId}/revisions/
LIST - returns the current Policy
get
https://app.swaggerhub.com/apis/GovStack/consent-management-bb/
/config/policies/
Returns a list of readable Policy objects
Oops, something is missing.We could not find the original source to display this content.
Oops, something is missing.We could not find the original source to display this content.
Oops, something is missing.We could not find the original source to display this content.
Oops, something is missing.We could not find the original source to display this content.
Oops, something is missing.We could not find the original source to display this content.
Oops, something is missing.We could not find the original source to display this content.
Oops, something is missing.We could not find the original source to display this content.
Oops, something is missing.We could not find the original source to display this content.
Oops, something is missing.We could not find the original source to display this content.
Oops, something is missing.We could not find the original source to display this content.
Oops, something is missing.We could not find the original source to display this content.
Oops, something is missing.We could not find the original source to display this content.
Oops, something is missing.We could not find the original source to display this content.

8.1.2 Service APIs

post
https://app.swaggerhub.com/apis/GovStack/consent-management-bb/
/service/individual/
CREATE - Creates an Individual in the Consent system
get
https://app.swaggerhub.com/apis/GovStack/consent-management-bb/
/service/individual/{individualId}/
READ - Fetch an Individual in the Consent system
put
https://app.swaggerhub.com/apis/GovStack/consent-management-bb/
/service/individual/{individualId}/
UPDATE - Updates an Individual in the Consent system
get
https://app.swaggerhub.com/apis/GovStack/consent-management-bb/
/service/individuals/
LIST - lists individuals in the system
Oops, something is missing.We could not find the original source to display this content.
get
https://app.swaggerhub.com/apis/GovStack/consent-management-bb/
/service/policy/{policyId}/
READ - fetches the latest version of a Policy and the presented revisionId of an associated Agreement
Oops, something is missing.We could not find the original source to display this content.
Oops, something is missing.We could not find the original source to display this content.
Oops, something is missing.We could not find the original source to display this content.
Oops, something is missing.We could not find the original source to display this content.
Oops, something is missing.We could not find the original source to display this content.
Oops, something is missing.We could not find the original source to display this content.
delete
https://app.swaggerhub.com/apis/GovStack/consent-management-bb/
/service/individual/record/
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.

8.1.3 Audit APIs

Oops, something is missing.We could not find the original source to display this content.
get
https://app.swaggerhub.com/apis/GovStack/consent-management-bb/
/audit/consentrecord/{consentRecordId}/
READ
Oops, something is missing.We could not find the original source to display this content.
Oops, something is missing.We could not find the original source to display this content.
None
Last modified 3mo ago
Copyright © 2024