mydatamyconsent/mydatamyconsent

Unleashing the power of 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, Fi

dev-master 2023-01-25 12:37 UTC

README

Unleashing the power of 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/contact-us.

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/mydatamyconsent/php-sdk.git"
    }
  ],
  "require": {
    "mydatamyconsent/php-sdk": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/mydatamyconsent/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure OAuth2 access token for authorization: OAuth2ClientCredentials
$config = MyDataMyConsent\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new MyDataMyConsent\Api\DataProcessingAgreementsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$page_no = 56; // int
$page_size = 56; // int

try {
    $result = $apiInstance->v1DataAgreementsGet($page_no, $page_size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DataProcessingAgreementsApi->v1DataAgreementsGet: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.mydatamyconsent.com

Class Method HTTP request Description
DataProcessingAgreementsApi v1DataAgreementsGet GET /v1/data-agreements Get paginated data processing agreements.
DataProcessingAgreementsApi v1DataAgreementsIdDelete DELETE /v1/data-agreements/{id} Delete a data processing agreement this will not delete a published or a agreement in use with consents.
DataProcessingAgreementsApi v1DataAgreementsIdGet GET /v1/data-agreements/{id} Get data processing agreement by id.
DataProcessingAgreementsApi v1DataAgreementsIdPut PUT /v1/data-agreements/{id} Update data processing agreement.
DataProcessingAgreementsApi v1DataAgreementsIdTerminatePut PUT /v1/data-agreements/{id}/terminate Terminate a data processing agreement by id.
DataProcessingAgreementsApi v1DataAgreementsPost POST /v1/data-agreements Create a data processing agreement.
DataProvidersDiscoveryApi v1DataProvidersGet GET /v1/data-providers Discover all data providers in my data my consent by country and filters.
DataProvidersDiscoveryApi v1DataProvidersIdGet GET /v1/data-providers/{id} Get a data provider details by provider id.
IndividualsApi issuerIssuedoc1XmlPost POST /issuer/issuedoc/1/xml Digilocker compatible endpoint to issue document.
IndividualsApi v1IndividualsConsentRequestsGet GET /v1/individuals/consent-requests Get all consent requests sent to Individuals.
IndividualsApi v1IndividualsConsentRequestsPost POST /v1/individuals/consent-requests Create individual consent request.
IndividualsApi v1IndividualsConsentRequestsRequestIdCancelPut PUT /v1/individuals/consent-requests/{request_id}/cancel Cancel the Individual data request by id.
IndividualsApi v1IndividualsConsentRequestsRequestIdGet GET /v1/individuals/consent-requests/{request_id} Get Individual data consent request by id.
IndividualsApi v1IndividualsConsentTemplatesGet GET /v1/individuals/consent-templates Get the paginated list of individual consent templates.
IndividualsApi v1IndividualsConsentTemplatesTemplateIdGet GET /v1/individuals/consent-templates/{template_id} Get Individual consent template details by consent id.
IndividualsApi v1IndividualsConsentsConsentIdDocumentsDocumentIdDownloadGet GET /v1/individuals/consents/{consent_id}/documents/{document_id}/download Download Individual consented document by document id.
IndividualsApi v1IndividualsConsentsConsentIdDocumentsDocumentIdGet GET /v1/individuals/consents/{consent_id}/documents/{document_id} Get Individual consented document by document id.
IndividualsApi v1IndividualsConsentsConsentIdDocumentsGet GET /v1/individuals/consents/{consent_id}/documents Get Individual consented document by consent id.
IndividualsApi v1IndividualsConsentsConsentIdFinancialAccountsAccountIdGet GET /v1/individuals/consents/{consent_id}/financial-accounts/{account_id} Get individual consented financial account details.
IndividualsApi v1IndividualsConsentsConsentIdFinancialAccountsAccountIdTransactionsGet GET /v1/individuals/consents/{consent_id}/financial-accounts/{account_id}/transactions Get individual consented financial account transactions.
IndividualsApi v1IndividualsConsentsConsentIdFinancialAccountsGet GET /v1/individuals/consents/{consent_id}/financial-accounts Get all individual consented financial accounts.
IndividualsApi v1IndividualsConsentsConsentIdGet GET /v1/individuals/consents/{consent_id} Get Individuals consent details by consent id.
IndividualsApi v1IndividualsConsentsConsentIdHealthFhirBundleGet GET /v1/individuals/consents/{consent_id}/health/fhir/bundle Get Individual consented Health Records by consent id.
IndividualsApi v1IndividualsConsentsGet GET /v1/individuals/consents Get the paginated list of Individual consents.
IndividualsApi v1IndividualsDocumentsIssueIssueRequestIdUploadPost POST /v1/individuals/documents/issue/{issue_request_id}/upload Upload a document for issuance request of individual.
IndividualsApi v1IndividualsDocumentsIssuePost POST /v1/individuals/documents/issue Issue a new document to an individual user.
IndividualsApi v1IndividualsDocumentsIssuedDocumentIdGet GET /v1/individuals/documents/issued/{document_id} Get issued document.
IndividualsApi v1IndividualsDocumentsIssuedGet GET /v1/individuals/documents/issued Get paginated list of issued documents of given document type.
IndividualsApi v1IndividualsDocumentsTypesGet GET /v1/individuals/documents/types Get paginated list of registered document types.
OrganizationsApi v1OrganizationsConsentRequestsGet GET /v1/organizations/consent-requests Get all consent requests sent to Organizations.
OrganizationsApi v1OrganizationsConsentRequestsPost POST /v1/organizations/consent-requests Create consent request for an Organization.
OrganizationsApi v1OrganizationsConsentRequestsRequestIdCancelPut PUT /v1/organizations/consent-requests/{request_id}/cancel Cancel the Organization data request by id.
OrganizationsApi v1OrganizationsConsentRequestsRequestIdGet GET /v1/organizations/consent-requests/{request_id} Get Organization data request by id.
OrganizationsApi v1OrganizationsConsentTemplatesGet GET /v1/organizations/consent-templates Get the paginated list of organization consent templates.
OrganizationsApi v1OrganizationsConsentTemplatesTemplateIdGet GET /v1/organizations/consent-templates/{template_id} Get Organization consent template details by consent id.
OrganizationsApi v1OrganizationsConsentsConsentIdDocumentsDocumentIdDownloadGet GET /v1/organizations/consents/{consent_id}/documents/{document_id}/download Download Organization consent document by document id.
OrganizationsApi v1OrganizationsConsentsConsentIdDocumentsDocumentIdGet GET /v1/organizations/consents/{consent_id}/documents/{document_id} Get Organization consent document based on document id and consent id.
OrganizationsApi v1OrganizationsConsentsConsentIdDocumentsGet GET /v1/organizations/consents/{consent_id}/documents Get Organization consent document by consent id.
OrganizationsApi v1OrganizationsConsentsConsentIdFinancialAccountsAccountIdGet GET /v1/organizations/consents/{consent_id}/financial-accounts/{account_id} Get organization consented financial account details.
OrganizationsApi v1OrganizationsConsentsConsentIdFinancialAccountsAccountIdTransactionsGet GET /v1/organizations/consents/{consent_id}/financial-accounts/{account_id}/transactions Get organization consented financial account transactions.
OrganizationsApi v1OrganizationsConsentsConsentIdFinancialAccountsGet GET /v1/organizations/consents/{consent_id}/financial-accounts Get all organization consented financial accounts.
OrganizationsApi v1OrganizationsConsentsConsentIdGet GET /v1/organizations/consents/{consent_id} Get Organization consent request details by consent id.
OrganizationsApi v1OrganizationsConsentsGet GET /v1/organizations/consents Get the paginated list of Organization consents.
OrganizationsApi v1OrganizationsDocumentsIssuePost POST /v1/organizations/documents/issue Issue a new document to an organization.
OrganizationsApi v1OrganizationsDocumentsIssueUploadIssueRequestIdPost POST /v1/organizations/documents/issue/upload/{issue_request_id} Upload a document for issuance request of Organization.
OrganizationsApi v1OrganizationsDocumentsIssuedDocumentIdGet GET /v1/organizations/documents/issued/{document_id} Get issued document.
OrganizationsApi v1OrganizationsDocumentsIssuedGet GET /v1/organizations/documents/issued Get paginated list of issued documents of given document type.
OrganizationsApi v1OrganizationsDocumentsTypesGet GET /v1/organizations/documents/types Get paginated list of registered document types.
SupportedIdentifiersApi v1SupportedIdentifiersCountryIso2CodeGet GET /v1/supported-identifiers/{country_iso2_code} Get all supported identifiers by country.

Models

Authorization

OAuth2ClientCredentials

  • Type: OAuth
  • Flow: application
  • Authorization URL: ``
  • Scopes:
    • SupportedIdentifiers:Read: Read SupportedIdentifiers.
    • DataProviders:Read: Read DataProviders.
    • DataProcessingAgreements:Read: Read DataProcessingAgreements.
    • DataProcessingAgreements:Write: Read & Write DataProcessingAgreements.
    • Individuals:DocumentTypes:Read: Read Individual DocumentTypes.
    • Individuals:Documents:Read: Read Individual Issued Documents.
    • Individuals:Documents:Issue: Issue Individual Documents.
    • Organizations:DocumentTypes:Read: Read Organization DocumentTypes.
    • Organizations:Documents:Read: Read Organization Issued Documents.
    • Organizations:Documents:Issue: Issue Organization Documents.
    • Individuals:ConsentRequests:Request: Request Individual Consent requests.
    • Individuals:ConsentRequests:Cancel: Cancel Individual Consent requests.
    • Individuals:ConsentRequests:Read: Read Individual Consent requests.
    • Organizations:ConsentRequests:Request: Request Organization Consent requests.
    • Organizations:ConsentRequests:Cancel: Cancel Organization Consent requests.
    • Organizations:ConsentRequests:Read: Read Organization Consent requests.
    • Individuals:Consents:Read: Read Individual Consents.
    • Organizations:Consents:Read: Read Organization Consents.
    • Individuals:ConsentRequestTemplates:Read: Read Individual Consent Request templates.
    • Organizations:ConsentRequestTemplates:Read: Read Organization Consent Request templates.

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

support@mydatamyconsent.com

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0
    • Package version: 0.0.1
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen