---
id: service-agreement-read
title: "Read data agreement"
description: "This endpoint is used to read the data agreement defined by the organisation in consent building block."
sidebar_label: "Read data agreement"
hide_title: true
hide_table_of_contents: true
api: eJztXN1yG7eSfpWuubGUGlE/tmSHderU0pId03FirX7i2kSuBJxpkogwwATAkGJUvDtPso+2T7LVAOaXI1mKdc7F2c2FQ3IGjUaju9H9dUO3UYom0Ty3XMloGF3MuQGUaa64tMANFAZTsAo0shTsHCFllgGbacQMpYUUp1xiCpOVe6r0jEluGJEDLiFR0tBrk4KLlMsZTIRKrgdRHKkctXttnEbDyKBe8ARHJd0zZGkURznTLEOL2kTDX247vF5K/keBMD4BNQUmQU1+x8RGccTpac7sPIojyTKMhhFxXREfE2mNfxRcYxoNrS4wjkwyx4xFw9vIrnIaYqzmchat15/pZZPTSgw9P9jbo/8lSlqUlj6yPBc8cavZ/d0Qc7cNetxi5gbmmhZtuSfTYqkxb7UMy62gH05aL8YdKYxkYzeIJ8alcXthckz4NPDlZASGy5lAyAudK4Ng58xCwiRMsNwpt9sDgBG0pnWqIPkCtWECmEz7hpESfJMxufoGuEz5gqcFE8SLVsVsDqxN8gwTpdPBlYzi6GZHKrvD5Q4JZcIMRsMpEwab2/RLFNgmvfCfThqSiN2GaCUE6kstWt9/JCWIo1wJnqyiOBJsOS3Ea2a4ieIoQztX6cfppSPNEssX9GGq9AytZRNB3wSfYrJKBEaf485G8nRTa9zwjNloGEVxhDcsy91eHh2+eLl/cHCAr5KXyfPJ5HlykLx68e3BxrZG6zgiaXOvTQ+jvj/YG+xtkLqYIwRSpAWWTLytG1bBcs4T2iKNCfLcaRLNYYiPWpDj3qW2p/P2SApYj2tToe35IpnLsw9Ex7mbeihsZWxFeqcybknr+BSk8m9xuVBigel2eza3+V+cjt76mvmCbg27TurU/Q6FTFEHIbsNaFuXmTMhaJqZWqCWmA4APs1RQqKRWfKbrON4YydhwSwaC37y0iRLlz3lQniXjVNWCAsLJgqMwZlvy1GzNCNfzSSkmPAUaXQyZ3KGwC258R7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xxu7mgnHZuAfrPesvUX0ZoO1bozgadv9qxOc4mitjadjtLUVxl1qs1/TzHwVq5+/jaME09/VMcsDc0Oe0HzpoSmXrLJya23DnH7boXU/pOCV5TefmfPh8TX514w9fuBpBcArEoH+LvEtuG+M3Dvh182z67g05KBa8V+25r53nDh8aAH6bt64T9yzQv42LXe0hfyP1/B5Xf69e90/uHFC5Pf82SYoA3/8FTuD1Iw==
sidebar_class_name: "get api-method"
info_path: docs/consent-management-individual-api/igrant-io-api-documentation
custom_edit_url: null
---

> **Build this with an AI coding agent.** Install the iGrant.io Agent Skills, then ask your agent to build the integration:
>
> ```bash
> npx skills add L3-iGrant/skills
> ```


import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Markdown from "@theme/Markdown";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";

<h1 className={"openapi__heading"}>Read data agreement</h1>

<MethodEndpoint method={"get"} path={"/service/data-agreement/{dataAgreementId}"}></MethodEndpoint>



This endpoint is used to read the data agreement defined by the organisation in consent building block.

## Request

<details style={{"marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collapsed={false} open={true}><summary style={{}}><h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3></summary><div><ul><ParamsItem className={"paramsItem"} param={{"description":"Unique ID of an object","in":"path","name":"dataAgreementId","required":true,"schema":{"type":"string"}}}></ParamsItem></ul></div></details><div><div><ApiTabs label={undefined} id={undefined}><TabItem label={"200"} value={"200"}><div>

Data agreement (based on ISO 27560) retrieved successfully

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>dataAgreement</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

An agreement contains the specification of a single purpose that can be consented to.  A DataAgreement is universal and can be consented to by *many* individuals through a DataAgreementRecord.


</div><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"65471222e8c7c3bb3c2c8492","description":""}}></SchemaItem><SchemaItem collapsible={false} name={"version"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"1.0.0","description":"The version of this specification to which a receipt conforms"}}></SchemaItem><SchemaItem collapsible={false} name={"controllerId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"ID of the controller"}}></SchemaItem><SchemaItem collapsible={false} name={"controllerUrl"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"URL of data controller (may be omitted if no data involved)"}}></SchemaItem><SchemaItem collapsible={false} name={"controllerName"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Name of data controller (may be omitted if no data involved)"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>policy</strong><span className={"openapi-schema__name"}> object</span><span className={"openapi-schema__divider"}></span><span className={"openapi-schema__required"}>required</span></span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

Policy under which this DataAgreement shall be governed.  When creating a data agreement, the latest policy can be used to fill the default value,  and organisation admin can decide to change it in the data agreement level.


</div><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"65471222e8c7c3bb3c2c7701","description":""}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"Default data policy","description":"Name of the policy"}}></SchemaItem><SchemaItem collapsible={false} name={"version"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"1.0.0","description":"Version of the policy (it can follow the semver format)"}}></SchemaItem><SchemaItem collapsible={false} name={"url"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"https://example.com/privacy-policy","description":"Permanent URL at which this very version of the Policy can be read, should not be allowed to change over time"}}></SchemaItem><SchemaItem collapsible={false} name={"jurisdiction"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"EU","description":"Jurisdiction"}}></SchemaItem><SchemaItem collapsible={false} name={"industrySector"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"Healthcare","description":"Industry sector"}}></SchemaItem><SchemaItem collapsible={false} name={"dataRetentionPeriodDays"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","format":"","example":365,"description":"Data retention period in days"}}></SchemaItem><SchemaItem collapsible={false} name={"geographicRestriction"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"EU","description":"Geographic restriction"}}></SchemaItem><SchemaItem collapsible={false} name={"storageLocation"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"EU","description":"Storage location"}}></SchemaItem><SchemaItem collapsible={false} name={"thirdPartyDataSharing"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","format":"","example":true,"description":"Third party data sharing"}}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={false} name={"dataAttributes"} required={false} schemaName={"object[]"} qualifierMessage={undefined} schema={{"type":"array","items":{"allOf":[{"type":"object","description":"Data attributes contain specifications of exactly what is collected.","x-not-in-database":false,"required":["name","description"],"properties":{"id":{"type":"string","format":"","example":"65471222e8c7c3bb3c2c8501","description":"Data attribute ID"},"name":{"type":"string","format":"","example":"Name","description":"Name of the attribute, for instance \"name\" or \"age\""},"description":{"type":"string","format":"","example":"Full name of the individual","description":"Description of the attribute"},"sensitivity":{"type":"boolean","format":"","example":false,"description":"Sensitivity of data attribute"},"category":{"type":"string","format":"","example":"Personal","description":"Category of data attribute"},"scope":{"type":"string","format":"","example":"read","description":"Scope required for data attribute"}}},{"type":"object","properties":{"restrictions":{"type":"array","items":{"type":"object","description":"List of restrictions","x-not-in-database":false,"properties":{"credDefId":{"type":"string","format":"","example":"H3DW1MUWZyBkP5LG4rTYRH:3:CL:80:default","description":"Credential definition ID"},"schemaId":{"type":"string","format":"","example":"H3DW1MUWZyBkP5LG4rTYRH:2:Certificate Of Registration:6.0.0","description":"Schema ID"}}}}}}]},"description":"Data attributes contain specifications of exactly what is collected.\n"}}></SchemaItem><SchemaItem collapsible={false} name={"purpose"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Name of purpose"}}></SchemaItem><SchemaItem collapsible={false} name={"purposeDescription"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Description of purpose"}}></SchemaItem><SchemaItem collapsible={false} name={"lawfulBasis"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`consent`, `legal_obligation`, `contract`, `vital_interest`, `public_task`, `legitimate_interest`]"} schema={{"type":"string","format":"","example":"","description":"Lawful basis of the agreement - consent / legal_obligation / contract / vital_interest / public_task / legitimate_interest","enum":["consent","legal_obligation","contract","vital_interest","public_task","legitimate_interest"]}}></SchemaItem><SchemaItem collapsible={false} name={"methodOfUse"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`null`, `data_source`, `data_using_service`]"} schema={{"type":"string","format":"","example":"","description":"Method of use - null / data_source / data_using_service","enum":[null,"data_source","data_using_service"]}}></SchemaItem><SchemaItem collapsible={false} name={"dpiaDate"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"","description":"The date on which the DPIA report is generated after a DPIA"}}></SchemaItem><SchemaItem collapsible={false} name={"dpiaSummaryUrl"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The URl providing the DPIA result reports, summary etc that can be verified by any interested parties"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>signature</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

Signature of authorising party of DataAgreement (Signatures may be chained in the case of multiple signatures)


</div><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"65471222e8c7c3bb3c2c5501","description":"Objects may be passed back by some API endpoints without an id (PK), denoting that they are a \"draft\", i.e. a Signature that is not yet stored in the database and only exists in transit."}}></SchemaItem><SchemaItem collapsible={false} name={"payload"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"{...}","description":"The final payload that is signed, constructed as a JSON serialisation of fields {verificationPayload: ..., verificationPayloadHash: ..., verificationMethod: ..., verificationArtifact: ..., verificationSignedBy: ..., verificationJwsHeader, timestamp: ..., signedWithoutObjectReference: ..., objectType: ..., objectReference: ...}. Serialised as a JSON dict. If the signature is generated before anything is stored in the database (and has a PK), then the objectReference should be omitted from the payload but filled in afterwards."}}></SchemaItem><SchemaItem collapsible={false} name={"signature"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"eyJhbGciOiJFZERTQSJ9...","description":"Signature of payload hash, the format of the signature should be specified by either verificationMethod or verificationJwsHeader"}}></SchemaItem><SchemaItem collapsible={false} name={"verificationMethod"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"Ed25519Signature2020","description":"A well-known string denoting which method is used. Valid values: TBD. This might be expanded with supported verification methods. There may be a minimal set of supported methods necessary."}}></SchemaItem><SchemaItem collapsible={false} name={"verificationPayload"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"{...}","description":"Internally generated serialised version of the data referenced by objectType and objectReference - by extracting and serialising their data as JSON"}}></SchemaItem><SchemaItem collapsible={false} name={"verificationPayloadHash"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"a1b2c3d4e5f6...","description":"Internally generated cryptographic hash of the value to be signed, i.e. the value of verificationPayload"}}></SchemaItem><SchemaItem collapsible={false} name={"verificationArtifact"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"","description":"A verification artifact in the form of a scanned object, image, signature etc"}}></SchemaItem><SchemaItem collapsible={false} name={"verificationSignedBy"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"did:key:z6Mkf...","description":"Because an identifier's information may change over time, there is a need to store that information at the time of signing. In the case of a cryptographic signature, this field should contain some identifier for looking up or verifying the public key of the signing party. In the case of a non-cryptographic signature, this field could contain a natural individual's names, personal number, email addresses - store a snapshot that binds to the signature at the time of signing. In the case of a cryptographic signature, this may be the fingerprint of the individual's public key or in some cases, a token from the user's ID session."}}></SchemaItem><SchemaItem collapsible={false} name={"verificationSignedAs"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"individual","description":"DRAFT FIELD: Specifies the relationship between the authorising signature and the invidual which the payload concerns. This is relevant for Consent Records. Possible values: \"individual\" / \"delegate\"."}}></SchemaItem><SchemaItem collapsible={false} name={"verificationJwsHeader"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"","description":"Alternative to the verificationMethod, verificationHash and verificationSignature, give a JWS serialised object (RFC7515)"}}></SchemaItem><SchemaItem collapsible={false} name={"timestamp"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"2024-01-15T10:30:00Z","description":"Timestamp of signature, currently this field isn't part of the payload so it's not tamper-proof"}}></SchemaItem><SchemaItem collapsible={false} name={"signedWithoutObjectReference"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","format":"","example":false,"description":"Indicates that objectReference was left blank in the serialised version that was signed"}}></SchemaItem><SchemaItem collapsible={false} name={"objectType"} required={false} schemaName={"string"} qualifierMessage={"**Possible values:** [`revision`, `signature`]"} schema={{"type":"string","format":"","example":"revision","description":"Name of the schema model that objectReference points to. Values: \"signature\" or \"revision\"","enum":["revision","signature"]}}></SchemaItem><SchemaItem collapsible={false} name={"objectReference"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"65471222e8c7c3bb3c2c6601","description":"A symmetric relation / back reference to the objectType that was signed. We are currently just modelling signing another signature (a chain) or signing a Revision (which can be a revision of a consent record, an agreement, policy etc)."}}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={false} name={"active"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","format":"","example":"","description":"DataAgreement is active and new DataAgreementRecords can be created"}}></SchemaItem><SchemaItem collapsible={false} name={"forgettable"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","format":"","example":"","description":"DataAgreementRecord may be deleted when consent is withdrawn, as its existence is not necessary for auditability."}}></SchemaItem><SchemaItem collapsible={false} name={"compatibleWithVersionId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","x-fk-model":"DataAgreement","description":"WIP: This field indicates that Data Agreement Records may be transferred from this  compatible previous revision of the same DataAgreement\n"}}></SchemaItem><SchemaItem collapsible={false} name={"lifecycle"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`draft`, `complete`]"} schema={{"type":"string","description":"WIP: Current Lifecycle state of the DataAgreement.  Lifecycle states are used to manage internal workflows and  should not be assigned semantic meanings for active Data Agreement Records.\n","enum":["draft","complete"]}}></SchemaItem><SchemaItem collapsible={false} name={"dataUsingServices"} required={false} schemaName={"undefined[]"} qualifierMessage={undefined} schema={{"type":"array","items":[{"type":"object","description":"Data using service organisation for the data agreement","x-not-in-database":false,"required":["name","sector","location"],"properties":{"name":{"type":"string","format":"","example":"","description":"Name of the data using service organisation"},"sector":{"type":"string","format":"","example":"","description":"Defines sector of the organisation"},"location":{"type":"string","format":"","example":"","description":"Defines location of the organisation"},"privacyDashboardUrl":{"type":"string","format":"","example":"","description":"Defines privacy dashboard url of the organisation"}}}]}}></SchemaItem><SchemaItem collapsible={false} name={"openApiSpecification"} required={false} schemaName={"object"} qualifierMessage={undefined} schema={{"type":"object","description":"This field contains OpenAPI specification document describing the API's endpoints, models, and operations."}}></SchemaItem><SchemaItem collapsible={false} name={"dataSources"} required={false} schemaName={"undefined[]"} qualifierMessage={undefined} schema={{"type":"array","items":[{"type":"object","description":"Data source organisation for the data agreement","x-not-in-database":false,"required":["name","sector","location"],"properties":{"name":{"type":"string","format":"","example":"","description":"Name of the data source organisation"},"sector":{"type":"string","format":"","example":"","description":"Defines sector of the organisation"},"location":{"type":"string","format":"","example":"","description":"Defines location of the organisation"},"privacyDashboardUrl":{"type":"string","format":"","example":"","description":"Defines privacy dashboard url of the organisation"}}}]}}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>revision</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

A *generic* revision model captures the serialised contents of any schema's single row. This is then subject to 1) cryptographic signature and 2) auditing.

Aside from the "successor" column, a revision should be considered locked.

</div><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"65471222e8c7c3bb3c2c6601","description":"Revision ID"}}></SchemaItem><SchemaItem collapsible={false} name={"schemaName"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`dataAgreement`, `policy`, `dataAgreementRecord`]"} schema={{"type":"string","format":"","example":"dataAgreement","description":"Previously \"schema\" but for technical reasons should be called \"schemaName\"","enum":["dataAgreement","policy","dataAgreementRecord"]}}></SchemaItem><SchemaItem collapsible={false} name={"objectId"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"65471222e8c7c3bb3c2c8492","description":"The PK of the object that was serialised"}}></SchemaItem><SchemaItem collapsible={false} name={"objectData"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"{...}","description":"The object that is serialised"}}></SchemaItem><SchemaItem collapsible={false} name={"signedWithoutObjectId"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","format":"","example":false,"description":"Indicates that objectId was left blank in serizalizedSnapshot when calculating serializedHash. objectId may subsequently be filled in."}}></SchemaItem><SchemaItem collapsible={false} name={"serizalizedSnapshot"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"{...}","description":"Revisioned data (sed as JSON) as a dict. Apply JSON Canonicalization Scheme as per IETF RFC 8785.  It contains all the fields of the schema except sucessorId, serializedHash, serializedSnapshot.\n"}}></SchemaItem><SchemaItem collapsible={false} name={"serializedHash"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2","description":"Hash of serizalizedSnapshot (SHA-1)"}}></SchemaItem><SchemaItem collapsible={false} name={"timestamp"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"2024-01-15T10:30:00Z","description":"Timestamp of when revisioning happened. It should be ISO 8601 UTC date time"}}></SchemaItem><SchemaItem collapsible={false} name={"authorizedByIndividualId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Individual ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"authorizedByOtherId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"64541a2e6e7569000145ab00","description":"Reference to an admin user that has created this revision"}}></SchemaItem><SchemaItem collapsible={false} name={"successorId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"x-fk-model":"Revision","type":"string","description":"If this revision is no longer the latest revision, refer to its successor"}}></SchemaItem><SchemaItem collapsible={false} name={"predecessorHash"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3","description":"Tamper-resistent artifact from previous record, copied from serializedHash"}}></SchemaItem><SchemaItem collapsible={false} name={"predecessorSignature"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"c3d4e5f6a1b2...","description":"Tamper-resistent artifact from previous record (we don't know if the previous record was signed or not)"}}></SchemaItem></div></details></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"[\n  {\n    \"dataAgreement\": {\n      \"id\": \"65471222e8c7c3bb3c2c8492\",\n      \"version\": \"1.0.0\",\n      \"controllerId\": \"string\",\n      \"controllerUrl\": \"string\",\n      \"controllerName\": \"string\",\n      \"policy\": {\n        \"id\": \"65471222e8c7c3bb3c2c7701\",\n        \"name\": \"Default data policy\",\n        \"version\": \"1.0.0\",\n        \"url\": \"https://example.com/privacy-policy\",\n        \"jurisdiction\": \"EU\",\n        \"industrySector\": \"Healthcare\",\n        \"dataRetentionPeriodDays\": 365,\n        \"geographicRestriction\": \"EU\",\n        \"storageLocation\": \"EU\",\n        \"thirdPartyDataSharing\": true\n      },\n      \"dataAttributes\": [\n        {\n          \"id\": \"65471222e8c7c3bb3c2c8501\",\n          \"name\": \"Name\",\n          \"description\": \"Full name of the individual\",\n          \"sensitivity\": false,\n          \"category\": \"Personal\",\n          \"scope\": \"read\",\n          \"restrictions\": [\n            {\n              \"credDefId\": \"H3DW1MUWZyBkP5LG4rTYRH:3:CL:80:default\",\n              \"schemaId\": \"H3DW1MUWZyBkP5LG4rTYRH:2:Certificate Of Registration:6.0.0\"\n            }\n          ]\n        }\n      ],\n      \"purpose\": \"string\",\n      \"purposeDescription\": \"string\",\n      \"lawfulBasis\": \"\",\n      \"methodOfUse\": \"\",\n      \"dpiaDate\": \"\",\n      \"dpiaSummaryUrl\": \"string\",\n      \"signature\": {\n        \"id\": \"65471222e8c7c3bb3c2c5501\",\n        \"payload\": \"{...}\",\n        \"signature\": \"eyJhbGciOiJFZERTQSJ9...\",\n        \"verificationMethod\": \"Ed25519Signature2020\",\n        \"verificationPayload\": \"{...}\",\n        \"verificationPayloadHash\": \"a1b2c3d4e5f6...\",\n        \"verificationArtifact\": \"\",\n        \"verificationSignedBy\": \"did:key:z6Mkf...\",\n        \"verificationSignedAs\": \"individual\",\n        \"verificationJwsHeader\": \"\",\n        \"timestamp\": \"2024-01-15T10:30:00Z\",\n        \"signedWithoutObjectReference\": false,\n        \"objectType\": \"revision\",\n        \"objectReference\": \"65471222e8c7c3bb3c2c6601\"\n      },\n      \"active\": \"\",\n      \"forgettable\": \"\",\n      \"compatibleWithVersionId\": \"string\",\n      \"lifecycle\": \"draft\",\n      \"dataUsingServices\": [\n        null\n      ],\n      \"openApiSpecification\": {},\n      \"dataSources\": [\n        null\n      ]\n    },\n    \"revision\": {\n      \"id\": \"65471222e8c7c3bb3c2c6601\",\n      \"schemaName\": \"dataAgreement\",\n      \"objectId\": \"65471222e8c7c3bb3c2c8492\",\n      \"objectData\": \"{...}\",\n      \"signedWithoutObjectId\": false,\n      \"serizalizedSnapshot\": \"{...}\",\n      \"serializedHash\": \"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2\",\n      \"timestamp\": \"2024-01-15T10:30:00Z\",\n      \"authorizedByIndividualId\": \"string\",\n      \"authorizedByOtherId\": \"64541a2e6e7569000145ab00\",\n      \"successorId\": \"string\",\n      \"predecessorHash\": \"b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3\",\n      \"predecessorSignature\": \"c3d4e5f6a1b2...\"\n    }\n  }\n]"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>

bad input parameter

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div></div></TabItem><TabItem label={"401"} value={"401"}><div>

Unauthorized

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"errorCode"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":400}}></SchemaItem><SchemaItem collapsible={false} name={"errorDescription"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Bad input parameter"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"errorCode\": 400,\n  \"errorDescription\": \"Bad input parameter\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"404"} value={"404"}><div>

Resource not found

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"errorCode"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":400}}></SchemaItem><SchemaItem collapsible={false} name={"errorDescription"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Bad input parameter"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"errorCode\": 400,\n  \"errorDescription\": \"Bad input parameter\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"500"} value={"500"}><div>

Internal server error

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"errorCode"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":400}}></SchemaItem><SchemaItem collapsible={false} name={"errorDescription"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Bad input parameter"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"errorCode\": 400,\n  \"errorDescription\": \"Bad input parameter\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div></div>
      