EccApiResponse
EccApiResponse is the envelope of every response of the business service. The payload - one of the other objects or a list of them - is in data.
Envelope of every response of the business service. The payload is in ‘data’; its type is given per endpoint. Errors use the same envelope with success=false.
import type { EccApiResponse } from "@/ecc/types/taskTypes";
Fields
| boolean | true for 2xx responses, false for errors. Example: |
| string | Message code for application errors with a defined code (EccException), e.g. EAP0001. Example: |
| string | Message text. Localized for coded application errors, otherwise the technical exception message. Example: |
| string | Language of the response, taken from the first Accept-Language entry. Default: en. Example: |
| string | UTC time of the response, format yyyy-MM-dd HH:mm:ssZ. Example: |
| integer | HTTP status code, same as the response status. Example: |
| string | HTTP reason phrase. Example: |
| boolean | true if data is a list. |
| integer | Number of list entries in data. |
| object | Payload. Type depends on the endpoint. For coded application errors the EccException. |
| string | Simple class name of the error or its data (errors only). Example: |
| string | Tenant of the user (Keycloak realm). Missing on 401 responses. Example: |
Fields without a value are left out of the JSON.
TypeScript type
The frontend type EccApiResponse follows this structure. Only in the TypeScript type (set by the frontend or kept for older data): arrayIndex, arrayOffset. Delivered by the API but not declared in the TypeScript type: .
Where it is used
Developer Guide | |
System Handbook |
On this page
- EccApiResponse