---
jsApi: true
title: "[F] getResponsesForOperation"

---
```ts
getResponsesForOperation(program, operation): [HttpOperationResponse[], readonly Diagnostic[]]
```

Get the responses for a given operation.

## Parameters

| Parameter | Type |
| :------ | :------ |
| `program` | `Program` |
| `operation` | `Operation` |

## Returns

[[`HttpOperationResponse`](../interfaces/HttpOperationResponse.md)[], readonly `Diagnostic`[]]
