# IntegrationOpService

> The IntegrationOpService methods and their request and response messages.

Source: https://engramsfactory.com/docs/api/integration-op/

Generated from [`integration_op.proto`](https://github.com/cortexapps/engrams/blob/main/crates/engram-protocol/proto/engram/app/v1/integration_op.proto). Every method is
`POST /rpc/engram.app.v1.IntegrationOpService/<Method>` with a JSON or protobuf body and an
`x-api-key` header.

## Methods

| Method | Request | Response |
|---|---|---|
| `RunIntegrationOp` | [`RunIntegrationOpRequest`](#runintegrationoprequest) | [`RunIntegrationOpResponse`](#runintegrationopresponse) |
| `ResolveIntegrationCredential` | [`ResolveIntegrationCredentialRequest`](#resolveintegrationcredentialrequest) | [`ResolveIntegrationCredentialResponse`](#resolveintegrationcredentialresponse) |

## Messages

### AwsStsCred

| Field | Type |
|---|---|
| `access_key_id` | `string` |
| `secret_access_key` | `string` |
| `session_token` | `string` |

### BasicCred

| Field | Type |
|---|---|
| `username` | `string` |
| `password` | `string` |

### BearerCred

| Field | Type |
|---|---|
| `token` | `string` |

### CredentialSpec

| Field | Type |
|---|---|
| `source` | `string` |
| `injects` | repeated [`OpInject`](#opinject) |
| `mint_provider` | `string` |
| `oauth_connection_id` | `string` |
| `mint_kind` | `string` |
| `mint_draft_fields` | `map<string, string>` |

### HeadersCred

| Field | Type |
|---|---|
| `values` | `map<string, string>` |

### OpInject

| Field | Type |
|---|---|
| `header` | `string` |
| `template` | `string` |
| `secret_ref` | `string` |
| `draft_secret` | `string` |

### ResolvedCredential

| Field | Type |
|---|---|
| `bearer` | [`BearerCred`](#bearercred) (one of cred) |
| `basic` | [`BasicCred`](#basiccred) (one of cred) |
| `headers` | [`HeadersCred`](#headerscred) (one of cred) |
| `aws_sts` | [`AwsStsCred`](#awsstscred) (one of cred) |
| `expires_at` | `string` |

### ResolveIntegrationCredentialRequest

| Field | Type |
|---|---|
| `provider` | `string` |
| `credential` | [`CredentialSpec`](#credentialspec) |

### ResolveIntegrationCredentialResponse

| Field | Type |
|---|---|
| `credential` | [`ResolvedCredential`](#resolvedcredential) |

### RunIntegrationOpRequest

| Field | Type |
|---|---|
| `provider` | `string` |
| `host` | `string` |
| `method` | `string` |
| `path` | `string` |
| `body` | `bytes` |
| `content_type` | `string` |
| `credential` | [`CredentialSpec`](#credentialspec) |

### RunIntegrationOpResponse

| Field | Type |
|---|---|
| `status` | `uint32` |
| `body` | `bytes` |
| `content_type` | `string` |
| `truncated` | `bool` |
