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

Skip to end of metadata
Go to start of metadata

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

Compare with Current View Version History

« Previous Version 4 Current »

Purpose

This WS allows to find Legal Entity Reorganization Jobs in Admin panel using search params.

Key points

  1. This is a graphQl query method used in Administration panel only

  2. Only authenticated and authorized NHS employee with appropriate scope can search LE Reorganization Jobs

  3. Query returns a list of LE Reorganization Jobs filtered by search params

Specification

Link

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

Resource

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

Scope

legal_entity_merge_job:read

Scope для доступу

Components

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

Microservices

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

Protocol type

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

Request type

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

Sync/Async

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

Public/Private/Internal

Private

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

 legalEntitiesReorganizationJobsQuery
  "Reads and enables pagination through a set of `LegalEntityReorganizationJob`."
  legalEntityReorganizationJobs(
    "A condition to be used in determining which values should be returned by the collection."
    filter: LegalEntityReorganizationJobFilter
    "The method to use when ordering collection items."
    orderBy: LegalEntityReorganizationJobOrderBy
    "Read all values in the set after (below) this cursor."
    after: String
    "Read all values in the set before (above) this cursor."
    before: String
    "Only read the first _n_ values of the set."
    first: Int
    "Only read the last _n_ values of the set."
    last: Int
  ): LegalEntityReorganizationJobConnection!
"""
Filter for Legal entity reorganization job.
"""
input LegalEntityReorganizationJobFilter {
  "Legal entity reorganization job status filters."
  status: JobStatus
  "Legal entity reorganization job type filters."
  type: LegalEntityReorganizationJobType
  "Reorganized Legal entity data filters."
  reorganizedLegalEntity: ReorganizedLegalEntityFilter 
}

Logic

  1. Get list of all LE Reorganization Jobs filtered by

    1. submitted search params

    2. job types merge_legal_entities and reorganize_legal_entities

  2. Render list with LE Reorganization Jobs data according to schema

  3. Return number of total entries found in PageInfo block

Request structure

See on Apiary

Authorize

  • Verify the validity of access token

    • in case of error - return 401 (“Invalid access token”) in case of validation fails

  • Verify that token is not expired

    • in case of error - return 401 (“Invalid access token”)

  • Check user scopes in order to perform this action (scope = 'legal_entity_merge_job:read')

    • return 403 (“Your scope does not allow to access this resource. Missing allowances: legal_entity_merge_job:read”) in case of invalid scope(s)

Headers

API paragraph not found

Request data validation

Validate legal entity

  • Extract client_id from token.

  • Check client scopes in order to perform this action (scope = 'legal_entity_merge_job:read')

    • in case of error - return 403 (“Your scope does not allow to access this resource. Missing allowances: legal_entity_merge_job:read”)

  • Check legal entity status (status = ACTIVE)

    • In case of error - return 409 ('client_id refers to legal entity that is not active')

Processing

Search with a few params performs according to the logical AND rule.

  1. status. Search by jobs.status

  2. legalEntityReorganizationJobType. Search by jobs.meta.type (LE Reorganization Type)

  3. reorganizedLegalEntity. Search by jobs.meta.merged_from_legal_entity.edrpou (Reorganized Legal Entity Edrpou)

Response structure

See on Apiary

Post-processing processes*

API paragraph not found

HTTP status codes*

API paragraph not found

  • No labels