# mydatamyconsent-java-sdk
My Data My Consent - Developer API
- API version: v1
- Build date: 2022-06-19T19:22:06.032788875Z[Etc/UTC]
Unleashing the power of data consent by establishing trust. The Platform Core Developer API defines a set of capabilities that can be used to request, issue, manage and update data, documents and credentials by organizations. The API can be used to request, manage and update Decentralised Identifiers, Financial Data, Health Data issue Documents, Credentials directly or using OpenID Connect flows, and verify Messages signed with DIDs and much more.
For more information, please visit https://mydatamyconsent.com/en-us/developers (opens new window)
Automatically generated by the OpenAPI Generator (opens new window)
# Requirements
Building the API client library requires:
- Java 1.8+
- Maven (3.8.3+)/Gradle (7.2+)
# Installation
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide (opens new window) for more information.
# Maven users
Add this dependency to your project's POM:
<dependency>
<groupId>com.mydatamyconsent</groupId>
<artifactId>mydatamyconsent-java-sdk</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
2
3
4
5
6
# Gradle users
Add this dependency to your project's build file:
repositories {
mavenCentral() // Needed if the 'mydatamyconsent-java-sdk' jar has been published to maven central.
mavenLocal() // Needed if the 'mydatamyconsent-java-sdk' jar has been published to the local maven repo.
}
dependencies {
implementation "com.mydatamyconsent:mydatamyconsent-java-sdk:1.0.0"
}
2
3
4
5
6
7
8
# Others
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/mydatamyconsent-java-sdk-1.0.0.jar
target/lib/*.jar
# Getting Started
Please follow the installation instruction and execute the following Java code:
// Import classes:
import com.mydatamyconsent.ApiClient;
import com.mydatamyconsent.ApiException;
import com.mydatamyconsent.Configuration;
import com.mydatamyconsent.models.*;
import com.mydatamyconsent.api.DataConsentRequestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.mydatamyconsent.com");
DataConsentRequestsApi apiInstance = new DataConsentRequestsApi(defaultClient);
UUID requestId = UUID.randomUUID(); // UUID | Individual consent request id.
try {
apiInstance.cancelIndividualDataConsentRequest(requestId);
} catch (ApiException e) {
System.err.println("Exception when calling DataConsentRequestsApi#cancelIndividualDataConsentRequest");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Documentation for API Endpoints
All URIs are relative to https://api.mydatamyconsent.com
Class | Method | HTTP request | Description |
---|---|---|---|
DataConsentRequestsApi | cancelIndividualDataConsentRequest | PUT /v1/consent-requests/individual/{requestId}/cancel | Cancel the individual data consent request by Id. |
DataConsentRequestsApi | cancelOrganizationDataConsentRequest | PUT /v1/consent-requests/organization/{requestId}/cancel | Cancel the organization data consent request by Id. |
DataConsentRequestsApi | createIndividualDataConsentRequest | POST /v1/consent-requests/individual | Create data consent request for an individual. |
DataConsentRequestsApi | createOrganizationDataConsentRequest | POST /v1/consent-requests/organization | Create data consent request for an organization. |
DataConsentRequestsApi | getAllConsentRequestsToIndividuals | GET /v1/consent-requests/individuals | Get all Consent Requests sent to individuals. |
DataConsentRequestsApi | getAllConsentRequestsToOrganizations | GET /v1/consent-requests/organizations | Get all Consent Requests sent to organizations. |
DataConsentRequestsApi | getIndividualConsentRequestById | GET /v1/consent-requests/individuals/{requestId} | Get individual data consent request by id. |
DataConsentRequestsApi | getOrganizationConsentRequestById | GET /v1/consent-requests/organizations/{requestId} | Get a OrganizationConsent Request by Id. |
DataConsentsApi | downloadConsentedDocumentAnalysis | GET /v1/consents/{consentId}/documents/{documentId}/analysis | Get analysis of a consented document. |
DataConsentsApi | downloadIndividualConsentedDocumentById | GET /v1/consents/individuals/{consentId}/documents/{documentId}/download | Download individual consented document by document id. |
DataConsentsApi | downloadOrganizationConsentedDocumentById | GET /v1/consents/organizations/{consentId}/documents/{documentId}/download | Download organization consent document based on document id. |
DataConsentsApi | getAllConsentedFinancialAccounts | GET /v1/consents/individuals/{consentId}/financial-accounts | Get all individual consented financial accounts. |
DataConsentsApi | getConsentFinancialAccounts | GET /v1/consents/organizations/{consentId}/financial-accounts | Get all organizational consented financial accounts. |
DataConsentsApi | getConsentedAccountById | GET /v1/consents/individuals/{consentId}/financial-accounts/{accountId} | Get individual consented financial account details based on account id. |
DataConsentsApi | getConsentedDocumentById | GET /v1/consents/individuals/{consentId}/documents/{documentId} | Get individual consented document by document id. |
DataConsentsApi | getConsentedFinancialAccount | GET /v1/consents/organizations/{consentId}/financial-accounts/{accountId} | Get organization consented financial account details based on account id. |
DataConsentsApi | getConsentedFinancialAccountInsights | GET /v1/consents/{consentId}/financial-accounts/{accountId}/insights | Get consented financial account insights. |
DataConsentsApi | getConsentedFinancialAccountTransactions | GET /v1/consents/individuals/{consentId}/financial-accounts/{accountId}/transactions | Get individual consented financial account transactions of an individual based on accountId. |
DataConsentsApi | getConsents | GET /v1/consents/individuals | Get the paginated list of individual data consents. |
DataConsentsApi | getIndividualConsentedDocuments | GET /v1/consents/individuals/{consentId}/documents | Get individual consented documents by consent id. |
DataConsentsApi | getIndividualDataConsentById | GET /v1/consents/individuals/{consentId} | Get individuals data consent details by consent id. |
DataConsentsApi | getOrgConsentedAccountTransactions | GET /v1/consents/organizations/{consentId}/financial-accounts/{accountId}/transactions | Get organization consented financial account transactions of an individual based on accountId. |
DataConsentsApi | getOrganizationConsentedDocumentById | GET /v1/consents/organizations/{consentId}/documents/{documentId} | Get organization consent document based on document id. |
DataConsentsApi | getOrganizationConsentedDocuments | GET /v1/consents/organizations/{consentId}/documents | Get organization consented documents by consent id. |
DataConsentsApi | getOrganizationDataConsentById | GET /v1/consents/organizations/{consentId} | Get organizations data consent details by consent id. |
DataConsentsApi | getOrganizationDataConsents | GET /v1/consents/organizations | Get the paginated list of organization data consents. |
DataProcessingAgreementsApi | createDataProcessingAgreement | POST /v1/data-agreements | Create a data processing agreement. |
DataProcessingAgreementsApi | deleteDataProcessingAgreementById | DELETE /v1/data-agreements/{id} | Delete a data processing agreement. This will not delete a published or a agreement in use with consents. |
DataProcessingAgreementsApi | getDataProcessingAgreementById | GET /v1/data-agreements/{id} | Get data processing agreement by id. |
DataProcessingAgreementsApi | getDataProcessingAgreements | GET /v1/data-agreements | Get paginated data processing agreements. |
DataProcessingAgreementsApi | terminateDataProcessingAgreementById | PUT /v1/data-agreements/{id}/terminate | Terminate a data processing agreement. |
DataProcessingAgreementsApi | updateDataProcessingAgreement | PUT /v1/data-agreements/{id} | Update a data processing agreement. |
DataProviderDiscoveryApi | getDataProviderById | GET /v1/data-providers/{providerId} | Get a Data Provider details by provider id. |
DataProviderDiscoveryApi | getDataProviders | GET /v1/data-providers | Discover all data providers in My Data My Consent by country and filters. |
DigiLockerCompatIssuerApi | digilockerCompatIssueDocument | POST /issuer/issuedoc/1/xml | Digilocker Compatible endpoint to issue document. |
DocumentsApi | getIssuedDocumentById | GET /v1/documents/issued/{documentId} | Get issued document. |
DocumentsApi | getIssuedDocuments | GET /v1/documents/issued | Get paginated list of issued documents of given document type. |
DocumentsApi | getRegisteredDocumentTypes | GET /v1/documents/types | Get paginated list of registered document types. |
DocumentsApi | issueDocumentToIndividual | POST /v1/documents/issue/individual | Issue a new document to an individual user. |
DocumentsApi | issueDocumentToOrganization | POST /v1/documents/issue/organization | Issue a new document to an organization. |
DocumentsApi | uploadDocumentForIndividual | POST /v1/documents/issue/individual/upload/{issueRequestId} | Upload a document for issuance request of individual. |
DocumentsApi | uploadDocumentForOrganization | POST /v1/documents/issue/organization/upload/{issueRequestId} | Upload a document for issuance request of organization. |
SupportedIdentifiersApi | getAllSupportedIdentifiers | GET /v1/supported-identifiers/{countryIso2Code} | Get all supported identifiers by country. |
# Documentation for Models
- Activity
- ApprovedConsentRequest
- BankAccountType
- BillPaymentOrderItem
- CollectibleTypes
- ConsentRequestReceiver
- CreateDataConsentRequest
- CreateDataProcessingAgreement
- DataConsent
- DataConsentDetails
- DataConsentDetailsPaginatedList
- DataConsentDocument
- DataConsentDocumentIssuer
- DataConsentFinancialsDto
- DataConsentRequest
- DataConsentRequestDetails
- DataConsentRequestedFinancialAccount
- DataConsentStatus
- DataProcessingAgreement
- DataProcessingAgreementBase
- DataProcessingAgreementPaginatedList
- DataProtectionOfficer
- DataProvider
- DataProviderPaginatedList
- DocumentCategoryType
- DocumentDigitalSignature
- DocumentIssueRequest
- DocumentIssueRequestDetails
- DocumentIssueRequestStatus
- DocumentReceiver
- DocumentSubCategoryType
- DocumentType
- DocumentTypePaginatedList
- DocumentsRequired
- Error
- ErrorType
- Financial
- FinancialAccount
- FinancialAccountDetailsRequired
- FinancialAccounts
- IdentificationStrategy
- Identifier
- IndividualDataConsentRequestDetails
- IndividualDataConsentRequestDetailsPaginatedList
- IssuedDocument
- IssuedDocumentDetails
- IssuedDocumentPaginatedList
- Life
- OrganizationDataConsentRequestDetails
- OrganizationDataConsentRequestDetailsPaginatedList
- OrganizationFinancialAccountDto
- OrganizationFinancialTransactionsDto
- OrganizationFinancialTransactionsDtoPaginatedList
- PaymentRequest
- ProblemDetails
- PushUriRequest
- PushUriResponse
- SharedWith
- StringStringKeyValuePair
- SupportedEntityType
- SupportedIdentifier
- UpdateDataProcessingAgreement
- UriDetails
- UserAccountFinancialTransactionsDto
- UserAccountFinancialTransactionsDtoPaginatedList
# Documentation for Authorization
Authentication schemes defined for the API:
# oauth2
- Type: OAuth
- Flow: application
- Authorization URL: https://accounts.mydatamyconsent.com/connect/authorize
- Scopes:
- developer: Developer API
# Recommendation
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.