# Component metrics endpoints

| Method | Endpoint | Description | Query parameters | Body |
| --- | --- | --- | --- | --- |
| GET | /monitoring/observability/executions/{runId}/component | Gets component metrics of a given task run. | <ul> <li><span>limit</span>: number of entries to return. The default                           value is 50 and the maximum value is 200 </li> <li><span>offset</span>: the start position of the pagination of                           the entries, greater or equal to 0</li> <li><span>sortBy</span>: the field by which the returned entries                           are sorted. The default value is                              <span>component_start_time_seconds</span>. For all the available                           values, see <a href="https://help.qlik.com/talend/en-US/api-user-guide/Cloud/observability-metrics-endpoints">sortBy</a>.</li> <li><span>sortOrder</span>: the way in which the returned logs are                           sorted, <span>desc</span> or <span>asc</span>. The default value                           is <span>desc</span>, meaning the order is descending. <p>Whether the                              order is ascending or descending, a null or an empty field is always                              placed at the end of the list to be returned in the response.</p></li> </ul><br><br>These parameters are all optional. | N/A |
| POST | /monitoring/observability/metrics/component | Searches for raw component metrics data. | No parameter. | ```<br>{<br>"environmentId": "6093f6a36f01d639680d31cd",<br>"startTime": "2021-09-08T06:58:04.604Z",<br>"endTime": "2021-09-08T06:58:06.463Z",<br>"limit": 50,<br>"offset": 0,<br>"sortBy": "component_start_time_seconds",<br>"sortOrder": "asc",<br>"filters": [<br>{<br>"field": "engine_id",<br>"operator": "in",<br>"value": ["a60bb1c0-7669-407f-9326-138af05da18a"]<br>},<br>{<br>"field": "component_start_time_seconds",<br>"operator": "gte",<br>"value": 1628266578<br>}<br>]<br>}<br>```<br><br>For further information about the fields to be used in the body, see the<br>following section. |

## Fields used by the observability metrics endpoints

- environmentId
- Required
    - ID of the environment to which a task and its space belong
- startTime
- Required
    - The start time when a component in your Job task starts to work. The ISO format to be used is yyyy-MM-dd'T'HH:mm:ss.SSS'Z', for example, 2021-09-08T06:58:04.604Z.
- endTime
- Required
    - The end time when a component in your Job task terminates its work. The ISO format to be used is yyyy-MM-dd'T'HH:mm:ss.SSS'Z', for example, 2021-09-08T06:59:04.804Z.  startTime must be earlier than endTime.
- limit
- Optional
    - Number of entries to return. The default value is 50 and the maximum value is 200
- offset
- Optional
    - The start position of the pagination of the entries, greater or equal to 0
- sortBy
- Optional
    - The field by which the returned entries are sorted. The default value is component\_start\_time\_seconds. The fields to be used are: * account\_id * engine\_id * engine\_type * engine\_version * workspace\_id * task\_id * task\_execution\_id * process\_id: JVM's UUID * job\_name * pid: unique Job identifier for the current run * father\_pid: ID of the first direct parent Job * root\_pid: ID of the first root Job if there are several Subjobs * connector\_type * connector\_label * connector\_id * target\_connector\_type * target\_label * target\_id * connection\_type * connection\_name * Availability-note[Deprecated](https://help.talend.com/r/en-US/Cloud/labels-on-talend-help-center/availability-deprecated)    This content is deprecated.    component\_start\_time\_seconds * component\_connection\_rows\_total * component\_execution\_duration\_milliseconds
- sortOrder
- Optional
    - The way in which the returned logs are sorted, desc or asc. The default value is desc, meaning the order is descending.  Whether the order is ascending or descending, a null or an empty field is always placed at the end of the list to be returned in the response
- filters
- Optional
    - Used to filter metrics data in your search request sent to /monitoring/observability/metrics/component, for example, ``` {     "field": "connector_id",      "operator": "in",      "value": ["tMongoDBConnection_1"] } ```  This filter is applied on the connector\_id field to find metrics data related to the component of which the ID is tMongoDBConnection\_1. ``` {     "field": "component_start_time_seconds",      "operator": "gt",      "value": 1628266578 } ```  This filter is applied on the component\_start\_time\_seconds field to find metrics data related to the components which started to run at a time later than 1628266578. ``` {     "field": "operator_type",      "operator": "in",      "value": ["HUMAN", "SERVICE"] } ```  This filter is applied on the operator\_type field to find metrics data related to tasks started by a user or a service account.  The fields to be used in a filter are: * engine\_id * engine\_type * engine\_version * workspace\_id * task\_id * task\_execution\_id * job\_name * connector\_type, for example, tMongoDBConnection * connector\_label, for example, tMongoDBConnection\_1 * connector\_id, for example, tMongoDBConnection\_1 * component\_start\_time\_seconds: this field supports gt, gte, lt and lte only while the other fields support in only * operator: the ID of the user or the service account that starts a task * operator\_type: HUMAN for a user and SERVICE for a service account  The operators to be used in a filter are: * in: matches values in an array. * gt: later than. It requires a number or a string of number. * gte: equal or later than. It requires a number or a string of number. * lt: earlier than. It requires a number or a string of number. * lte: equal or earlier than. It requires a number or a string of number.