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

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

Version 1 Current »

Purpose

This method is used to refresh client secret for specified client connection Only legal entity owner can request new client secret for his own legal entity

Specification

Link

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

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

Resource

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

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

Scope

connection:refresh_secret

Scope для доступу

Components

Manage client configuration

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

Microservices

API paragraph not found

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

Protocol type

REST

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

Request type

PATCH

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

Sync/Async

Sync

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

Public/Private/Internal

Public

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

Logic

  1. This service manages connections restricted by Client ID and context

    1. Extract client_type from token

    2. Validate specified Client ID according to context:

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

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

  2. Generate new secret for specified Connection ID and update it in mithril.connections for specified Connection ID

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. erify the validity of access token

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

  2. Check user scope connection:refresh_secret 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",
    "secret": "ZlFOaHBTR0d3Q0hQcDEraHVYdXBVZz09"
  }
}

Post-processing processes

API paragraph not found

HTTP status codes

HTTP status code

Message

What caused the error

200

Response

 

401

Access denied

403

  1. Invalid scopes

  2. forbidden

2. Validate specified Client ID

  • No labels