diff --git a/README.md b/README.md
index 20d35d3..4a2e536 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@ The key deliverables of the project are as given. The table summarises the relea
| Milestone | Date | Deliverables |
|:-------------- |:------------------|:--------------------------------------------------------------------------------------------------------------------------------------------- |
| Milestone 01 | 15 May 2021 | 1. [Functional specification](https://github.com/decentralised-dataexchange/automated-data-agreements/blob/main/docs/functional_specification.md)
2. [Interface specification](https://github.com/decentralised-dataexchange/automated-data-agreements/blob/main/docs/interface_specification.md)
3. [Envisioned interoperability (eSSIF-Lab gitlab)](https://gitlab.grnet.gr/essif-lab/infrastructure_2/igrantio/deliverables/-/blob/master/envisioned_interoperability_with_others.md) |
-| Milestone 02 | 15 December 2021 | 1. Interim demo
2. [Data Agreement specification](https://github.com/decentralised-dataexchange/automated-data-agreements/blob/main/docs/data-agreement-specification.md)
3. [Data Agreement DID method specficication](https://github.com/decentralised-dataexchange/automated-data-agreements/blob/main/docs/did-spec.md)
4. [Data Agreement DIDComm protocol specification](https://github.com/decentralised-dataexchange/automated-data-agreements/blob/main/docs/didcomm-protocol-spec.md)
5. [Data Agreement APIs Rel. 1.0.1](https://app.swaggerhub.com/apis/iGrant.io/ADA/1.0.1) |
+| Milestone 02 | 15 December 2021 | 1. Interim demo
2. [Data Agreement specification](https://github.com/decentralised-dataexchange/automated-data-agreements/blob/main/docs/data-agreement-specification.md)
3. [Data Agreement DID method specficication](https://github.com/decentralised-dataexchange/automated-data-agreements/blob/main/docs/did-spec.md)
4. [Data Agreement DIDComm protocol specification](https://github.com/decentralised-dataexchange/automated-data-agreements/blob/main/docs/didcomm-protocol-spec.md)
5. [Data Agreement APIs Rel. 2.0.0](https://app.swaggerhub.com/apis-docs/iGrant.io/ADA/2.0.0) |
| Milestone 03 | 15 January 2022 | 1. Feasibility plan
2. Project report |
## Contributing
diff --git a/interface-specs/README.md b/interface-specs/README.md
index 0f8d6c9..b3efa88 100644
--- a/interface-specs/README.md
+++ b/interface-specs/README.md
@@ -22,4 +22,4 @@ Please use for example, `project-name_data-agreement.yaml`format.
The APIs are released at:
-* [Data Agreement APIs Rel. 1.0.1](https://app.swaggerhub.com/apis/iGrant.io/ADA/1.0.1)
\ No newline at end of file
+* [Data Agreement APIs Rel. 2.0.0](https://app.swaggerhub.com/apis-docs/iGrant.io/ADA/2.0.0)
\ No newline at end of file
diff --git a/interface-specs/data-agreements-admin-spec.yaml b/interface-specs/data-agreements-admin-spec.yaml
index b2aeb93..735264e 100644
--- a/interface-specs/data-agreements-admin-spec.yaml
+++ b/interface-specs/data-agreements-admin-spec.yaml
@@ -8,478 +8,1173 @@ info:
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
- version: 1.0.1
+ version: 2.0.0
servers:
-- url: https://virtserver.swaggerhub.com/LCubedAB/ADA/1.0.1
+- url: https://virtserver.swaggerhub.com/iGrant.io/ADA/2.0.0
description: SwaggerHub API Auto Mocking
tags:
-- name: organisations
- description: Operations available for organisations.
-- name: individuals
- description: Operations available to individuals.
-- name: auditor
- description: Operations available for auditors
+- name: Data Agreement - Auditor Functions
+ description: Data Agreement Proofs Protocol 1.0 (ADA RFC 0004)
+ externalDocs:
+ description: Specification
+ url: https://github.com/decentralised-dataexchange/automated-data-agreements/blob/main/docs/didcomm-protocol-spec.md
+- name: Data Agreement - Core Functions
+ description: Data Agreement Protocol 1.0 (ADA RFC 0002)
+ externalDocs:
+ description: Specification
+ url: https://github.com/decentralised-dataexchange/automated-data-agreements/blob/main/docs/didcomm-protocol-spec.md
+- name: Data Agreement - MyData DID Operations
+ description: MyData DID Protocol 1.0 (ADA RFC 0001)
+ externalDocs:
+ description: Specification
+ url: https://github.com/decentralised-dataexchange/automated-data-agreements/blob/main/docs/didcomm-protocol-spec.md
+- name: Data Agreement - MyData DID Registry Admin Functions
+ description: MyData DID registry administrative functions
+ externalDocs:
+ description: Specification
+ url: https://github.com/decentralised-dataexchange/automated-data-agreements/blob/main/docs/didcomm-protocol-spec.md
+- name: connection
+ description: Connection management
+ externalDocs:
+ description: Specification
+ url: https://github.com/hyperledger/aries-rfcs/tree/9b0aaa39df7e8bd434126c4b33c097aae78d65bf/features/0160-connection-protocol
paths:
- /dataagreement:
- post:
+ /mydata-did/didcomm/transaction-records:
+ get:
tags:
- - organisations
- description: Create a data agreement.
- operationId: Create a data agreement.
- requestBody:
- description: Data agreement structure
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DataAgreement'
+ - Data Agreement - MyData DID Operations
+ summary: Fetch MyData DID registry transaction records
+ parameters:
+ - name: connection_id
+ in: query
+ description: Connection identifier
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: string
+ format: uuid
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ - name: message_type
+ in: query
+ description: Message type
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: string
+ enum:
+ - create-did
+ - read-did
+ - delete-did
+ - name: thread_id
+ in: query
+ description: Thread identifier
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: string
+ format: uuid
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
responses:
- "201":
- description: Data agreement created
+ "200":
content:
application/json:
schema:
- $ref: '#/components/schemas/inline_response_201'
- "400":
- description: invalid input, object invalid
- /dataagreement/{agreementId}:
+ $ref: '#/components/schemas/MyDataDIDRegistryDIDCommTransactionRecordListResponse'
+ /mydata-did/didcomm/transaction-records/{mydata_did_registry_didcomm_transaction_record_id}:
get:
tags:
- - organisations
- description: Fetch a data agreement
- operationId: Fetch a data agreement
+ - Data Agreement - MyData DID Operations
+ summary: Fetch MyData DID registry DIDComm transaction record by ID
parameters:
- - name: agreementId
+ - name: mydata_did_registry_didcomm_transaction_record_id
in: path
- description: Data agreement Id
+ description: MyData DID registry didcomm transaction identifier
required: true
style: simple
explode: false
schema:
+ pattern: '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}'
type: string
- example: c0a1ec88-85f3-48f9-92f9-4c3ea318e5b1
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
responses:
"200":
- description: Returns data agreement
content:
application/json:
schema:
- $ref: '#/components/schemas/DataAgreement'
- "404":
- description: Data agreement not found
+ $ref: '#/components/schemas/MyDataDIDRegistryDIDCommTransactionRecord'
delete:
tags:
- - organisations
- description: Delete a data agreement
- operationId: Delete a data agreement
+ - Data Agreement - MyData DID Operations
+ summary: Remove MyData DID registry DIDComm transaction record by ID
parameters:
- - name: agreementId
+ - name: mydata_did_registry_didcomm_transaction_record_id
in: path
- description: Data agreement Id
+ description: MyData DID registry didcomm transaction identifier
required: true
style: simple
explode: false
schema:
+ pattern: '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}'
type: string
- example: c0a1ec88-85f3-48f9-92f9-4c3ea318e5b1
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
responses:
"204":
- description: Data agreement deleted
- "404":
- description: Data agreement not found
- patch:
+ description: MyData DID registry DIDComm transaction record removed
+ /mydata-did/didcomm/create-did/{did}:
+ post:
tags:
- - organisations
- description: Update a data agreement
- operationId: Update a data agreement
+ - Data Agreement - MyData DID Operations
+ summary: Send create-did didcomm message to MyData DID registry
parameters:
- - name: agreementId
+ - name: did
in: path
- description: Data agreement Id
+ description: did:sov identifier
required: true
style: simple
explode: false
schema:
+ pattern: ^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$
type: string
- example: c0a1ec88-85f3-48f9-92f9-4c3ea318e5b1
- requestBody:
- description: Data agreement structure
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DataAgreement'
+ example: WgWxqztrNooG92RXvxSTWv
responses:
"200":
- description: Returns updated data agreement
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DataAgreement'
- "404":
- description: Data agreement not found
- "400":
- description: invalid input, object invalid
- /dataagreement/{agreementId}/publish:
+ description: Send create-did message to DID registry
+ /mydata-did/didcomm/read-did/{did}:
post:
tags:
- - organisations
- description: Publish a data agreement
- operationId: Publish a data agreement
+ - Data Agreement - MyData DID Operations
+ summary: Send read-did didcomm message to MyData DID registry
parameters:
- - name: agreementId
+ - name: did
in: path
- description: Data agreement Id
+ description: did:mydata identifier
required: true
style: simple
explode: false
schema:
+ pattern: ^did:mydata:(z[a-km-zA-HJ-NP-Z1-9]+)
type: string
- example: c0a1ec88-85f3-48f9-92f9-4c3ea318e5b1
+ example: z6MkfiSdYhnLnS6jfwSf2yS2CiwwjZGmFUFL5QbyL2Xu8z2E
responses:
- "204":
- description: Data agreement published
- "404":
- description: Data agreement not found
- /dataagreement/{agreementId}/unpublish:
+ "200":
+ description: Send read-did message to DID registry
+ /mydata-did/didcomm/delete-did/{did}:
post:
tags:
- - organisations
- description: Unpublish a data agreement
- operationId: Unpublish a data agreement
+ - Data Agreement - MyData DID Operations
+ summary: Send delete-did message
parameters:
- - name: agreementId
+ - name: did
in: path
- description: Data agreement Id
+ description: did:mydata identifier
required: true
style: simple
explode: false
schema:
+ pattern: ^did:mydata:(z[a-km-zA-HJ-NP-Z1-9]+)
type: string
- example: c0a1ec88-85f3-48f9-92f9-4c3ea318e5b1
+ example: z6MkfiSdYhnLnS6jfwSf2yS2CiwwjZGmFUFL5QbyL2Xu8z2E
responses:
- "204":
- description: Data agreement unpublished
- "404":
- description: Data agreement not found
- /mydata-did/transaction-records:
+ "200":
+ description: Send delete-did message to DID registry
+ /mydata-did/remote:
get:
tags:
- - individuals
- summary: Fetch MyData DID registry transaction records
+ - Data Agreement - MyData DID Operations
+ summary: Fetch MyData DID remote records.
parameters:
- - name: connection_id
+ - name: did
in: query
- description: Connection identifier
+ description: MyData decentralised identifier
required: false
style: form
explode: true
schema:
+ pattern: ^did:mydata:(z[a-km-zA-HJ-NP-Z1-9]+)
type: string
- format: uuid
- example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
- - name: state
+ example: z6MkfiSdYhnLnS6jfwSf2yS2CiwwjZGmFUFL5QbyL2Xu8z2E
+ - name: sov_verkey
in: query
- description: MyData DID registry transaction state
+ description: Sovrin verkey
+ required: false
+ style: form
+ explode: true
+ schema:
+ pattern: ^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$
+ type: string
+ example: H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV
+ - name: status
+ in: query
+ description: MyData DID remote status
required: false
style: form
explode: true
schema:
type: string
enum:
- - sent
- - received
- - failed
- - success
- - name: thread_id
+ - active
+ - revoked
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/MyDataDIDRemoteRecordResponse'
+ /mydata-did-registry/mydata-did:
+ get:
+ tags:
+ - Data Agreement - MyData DID Registry Admin Functions
+ summary: Fetch all registered MyData DIDs
+ parameters:
+ - name: connection_id
in: query
+ description: Connection identifier
required: false
style: form
explode: true
schema:
type: string
- description: Thread identifier
format: uuid
- example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
- - name: transaction_type
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ - name: did
+ in: query
+ description: MyData decentralised identifier
+ required: false
+ style: form
+ explode: true
+ schema:
+ pattern: ^did:mydata:(z[a-km-zA-HJ-NP-Z1-9]+)
+ type: string
+ example: z6MkfiSdYhnLnS6jfwSf2yS2CiwwjZGmFUFL5QbyL2Xu8z2E
+ - name: status
in: query
+ description: MyData DID remote status
required: false
style: form
explode: true
schema:
type: string
- description: Transaction type
enum:
- - create-did
- - read-did
- - delete-did
+ - active
+ - revoked
responses:
"200":
- description: List of transactions against DID registry
content:
application/json:
schema:
- $ref: '#/components/schemas/V10MyDataDIDRegistryTransactionList'
- /mydata-did/transaction-records/{mydata_did_registry_transaction_id}:
+ type: array
+ items:
+ $ref: '#/components/schemas/MyDataDIDRegistryMyDataDIDListResponse'
+ /data-agreements/didcomm/read-data-agreement:
+ post:
+ tags:
+ - Data Agreement - Core Functions
+ summary: Send read data agreement message to Data Controller (remote agent)
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ReadDataAgreementRequest'
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DataAgreementCRUDDIDCommTransactionResponse'
+ /data-agreements/didcomm/transactions:
get:
tags:
- - individuals
- summary: Fetch a single MyData DID registry transaction record
+ - Data Agreement - Core Functions
+ summary: List data agreements crud didcomm transactions from the wallet
parameters:
- - name: mydata_did_registry_transaction_id
- in: path
- required: true
- style: simple
- explode: false
+ - name: connection_id
+ in: query
+ description: Connection identifier
+ required: false
+ style: form
+ explode: true
schema:
- pattern: '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}'
type: string
- description: MyData DID registry transaction identifier
- example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ format: uuid
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ - name: message_type
+ in: query
+ description: Message type
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: string
+ enum:
+ - create-data-agreement
+ - read-data-agreement
+ - update-data-agreement
+ - delete-data-agreement
+ - name: thread_id
+ in: query
+ description: Thread identifier
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: string
+ format: uuid
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
responses:
"200":
- description: DID registry transaction
content:
application/json:
schema:
- $ref: '#/components/schemas/V10MyDataDIDRegistryTransaction'
+ type: array
+ items:
+ $ref: '#/components/schemas/DataAgreementCRUDDIDCommTransactionResponse'
+ /data-agreements/didcomm/transactions/{da_crud_didcomm_tx_id}:
delete:
tags:
- - individuals
- summary: Remove an existing MyData DID registry transaction record
+ - Data Agreement - Core Functions
+ summary: Remove data agreement CRUD DIDComm transaction record by ID
parameters:
- - name: mydata_did_registry_transaction_id
+ - name: da_crud_didcomm_tx_id
in: path
+ description: Data agreement CRUD didcomm transaction identifier
required: true
style: simple
explode: false
schema:
pattern: '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}'
type: string
- description: MyData DID registry transaction identifier
- example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
responses:
"204":
- description: Deleted DID registry transaction record
- /mydata-did/create-did:
- post:
+ description: Data agreement CRUD DIDComm transaction record removed
+ /data-agreements:
+ get:
tags:
- - individuals
- summary: Send create-did message
- requestBody:
- description: DID document
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DIDVerificationMethod'
+ - Data Agreement - Core Functions
+ summary: Query data agreements in the wallet
+ parameters:
+ - name: data_agreement_id
+ in: query
+ description: Data agreement identifier
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: string
+ - name: delete_flag
+ in: query
+ description: Delete flag to query deleted data agreements
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: boolean
+ - name: method_of_use
+ in: query
+ description: Method of use
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: string
+ enum:
+ - data-source
+ - data-using-service
+ - name: template_version
+ in: query
+ description: Data agreement template version
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: integer
+ format: int32
responses:
"200":
- description: Sent DIDComm message to DID registry to register DID
- /mydata-did/read-did:
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/DataAgreementV1RecordResponse'
post:
tags:
- - individuals
- - auditor
- summary: Send read-did message
+ - Data Agreement - Core Functions
+ summary: Create and store data agreement in wallet
requestBody:
- description: Decentralised identifier to be resolved
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/V10ReadDIDQueryString'
+ $ref: '#/components/requestBodies/CreateOrUpdateDataAgreementInWalletRequest'
responses:
- "200":
- description: Sent DIDComm message to DID registry to resolve DID
- /mydata-did/delete-did:
- post:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DataAgreementV1RecordResponse'
+ "422":
+ description: Unprocessable Entity (invalid request payload)
+ /data-agreements/{data_agreement_id}:
+ put:
tags:
- - individuals
- summary: Send delete-did message
+ - Data Agreement - Core Functions
+ summary: Update data agreement in the wallet
+ parameters:
+ - name: data_agreement_id
+ in: path
+ description: Data agreement identifier
+ required: true
+ style: simple
+ explode: false
+ schema:
+ type: string
requestBody:
- description: Decentralised identifier to be deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/V10ReadDIDQueryString'
- responses:
- "200":
- description: Sent DIDComm message to DID registry to delete DID
- /mydata-did/verified:
- get:
- tags:
- - organisations
- summary: Fetch all verified MyData DID
- parameters: []
+ $ref: '#/components/requestBodies/CreateOrUpdateDataAgreementInWalletRequest'
responses:
"200":
- description: Verified decentralised identifiers
content:
application/json:
schema:
- $ref: '#/components/schemas/VerifiedMyDataList'
- /mydata-did/verified/{did}:
+ $ref: '#/components/schemas/DataAgreementV1RecordResponse'
+ "400":
+ description: Bad Request (invalid request payload)
+ delete:
+ tags:
+ - Data Agreement - Core Functions
+ summary: Delete data agreement in the wallet
+ parameters:
+ - name: data_agreement_id
+ in: path
+ description: Data agreement identifier
+ required: true
+ style: simple
+ explode: false
+ schema:
+ type: string
+ responses:
+ "204":
+ description: No Content (data agreement deleted)
+ "400":
+ description: Bad Request (invalid request payload)
+ /data-agreements/version-history/{data_agreement_id}:
get:
tags:
- - organisations
- summary: Fetch verified MyData DID record
+ - Data Agreement - Core Functions
+ summary: Query version history of a data agreement
parameters:
- - name: did
+ - name: data_agreement_id
in: path
+ description: Data agreement identifier
required: true
style: simple
explode: false
schema:
type: string
- description: MyData decentralised identifier
responses:
"200":
- description: Verified decentralised identifier record
content:
application/json:
schema:
- $ref: '#/components/schemas/VerifiedMyDataRecord'
- /mydata-did/did-records:
+ type: array
+ items:
+ $ref: '#/components/schemas/DataAgreementV1RecordResponse'
+ "400":
+ description: Bad Request (invalid request payload)
+ /data-agreements/personal-data:
get:
tags:
- - individuals
- summary: Fetch MyData DID records
+ - Data Agreement - Core Functions
+ summary: Query data agreement personal data in wallet
parameters:
- - name: did
+ - name: attribute_category
in: query
- description: MyData decentralised identifier
+ description: Category of the attribute
required: false
style: form
explode: true
schema:
- pattern: ^did:mydata(:?(0|1|2|3|4))?:(z[a-km-zA-HJ-NP-Z1-9]+)
type: string
- example: z6MkfiSdYhnLnS6jfwSf2yS2CiwwjZGmFUFL5QbyL2Xu8z2E
- - name: state
+ - name: attribute_sensitive
in: query
- description: MyData DID registry transaction state
+ description: Sensitivity of the attribute
required: false
style: form
explode: true
schema:
- type: string
- enum:
- - verified
- - revoked
+ type: boolean
responses:
"200":
- description: List of decentralised identifiers
content:
application/json:
schema:
- $ref: '#/components/schemas/V10MyDataDIDRecordsList'
-components:
- schemas:
- DataAgreement:
- required:
- - code_of_conduct
- - data_policy
- - personal_data
- - usage_purpose
- - usage_purpose_description
- type: object
- properties:
- usage_purpose:
- type: string
- example: Customized shopping experience
- usage_purpose_description:
+ type: array
+ items:
+ $ref: '#/components/schemas/DataAgreementPersonalDataRecord'
+ post:
+ tags:
+ - Data Agreement - Core Functions
+ summary: Create and store data agreement personal data in wallet
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateAndStoreDAPersonalDataInWalletRequest'
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DataAgreementPersonalDataRecord'
+ "422":
+ description: Unprocessable Entity (invalid request payload)
+ /data-agreements/personal-data/category:
+ get:
+ tags:
+ - Data Agreement - Core Functions
+ summary: List data agreement personal data category from wallet
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ListDAPersonalDataCategoryFromWalletResponse'
+ /mydata-did/set-did-registry-connection/{connection_id}:
+ post:
+ tags:
+ - Data Agreement - MyData DID Operations
+ summary: Mark a connection as MyData DID registry.
+ parameters:
+ - name: connection_id
+ in: path
+ description: Connection identifier
+ required: true
+ style: simple
+ explode: false
+ schema:
type: string
- example: Collecting user data for offering custom tailored shopping experience
- data_policy:
- $ref: '#/components/schemas/DataAgreement_data_policy'
- personal_data:
- $ref: '#/components/schemas/DataAgreement_personal_data'
- code_of_conduct:
- $ref: '#/components/schemas/DataAgreement_code_of_conduct'
- V10ReadDIDQueryString:
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ responses:
+ "204":
+ description: Connection marked as MyData DID registry.
+ "400":
+ description: Bad Request
+ /mydata-did/get-did-registry-connection:
+ get:
+ tags:
+ - Data Agreement - MyData DID Operations
+ summary: Fetch current connection marked as MyData DID registry
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ConnectionRecord'
+ "400":
+ description: Bad Request
+ /mydata-did/unset-did-registry-connection:
+ delete:
+ tags:
+ - Data Agreement - MyData DID Operations
+ summary: Unmark current connection marked as MyData DID registry
+ responses:
+ "204":
+ description: Connection unmarked as MyData DID registry.
+ "400":
+ description: Bad Request
+ /auditor/set-auditor-connection/{connection_id}:
+ post:
+ tags:
+ - Data Agreement - Auditor Functions
+ summary: Mark a connection as Auditor.
+ parameters:
+ - name: connection_id
+ in: path
+ description: Connection identifier
+ required: true
+ style: simple
+ explode: false
+ schema:
+ type: string
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ responses:
+ "204":
+ description: Connection marked as Auditor.
+ "400":
+ description: Bad Request
+ /auditor/get-auditor-connection:
+ get:
+ tags:
+ - Data Agreement - Auditor Functions
+ summary: Fetch current connection marked as Auditor
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ConnectionRecord'
+ "400":
+ description: Bad Request
+ /auditor/unset-auditor-connection:
+ delete:
+ tags:
+ - Data Agreement - Auditor Functions
+ summary: Unmark current connection marked as Auditor
+ responses:
+ "204":
+ description: Connection unmarked as Auditor.
+ "400":
+ description: Bad Request
+ /data-agreement-instances:
+ get:
+ tags:
+ - Data Agreement - Core Functions
+ summary: Query data agreement instances
+ parameters:
+ - name: data_agreement_id
+ in: query
+ description: Data agreement identifier
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: string
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ - name: data_agreement_template_id
+ in: query
+ description: Data agreement template identifier
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: string
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ - name: data_exchange_record_id
+ in: query
+ description: Data exchange record identifier
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: string
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ - name: method_of_use
+ in: query
+ description: Method of use (or data exchange mode)
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: string
+ enum:
+ - data-source
+ - data-using-service
+ example: data-using-service
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/DataAgreementInstance'
+ /auditor/didcomm/transaction-records:
+ get:
+ tags:
+ - Data Agreement - Auditor Functions
+ summary: Fetch Auditor DIDComm transaction records
+ parameters:
+ - name: connection_id
+ in: query
+ description: Connection identifier
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: string
+ format: uuid
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ - name: thread_id
+ in: query
+ description: Thread identifier
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: string
+ format: uuid
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/AuditorDIDCommTransactionRecord'
+ /auditor/didcomm/transaction-records/{auditor_didcomm_transaction_record_id}:
+ get:
+ tags:
+ - Data Agreement - Auditor Functions
+ summary: Fetch Auditor DIDComm transaction record by ID
+ parameters:
+ - name: auditor_didcomm_transaction_record_id
+ in: path
+ description: Auditor didcomm transaction identifier
+ required: true
+ style: simple
+ explode: false
+ schema:
+ pattern: '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}'
+ type: string
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AuditorDIDCommTransactionRecord'
+ delete:
+ tags:
+ - Data Agreement - Auditor Functions
+ summary: Remove Auditor DIDComm transaction record by ID
+ parameters:
+ - name: auditor_didcomm_transaction_record_id
+ in: path
+ description: Auditor didcomm transaction identifier
+ required: true
+ style: simple
+ explode: false
+ schema:
+ pattern: '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}'
+ type: string
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ responses:
+ "204":
+ description: Auditor DIDComm transaction record removed
+ /auditor/didcomm/verify-request/{data_agreement_id}:
+ post:
+ tags:
+ - Data Agreement - Auditor Functions
+ summary: Send data agreement verify request to the auditor
+ parameters:
+ - name: data_agreement_id
+ in: path
+ description: Data agreement identifier
+ required: true
+ style: simple
+ explode: false
+ schema:
+ type: string
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AuditorDIDCommTransactionRecord'
+ /.well-known/did-configuration.json:
+ get:
+ tags:
+ - connection
+ summary: Well-known endpoint for connection
+ responses:
+ "200":
+ description: Returns connection invitation
+components:
+ schemas:
+ AuditorDIDCommTransactionRecord:
required:
- - connection_id
- - did
+ - auditor_didcomm_transaction_record_id
type: object
properties:
+ auditor_didcomm_transaction_record_id:
+ type: string
+ description: Transaction record id
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
connection_id:
type: string
- description: Registry connection identifier
- format: uuid
+ description: Connection identifier
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
- did:
+ created_at:
+ pattern: ^\d{4}-\d\d-\d\d[T ]\d\d:\d\d(?:\:(?:\d\d(?:\.\d{1,6})?))?(?:[+-]\d\d:?\d\d|Z|)$
type: string
- description: MyData decentralised identifier
- VerifiedMyDataList:
+ description: Time of record creation
+ example: 2021-12-10T11:20:01.000+0000
+ messages_list:
+ type: array
+ description: Messages list
+ items:
+ type: object
+ state:
+ type: string
+ description: Current record state
+ example: active
+ thread_id:
+ type: string
+ description: Parent message identifier
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ trace:
+ type: boolean
+ description: Record trace information, based on agent configuration
+ updated_at:
+ pattern: ^\d{4}-\d\d-\d\d[T ]\d\d:\d\d(?:\:(?:\d\d(?:\.\d{1,6})?))?(?:[+-]\d\d:?\d\d|Z|)$
+ type: string
+ description: Time of last record update
+ example: 2021-12-10T11:20:01.000+0000
+ CreateAndStoreDAPersonalDataInWalletRequest:
+ required:
+ - attribute_name
type: object
properties:
- results:
+ attribute_category:
+ type: string
+ description: Category of the attribute
+ example: Personal
+ attribute_description:
+ type: string
+ description: Description of the attribute
+ example: Name of the user
+ attribute_name:
+ type: string
+ description: Name of the attribute
+ example: Name
+ attribute_sensitive:
+ type: boolean
+ description: Sensitivity of the attribute
+ example: true
+ CreateOrUpdateDataAgreementInWalletRequest:
+ required:
+ - '@context'
+ - data_controller_name
+ - data_policy
+ - lawful_basis
+ - method_of_use
+ - personal_data
+ - purpose
+ - purpose_description
+ type: object
+ properties:
+ '@context':
+ type: string
+ description: Context of the schema
+ example: https://raw.githubusercontent.com/decentralised-dataexchange/automated-data-agreements/main/interface-specs/data-agreement-schema/v1/data-agreement-schema-context.jsonld
+ data_controller_name:
+ type: string
+ description: PII controller name
+ example: Happy Shopping AB
+ data_controller_url:
+ type: string
+ description: PII controller URL
+ example: https://www.happyshopping.com
+ data_policy:
+ $ref: '#/components/schemas/DataAgreementDataPolicy'
+ dpia:
+ $ref: '#/components/schemas/DataAgreementDPIA'
+ lawful_basis:
+ type: string
+ description: Legal basis of processing
+ example: consent
+ enum:
+ - consent
+ - legal_obligation
+ - contract
+ - vital_interest
+ - public_task
+ - legitimate_interest
+ method_of_use:
+ type: string
+ description: Method of use (or data exchange mode)
+ example: data-using-service
+ enum:
+ - data-source
+ - data-using-service
+ personal_data:
+ type: array
+ items:
+ $ref: '#/components/schemas/CreateOrUpdateDataAgreementPersonalDataRequest'
+ purpose:
+ type: string
+ description: Usage purpose title
+ example: Customized shopping experience
+ purpose_description:
+ type: string
+ description: Usage purpose description
+ example: Collecting user data for offering custom tailored shopping experience
+ CreateOrUpdateDataAgreementPersonalDataRequest:
+ type: object
+ properties:
+ attribute_id:
+ type: string
+ description: Attribute identifier
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ restrictions:
type: array
- description: Verified MyData DID records
+ description: List of restrictions
items:
- $ref: '#/components/schemas/VerifiedMyDataRecord'
- VerifiedMyDataRecord:
+ $ref: '#/components/schemas/CreateOrUpdateDataAgreementPersonalDataRestriction'
+ CreateOrUpdateDataAgreementPersonalDataRestriction:
type: object
properties:
- did:
- pattern: ^did:mydata(:?(0|1|2|3|4))?:(z[a-km-zA-HJ-NP-Z1-9]+)
+ cred_def_id:
type: string
- description: MyData decentralised identifier
- example: z6MkfiSdYhnLnS6jfwSf2yS2CiwwjZGmFUFL5QbyL2Xu8z2E
- diddoc:
- type: object
- description: MyData DID document
- V10MyDataDIDRegistryTransaction:
+ description: Credential definition identifier
+ example: WgWxqztrNooG92RXvxSTWv:3:CL:20:tag
+ schema_id:
+ type: string
+ description: Schema identifier
+ example: WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0
+ DataAgreementCRUDDIDCommTransactionResponse:
type: object
properties:
connection_id:
type: string
description: Connection identifier
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
- create_did_request_dict:
- type: object
- description: Serialized create-did message dict
- create_did_response_dict:
- type: object
- description: Serialised create-did-response message dict
- created_at:
- pattern: ^\d{4}-\d\d-\d\d[T ]\d\d:\d\d(?:\:(?:\d\d(?:\.\d{1,6})?))?(?:[+-]\d\d:?\d\d|Z|)$
+ da_crud_didcomm_tx_id:
type: string
- description: Time of record creation
- example: 2021-09-19 14:06:14Z
- delete_did_request_dict:
- type: object
- description: Serialized delete-did message dict
- delete_did_response_dict:
- type: object
- description: Serialised delete-did-response message dict
- error_msg:
+ description: Data agreement CRUD DIDComm transaction identifier
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ message_type:
type: string
- description: Error message
- example: Invalid structure
- mydata_did_registry_transaction_id:
+ description: Message type
+ example: read-data-agreement
+ messages_list:
+ type: array
+ description: List of messages
+ items:
+ type: string
+ thread_id:
type: string
- description: MyData registry transaction identifier
+ description: Thread identifier
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
- read_did_request_dict:
- type: object
- description: Serialized read-did message dict
- read_did_response_dict:
- type: object
- description: Serialised read-did-response message dict
- record_type:
- type: string
- description: MyData transaction record type
- example: create-did
+ DataAgreementDPIA:
+ type: object
+ properties:
+ dpia_date:
+ type: string
+ description: DPIA conducted date time in ISO 8601 UTC date time format
+ example: 2021-12-10T11:20:02.529+0000
+ dpia_summary_url:
+ type: string
+ description: DPIA summary URL
+ example: https://org.com/dpia_results.html
+ DataAgreementDataPolicy:
+ required:
+ - data_retention_period
+ - geographic_restriction
+ - jurisdiction
+ - policy_URL
+ - storage_location
+ type: object
+ properties:
+ data_retention_period:
+ type: integer
+ description: Data retention period in days
+ format: int32
+ example: 365
+ geographic_restriction:
+ type: string
+ description: Geographic restriction
+ example: Europe
+ industry_sector:
+ type: string
+ description: Industry scope
+ example: Healthcare
+ jurisdiction:
+ type: string
+ description: Jurisdiction
+ example: Sweden
+ policy_URL:
+ type: string
+ description: Policy URL
+ example: https://clarifyhealth.com/privacy-policy/
+ storage_location:
+ type: string
+ description: Storage location
+ example: Europe
+ DataAgreementEvent:
+ type: object
+ properties:
+ did:
+ pattern: ^did:mydata:(z[a-km-zA-HJ-NP-Z1-9]+)
+ type: string
+ description: MyData decentralised identifier
+ example: z6MkfiSdYhnLnS6jfwSf2yS2CiwwjZGmFUFL5QbyL2Xu8z2E
+ id:
+ type: string
+ description: Data agreement event identifier
+ example: did:mydata:123456789abcdefghi#1
state:
type: string
- description: MyData transaction state
- example: success
- their_connection_id:
+ description: State of the event
+ example: capture
+ time-stamp:
+ type: string
+ description: Data agreement event timestamp in ISO 8601 UTC date time format
+ example: 2021-12-10T11:20:02.535+0000
+ DataAgreementInstance:
+ required:
+ - data_policy
+ - lawful_basis
+ - method_of_use
+ - personal_data
+ - purpose
+ - purpose_description
+ type: object
+ properties:
+ '@context':
+ type: array
+ description: Context
+ example:
+ - https://raw.githubusercontent.com/decentralised-dataexchange/automated-data-agreements/main/interface-specs/data-agreement-schema/v1/data-agreement-schema-context.jsonld
+ - https://w3id.org/security/v2
+ items:
+ type: string
+ data_controller_name:
+ type: string
+ description: PII controller name
+ example: Happy Shopping AB
+ data_controller_url:
+ type: string
+ description: PII controller URL
+ example: https://www.happyshopping.com
+ data_policy:
+ description: Data policy
+ allOf:
+ - $ref: '#/components/schemas/DataAgreementDataPolicy'
+ dpia:
+ description: DPIA metadata
+ allOf:
+ - $ref: '#/components/schemas/DataAgreementDPIA'
+ event:
+ type: array
+ items:
+ $ref: '#/components/schemas/DataAgreementEvent'
+ id:
type: string
- description: Their connection identifier (Connection ID for which MyData DID will be used for ADA messages)
+ description: Data agreement identifier
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
- thread_id:
+ lawful_basis:
+ type: string
+ description: Legal basis of processing
+ example: consent
+ enum:
+ - consent
+ - legal_obligation
+ - contract
+ - vital_interest
+ - public_task
+ - legitimate_interest
+ method_of_use:
+ type: string
+ description: Method of use (or data exchange mode)
+ example: data-using-service
+ enum:
+ - data-source
+ - data-using-service
+ personal_data:
+ type: array
+ description: Personal data (attributes)
+ items:
+ $ref: '#/components/schemas/DataAgreementPersonalData'
+ principle-did:
+ type: string
+ description: Principle did
+ example: did:mydata:123456789abcdefghi
+ proof:
+ $ref: '#/components/schemas/DataAgreementProof'
+ proofChain:
+ type: array
+ description: Data agreement proof chain
+ items:
+ $ref: '#/components/schemas/DataAgreementProof'
+ purpose:
+ type: string
+ description: Usage purpose title
+ example: Customized shopping experience
+ purpose_description:
+ type: string
+ description: Usage purpose description
+ example: Collecting user data for offering custom tailored shopping experience
+ template_id:
+ type: string
+ description: Data agreement template identifier
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ template_version:
+ type: integer
+ description: Data agreement template version
+ format: int32
+ example: 1
+ version:
+ type: integer
+ description: Data agreement version
+ format: int32
+ example: 1
+ DataAgreementPersonalData:
+ required:
+ - attribute_description
+ - attribute_name
+ type: object
+ properties:
+ attribute_category:
+ type: string
+ description: Category of the attribute
+ example: Personal
+ attribute_description:
+ type: string
+ description: The description of the attribute.
+ example: Name of the customer
+ attribute_id:
+ type: string
+ description: Attribute identifier
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ attribute_name:
+ type: string
+ description: Name of the attribute
+ example: Name
+ attribute_sensitive:
+ type: boolean
+ description: Sensitivity of the attribute
+ example: true
+ DataAgreementPersonalDataRecord:
+ required:
+ - attribute_category
+ - attribute_description
+ - attribute_name
+ - attribute_sensitive
+ - data_agreement_personal_data_record_id
+ type: object
+ properties:
+ attribute_category:
+ type: string
+ description: The category of the attribute.
+ example: personal
+ attribute_description:
+ type: string
+ description: The description of the attribute.
+ example: Name of the customer
+ attribute_name:
+ type: string
+ description: The name of the attribute.
+ example: name
+ attribute_sensitive:
+ type: string
+ description: The sensitive flag of the attribute.
+ example: "True"
+ created_at:
+ pattern: ^\d{4}-\d\d-\d\d[T ]\d\d:\d\d(?:\:(?:\d\d(?:\.\d{1,6})?))?(?:[+-]\d\d:?\d\d|Z|)$
+ type: string
+ description: Time of record creation
+ example: 2021-12-10T11:20:01.000+0000
+ data_agreement_personal_data_record_id:
type: string
- description: Thread identifier
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ state:
+ type: string
+ description: Current record state
+ example: active
trace:
type: boolean
description: Record trace information, based on agent configuration
@@ -487,36 +1182,289 @@ components:
pattern: ^\d{4}-\d\d-\d\d[T ]\d\d:\d\d(?:\:(?:\d\d(?:\.\d{1,6})?))?(?:[+-]\d\d:?\d\d|Z|)$
type: string
description: Time of last record update
- example: 2021-09-19 14:06:14Z
- V10MyDataDIDRegistryTransactionList:
+ example: 2021-12-10T11:20:01.000+0000
+ DataAgreementProof:
type: object
properties:
- results:
+ created:
+ type: string
+ description: Proof created date time in ISO 8601 format
+ example: 2021-12-10T11:20:02.534+0000
+ id:
+ type: string
+ description: Proof identifier
+ example: did:mydata:123456789abcdefghi#1
+ proofPurpose:
+ type: string
+ description: Proof purpose
+ example: contractAgreement
+ proofValue:
+ type: string
+ description: Proof value
+ example: 123456789abcdefghi
+ type:
+ type: string
+ description: Proof type
+ example: Ed25519Signature2018
+ verificationMethod:
+ type: string
+ description: Verification method
+ example: did:mydata:123456789abcdefghi
+ DataAgreementV1:
+ required:
+ - '@context'
+ - data_controller_name
+ - data_policy
+ - lawful_basis
+ - method_of_use
+ - personal_data
+ - purpose
+ - purpose_description
+ type: object
+ properties:
+ '@context':
+ type: string
+ description: Context of the schema
+ example: https://raw.githubusercontent.com/decentralised-dataexchange/automated-data-agreements/main/interface-specs/data-agreement-schema/v1/data-agreement-schema-context.jsonld
+ data_controller_name:
+ type: string
+ description: PII controller name
+ example: Happy Shopping AB
+ data_controller_url:
+ type: string
+ description: PII controller URL
+ example: https://www.happyshopping.com
+ data_policy:
+ $ref: '#/components/schemas/DataAgreementDataPolicy'
+ dpia:
+ $ref: '#/components/schemas/DataAgreementDPIA'
+ lawful_basis:
+ type: string
+ description: Legal basis of processing
+ example: consent
+ enum:
+ - consent
+ - legal_obligation
+ - contract
+ - vital_interest
+ - public_task
+ - legitimate_interest
+ method_of_use:
+ type: string
+ description: Method of use (or data exchange mode)
+ example: data-using-service
+ enum:
+ - data-source
+ - data-using-service
+ personal_data:
+ type: array
+ items:
+ $ref: '#/components/schemas/DataAgreementPersonalData'
+ purpose:
+ type: string
+ description: Usage purpose title
+ example: Customized shopping experience
+ purpose_description:
+ type: string
+ description: Usage purpose description
+ example: Collecting user data for offering custom tailored shopping experience
+ template_id:
+ type: string
+ description: Data agreement template identifier
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ template_version:
+ type: integer
+ description: Data agreement template version
+ format: int32
+ example: 1
+ DataAgreementV1RecordResponse:
+ required:
+ - data_agreement
+ - data_agreement_id
+ - data_agreement_record_id
+ - delete_flag
+ - method_of_use
+ - published_flag
+ - state
+ type: object
+ properties:
+ data_agreement:
+ description: The data agreement.
+ allOf:
+ - $ref: '#/components/schemas/DataAgreementV1'
+ data_agreement_id:
+ type: string
+ description: The unique identifier for the data agreement.
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ data_agreement_record_id:
+ type: string
+ description: Data Agreement Record identifier
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ delete_flag:
+ type: string
+ description: The delete flag.
+ example: "False"
+ enum:
+ - "True"
+ - "False"
+ method_of_use:
+ type: string
+ description: The method of use for the data agreement.
+ example: data-source
+ enum:
+ - data-source
+ - data-using-service
+ published_flag:
+ type: string
+ description: The production flag.
+ example: "False"
+ enum:
+ - "True"
+ - "False"
+ state:
+ type: string
+ description: The state of the data agreement.
+ example: PREPARATION
+ enum:
+ - PREPARATION
+ ListDAPersonalDataCategoryFromWalletResponse:
+ required:
+ - categories
+ type: object
+ properties:
+ categories:
+ type: array
+ description: List of categories
+ items:
+ type: string
+ description: Category
+ example: Personal
+ MyDataDIDDoc:
+ required:
+ - '@context'
+ - authentication
+ - id
+ - service
+ - verification_method
+ type: object
+ properties:
+ '@context':
+ type: string
+ description: The DIDDoc context
+ example: https://w3id.org/did/v1
+ authentication:
+ type: array
+ items:
+ $ref: '#/components/schemas/MyDataDIDDocAuthentication'
+ id:
+ type: string
+ example: did:mydata:z6MkfiSdYhnLnS6jfwSf2yS2CiwwjZGmFUFL5QbyL2Xu8z2E
+ service:
+ type: array
+ items:
+ $ref: '#/components/schemas/MyDataDIDDocService'
+ verification_method:
type: array
- description: MyData DID registry transaction records
items:
- $ref: '#/components/schemas/V10MyDataDIDRegistryTransaction'
- V10MyDataDIDRecord:
+ $ref: '#/components/schemas/MyDataDIDDocVerificationMethod'
+ MyDataDIDDocAuthentication:
+ required:
+ - publicKey
+ - type
+ type: object
+ properties:
+ publicKey:
+ type: string
+ example: did:mydata:fz6MkfiSdYhnLnS6jfwSf2yS2CiwwjZGmFUFL5QbyL2Xu8z2E#1
+ type:
+ type: string
+ example: Ed25519SignatureAuthentication2018
+ MyDataDIDDocService:
+ required:
+ - id
+ - priority
+ - recipientKeys
+ - serviceEndpoint
+ - type
+ type: object
+ properties:
+ id:
+ type: string
+ example: did:mydata:z6MkfiSdYhnLnS6jfwSf2yS2CiwwjZGmFUFL5QbyL2Xu8z2E;didcomm
+ priority:
+ type: integer
+ format: int32
+ example: 1
+ recipientKeys:
+ type: array
+ items:
+ type: string
+ example: z6MkfiSdYhnLnS6jfwSf2yS2CiwwjZGmFUFL5QbyL2Xu8z2E
+ serviceEndpoint:
+ type: string
+ example: https://didcomm.org
+ type:
+ type: string
+ example: DIDComm
+ MyDataDIDDocVerificationMethod:
+ required:
+ - controller
+ - id
+ - publicKeyBase58
+ - type
type: object
properties:
+ controller:
+ type: string
+ example: did:mydata:z6MkfiSdYhnLnS6jfwSf2yS2CiwwjZGmFUFL5QbyL2Xu8z2E
+ id:
+ type: string
+ example: did:mydata:z6MkfiSdYhnLnS6jfwSf2yS2CiwwjZGmFUFL5QbyL2Xu8z2E#1
+ publicKeyBase58:
+ type: string
+ example: z6MkfiSdYhnLnS6jfwSf2yS2CiwwjZGmFUFL5QbyL2Xu8z2E
+ type:
+ type: string
+ example: Ed25519VerificationKey2018
+ MyDataDIDRegistryDIDCommTransactionRecord:
+ required:
+ - mydata_did_registry_didcomm_transaction_record_id
+ type: object
+ properties:
+ connection_id:
+ type: string
+ description: Connection identifier
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
created_at:
pattern: ^\d{4}-\d\d-\d\d[T ]\d\d:\d\d(?:\:(?:\d\d(?:\.\d{1,6})?))?(?:[+-]\d\d:?\d\d|Z|)$
type: string
description: Time of record creation
- example: 2021-09-19 14:06:14Z
- did:
- pattern: ^did:mydata(:?(0|1|2|3|4))?:(z[a-km-zA-HJ-NP-Z1-9]+)
+ example: 2021-12-10T11:20:01.000+0000
+ message_type:
type: string
- description: MyData decentralised identifier
- example: z6MkfiSdYhnLnS6jfwSf2yS2CiwwjZGmFUFL5QbyL2Xu8z2E
- mydata_did_record_id:
+ description: Message family
+ example: create-did
+ enum:
+ - create-did
+ - read-did
+ - delete-did
+ messages_list:
+ type: array
+ description: Messages list
+ items:
+ type: object
+ mydata_did_registry_didcomm_transaction_record_id:
type: string
- description: MyData DID record
+ description: Transaction record id
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
state:
type: string
- description: MyData DID record state
- example: verified
+ description: Current record state
+ example: active
+ thread_id:
+ type: string
+ description: Parent message identifier
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
trace:
type: boolean
description: Record trace information, based on agent configuration
@@ -524,63 +1472,169 @@ components:
pattern: ^\d{4}-\d\d-\d\d[T ]\d\d:\d\d(?:\:(?:\d\d(?:\.\d{1,6})?))?(?:[+-]\d\d:?\d\d|Z|)$
type: string
description: Time of last record update
- example: 2021-09-19 14:06:14Z
- V10MyDataDIDRecordsList:
+ example: 2021-12-10T11:20:01.000+0000
+ MyDataDIDRegistryDIDCommTransactionRecordListResponse:
type: object
properties:
results:
type: array
- description: MyData DID records
+ description: MyData DID registry transaction records
items:
- $ref: '#/components/schemas/V10MyDataDIDRecord'
- DIDVerificationMethod:
- required:
- - recipient_connection_id
- - registry_connection_id
+ $ref: '#/components/schemas/MyDataDIDRegistryDIDCommTransactionRecord'
+ MyDataDIDRegistryMyDataDIDListResponse:
type: object
properties:
- recipient_connection_id:
+ connection_id:
type: string
- description: Recipient connection ID
+ description: Connection identifier
+ format: uuid
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
- registry_connection_id:
+ did:
+ pattern: ^did:mydata:(z[a-km-zA-HJ-NP-Z1-9]+)
type: string
- description: ADA registry service connection ID
- example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
- inline_response_201:
- type: object
- properties:
- agreementId:
+ description: MyData decentralised identifier
+ example: z6MkfiSdYhnLnS6jfwSf2yS2CiwwjZGmFUFL5QbyL2Xu8z2E
+ diddoc:
+ description: MyData DID document
+ allOf:
+ - $ref: '#/components/schemas/MyDataDIDDoc'
+ status:
type: string
- example: c0a1ec88-85f3-48f9-92f9-4c3ea318e5b1
- DataAgreement_data_policy:
+ description: MyData DID remote status
+ enum:
+ - active
+ - revoked
+ version:
+ type: string
+ description: MyData DID document version
+ MyDataDIDRemoteRecordResponse:
type: object
properties:
- data_retention_period:
+ did:
+ pattern: ^did:mydata:(z[a-km-zA-HJ-NP-Z1-9]+)
+ type: string
+ description: MyData decentralised identifier
+ example: z6MkfiSdYhnLnS6jfwSf2yS2CiwwjZGmFUFL5QbyL2Xu8z2E
+ did_doc:
+ description: MyData DID document
+ allOf:
+ - $ref: '#/components/schemas/MyDataDIDDoc'
+ sov_verkey:
+ pattern: ^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$
+ type: string
+ description: Sovrin verkey
+ example: H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV
+ status:
type: string
- example: "365"
- DataAgreement_personal_data:
+ description: MyData DID remote status
+ enum:
+ - active
+ - revoked
+ ReadDataAgreementRequest:
+ required:
+ - connection_id
+ - data_agreement_id
type: object
properties:
- attribute_names:
- type: array
- example:
- - Name
- - Age
- items:
- type: string
- DataAgreement_code_of_conduct:
+ connection_id:
+ type: string
+ description: Connection identifier
+ format: uuid
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ data_agreement_id:
+ type: string
+ description: Data agreement identifier
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ ConnectionRecord:
type: object
properties:
- dpia_conducted:
- type: boolean
- example: true
- dpia_passed:
- type: boolean
- example: true
- dpia_date:
+ accept:
type: string
- example: 2021-05-08T08:41:59+0000
- dpia_verification_url:
+ description: 'Connection acceptance: manual or auto'
+ example: auto
+ enum:
+ - manual
+ - auto
+ alias:
type: string
- example: https://org.com/dpia_results.html
+ description: Optional alias to apply to connection for later use
+ example: Bob, providing quotes
+ connection_id:
+ type: string
+ description: Connection identifier
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ created_at:
+ pattern: ^\d{4}-\d\d-\d\d[T ]\d\d:\d\d(?:\:(?:\d\d(?:\.\d{1,6})?))?(?:[+-]\d\d:?\d\d|Z|)$
+ type: string
+ description: Time of record creation
+ example: 2021-12-10T11:20:01.000+0000
+ error_msg:
+ type: string
+ description: Error message
+ example: No DIDDoc provided; cannot connect to public DID
+ inbound_connection_id:
+ type: string
+ description: Inbound routing connection id to use
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ initiator:
+ type: string
+ description: 'Connection initiator: self, external, or multiuse'
+ example: self
+ enum:
+ - self
+ - external
+ - multiuse
+ invitation_key:
+ pattern: ^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$
+ type: string
+ description: Public key for connection
+ example: H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV
+ invitation_mode:
+ type: string
+ description: 'Invitation mode: once, multi, or static'
+ example: once
+ enum:
+ - once
+ - multi
+ - static
+ my_did:
+ pattern: ^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$
+ type: string
+ description: Our DID for connection
+ example: WgWxqztrNooG92RXvxSTWv
+ request_id:
+ type: string
+ description: Connection request identifier
+ example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ routing_state:
+ type: string
+ description: Routing state of connection
+ example: active
+ state:
+ type: string
+ description: Current record state
+ example: active
+ their_did:
+ pattern: ^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$
+ type: string
+ description: Their DID for connection
+ example: WgWxqztrNooG92RXvxSTWv
+ their_label:
+ type: string
+ description: Their label for connection
+ example: Bob
+ their_role:
+ type: string
+ description: Their assigned role for connection
+ example: Point of contact
+ updated_at:
+ pattern: ^\d{4}-\d\d-\d\d[T ]\d\d:\d\d(?:\:(?:\d\d(?:\.\d{1,6})?))?(?:[+-]\d\d:?\d\d|Z|)$
+ type: string
+ description: Time of last record update
+ example: 2021-12-10T11:20:01.000+0000
+ requestBodies:
+ CreateOrUpdateDataAgreementInWalletRequest:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateOrUpdateDataAgreementInWalletRequest'