# Get Request Metrics

This section allows you to get the metrics for a request

## Get Video Request Metrics

> Get metrics for the request\
> \
> \## Response body\
> \
> \| \*\*Property\*\*        | \*\*Type\*\* | \*\*Description\*\*                                     |\
> \|---------------------|----------|-----------------------------------------------------|\
> \| \*\*minutesInState\*\*  | Object   | Minutes spent in various processing states          |\
> \| \*\*minutesInState.pendingSourceUpload\*\* | Number    | - |\
> \| \*\*minutesInState.initializing\*\*        | Number    | - |\
> \| \*\*minutesInState.preprocessing\*\*       | Number    | - |\
> \| \*\*minutesInState.processing\*\*          | Number    | - |\
> \| \*\*minutesInState.postprocessing\*\*      | Number    | - |\
> \| \*\*minutesToEnhance\*\*| Number   | Time to complete enhancement after source upload    |\
> \| \*\*inputFrames\*\*     | Integer  | Number of input frames                              |\
> \| \*\*outputFrames\*\*    | Integer  | Number of output frames                             |\
> \| \*\*inputSize\*\*       | String   | Size of input video                                 |\
> \| \*\*outputSize\*\*      | String   | Size of output video                                |\
> \| \*\*chunks\*\*          | Array    | Refer to \*\*VideoChunkMetrics\*\* below                |\
> \
> \---\
> \
> \#### VideoChunkMetrics\
> \
> \| \*\*Property\*\*        | \*\*Type\*\*   | \*\*Description\*\*                                  |\
> \|---------------------|------------|--------------------------------------------------|\
> \| \*\*chunkIndex\*\*                | Integer   | Index of the chunk                      |\
> \| \*\*tasks\*\*                     | Array     | List of processing tasks for the chunk  |\
> \| \*\*tasks.\*.minutesProcessing\*\* | Number    | Duration of processing in minutes       |\
> \| \*\*tasks.\*.inputFrames\*\*       | Integer   | Number of input frames                  |\
> \| \*\*tasks.\*.outputFrames\*\*      | Integer   | Number of output frames                 |\
> \| \*\*tasks.\*.inputSize\*\*         | String    | Size of the input file                  |\
> \| \*\*tasks.\*.outputSize\*\*        | String    | Size of the output file                 |<br>

```json
{"openapi":"3.0.3","info":{"title":"Video API","version":"1.0.0"},"tags":[{"name":"Get Request Metrics","description":"This section allows you to get the metrics for a request\n"}],"servers":[{"url":"https://api.topazlabs.com","description":"Production API base URL"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"MetricsResponse":{"type":"object","properties":{"minutesInState":{"type":"object","properties":{"pendingSourceUpload":{"type":"number"},"initializing":{"type":"number"},"preprocessing":{"type":"number"},"processing":{"type":"number"},"postprocessing":{"type":"number"}}},"minutesToEnhance":{"type":"number","description":"Time taken for the final enhanced video to become available for download after user finished uploading the source video."},"inputFrames":{"type":"integer"},"outputFrames":{"type":"integer"},"inputSize":{"type":"string"},"outputSize":{"type":"string"},"chunks":{"type":"array","description":"Metrics for each chunk","items":{"$ref":"#/components/schemas/ChunkMetrics"}}}},"ChunkMetrics":{"type":"object","properties":{"chunkIndex":{"type":"integer","description":"Index of the chunk starting from 0"},"tasks":{"type":"array","description":"Multiple enhancement tasks may have been run on a chunk","items":{"type":"object","properties":{"minutesProcessing":{"type":"number"},"inputFrames":{"type":"integer"},"outputFrames":{"type":"integer"},"inputSize":{"type":"string"},"outputSize":{"type":"string"}}}}}}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"NotFound":{"description":"Enhancement request with the provided ID not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"paths":{"/video/{requestId}/metrics":{"get":{"tags":["Get Request Metrics"],"summary":"Get Video Request Metrics","operationId":"GetVideoRequestMetrics","description":"Get metrics for the request\n\n## Response body\n\n| **Property**        | **Type** | **Description**                                     |\n|---------------------|----------|-----------------------------------------------------|\n| **minutesInState**  | Object   | Minutes spent in various processing states          |\n| **minutesInState.pendingSourceUpload** | Number    | - |\n| **minutesInState.initializing**        | Number    | - |\n| **minutesInState.preprocessing**       | Number    | - |\n| **minutesInState.processing**          | Number    | - |\n| **minutesInState.postprocessing**      | Number    | - |\n| **minutesToEnhance**| Number   | Time to complete enhancement after source upload    |\n| **inputFrames**     | Integer  | Number of input frames                              |\n| **outputFrames**    | Integer  | Number of output frames                             |\n| **inputSize**       | String   | Size of input video                                 |\n| **outputSize**      | String   | Size of output video                                |\n| **chunks**          | Array    | Refer to **VideoChunkMetrics** below                |\n\n---\n\n#### VideoChunkMetrics\n\n| **Property**        | **Type**   | **Description**                                  |\n|---------------------|------------|--------------------------------------------------|\n| **chunkIndex**                | Integer   | Index of the chunk                      |\n| **tasks**                     | Array     | List of processing tasks for the chunk  |\n| **tasks.*.minutesProcessing** | Number    | Duration of processing in minutes       |\n| **tasks.*.inputFrames**       | Integer   | Number of input frames                  |\n| **tasks.*.outputFrames**      | Integer   | Number of output frames                 |\n| **tasks.*.inputSize**         | String    | Size of the input file                  |\n| **tasks.*.outputSize**        | String    | Size of the output file                 |\n","parameters":[{"in":"path","name":"requestId","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```
