ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Purpose

This service must return connections details for the specified client ID and connection ID. Client connections are restricted by Client ID and its context

Specification

Link

https://ehealthmisapi1.docs.apiary.io/#reference/public.-medical-service-provider-integration-layer/manage-client-configuration/get-client-connection-details

Посилання на Apiary або Swagger

Resource

/api/clients/{{id}}/connections/{{connection_id}}

Посилання на ресурс, наприклад: /api/persons/create

Scope

connection:read

Scope для доступу

Components

Manage client configuration

Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription

Microservices

API paragraph not found

Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC

Protocol type

REST

Тип протоколу, який використовується запитом, наприклад: SOAP | REST

Request type

GET

Тип запиту API, наприклад: GET, POST, PATCH…

Sync/Async

Sync

Метод є синхронним чи асинхронним?

Public/Private/Internal

Public

Потрібно зазначити тип методу за ступенем доступності

Logic

  1. Extract client_type from token

  2. Validate specified Client ID according to context:

    1. Mithril Admin - receives all client records

    2. MSP, MIS, PHARMACY - receives only its own client

      1. in case of error generate 403 response ('forbidden')

Prepare response

  1. Query data from mithril.connections for specified Client ID and Connection ID

  2. Hide secret from response

Input parameters

Input parameter

Values

Type

Description

Example

id

String

Required

1380df72-275a-11e7-93ae-92361f002671

connection_id

String

Required

e5372365-d47a-467f-81d0-f35117864352

Request structure

API paragraph not found

Authorize

  1. Verify the validity of access token

    1. in case of error return 401 ('Access denied')

  2. Check user scope connection:read in order to perform this action

    1. in case of error generate 403 response ('Invalid scopes')

Headers

Content-Type:application/json

Authorization:Bearer c2778f3064753ea70de870a53795f5c9

API-key:uXhEczJ56adsfh3Ri9SUkc4en

Request data validation

API paragraph not found

Processing

API paragraph not found

Response structure

Example:

 Response example
{
  "meta": {
    "code": 200,
    "url": "https://example.com/resource",
    "type": "object",
    "request_id": "6617aeec-15e2-4d6f-b9bd-53559c358f97#17810"
  },
  "data": {
    "id": "df9f70ee-4b12-4740-b0f5-bb5aea116863",
    "client_id": "c4a6d45f-2cf2-4e6d-909a-5962604ad63b",
    "consumer_id": "25c03af6-69bd-439e-b0dd-f1669b3dbbfd",
    "redirect_uri": "https://example2.com"
  }
}

Post-processing processes

API paragraph not found

HTTP status codes

HTTP status code

Message

What caused the error

200

Response

 

401

Access denied

403

  • Invalid scopes

  • Forbidden

  • No labels