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

RC_(MC-1167)_[NEW] Get Composition Configurations by search params

Purpose

This method allows to get composition_configurations that are used for request validation on Create Composition method.

Specification

Apiary

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 and client scopes in order to perform this action (scope = 'composition:read')

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

Validate query parameters

  1. Validate required query parameter type is filled

    1. Return 422 ("Required query parameter type is missing”) in case of error

  2. Validate value in query parameter type is from COMPOSITION_TYPES dictionary

    1. Return 422 ("Incorrect value for query parameter type") in case of error

  3. Validate required query parameter category is filled

    1. Return 422 ("Required query parameter category is missing”) in case of error

  4. Validate value in query parameter category is from COMPOSITION_CATEGORIES dictionary

    1. Return 422 ("Incorrect value for query parameter category”) in case of error

Service logic

  1. Select composition_configurations records from PRM filtered by type and category from the request

  2. Exclude from composition_configurations.settings json elements where check = “Any”

  3. Return response to the client according to schema

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