Table of Contents |
---|
Purpose
This WS allows to find Legal Entity Reorganization Jobs in Admin panel using search params.
Key points
This is a graphQl query method used in Administration panel only
Only authenticated and authorized NHS employee with appropriate scope can search LE Reorganization Jobs
Query returns a list of LE Reorganization Jobs filtered by search params
Specification
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Authorization
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)
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')
Search params
Search with a few params performs according to the logical AND rule.
status. Search byjobs.status
legalEntityReorganizationJobType. Search by jobs.meta.type (LE Reorganization Type)
reorganizedLegalEntity. Search by jobs.meta.merged_from_legal_entity.edrpou (Reorganized Legal Entity Edrpou)
Service logic
Get list of all LE Reorganization Jobs filtered by
submitted search params
job types merge_legal_entities and reorganize_legal_entities
Render list with LE Reorganization Jobs data according to schema
Return number of total entries found in PageInfo block