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

1RC_[NEW] Get equipments list

Purpose

This WS is designed to return list of all active equipments related to legal entity. It is also allow to search for some equipments by search criteria

Specification

Apiary

Authorization

  • Verify the validity of access token

    • 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 = 'equipment:read')

    • Return (403, 'Your scope does not allow to access this resource. Missing allowances: equipment:read') in case of invalid scope(s)

Service logic

Service returns all equipments related to legal_entity and filtered by passed query parameters:

  1. Get all equipments (PRM database)

  2. Filter by legal_entity (extract client_id from token)

  3. Filter list by passed search parameters (according to spec.)

    1. Search using like operation. Case insensitive

  4. Preload equipment names from prm.equipment_names

  5. Render a response according to specification

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