> For the complete documentation index, see [llms.txt](https://docs.cloud4.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloud4.ai/sdk/response.md).

# Response

## C4AI SDK - EES Raw Request Execution Result

The `C4AI_SDK_TYPES__EES_RawRequestExecutionResult` type represents the detailed information regarding the execution of a request within the Cloud4.ai system.

<table><thead><tr><th width="160">Property</th><th width="210">Type</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>string</td><td>The unique identifier of the request.</td></tr><tr><td>status</td><td>string</td><td>The status of the request.</td></tr><tr><td>mode</td><td>'play' | 'real'</td><td>The mode of the request, indicating whether it was played or executed in real-time.</td></tr><tr><td>start</td><td>string</td><td>The start time of the request.</td></tr><tr><td>end</td><td>string | undefined</td><td>The end time of the request. If the request is not completed, this field will be empty.</td></tr><tr><td>duration</td><td>number</td><td>The duration of the request, calculated as the difference between the end and start time.</td></tr><tr><td>command</td><td>string</td><td>The name of the command that was executed.</td></tr><tr><td>service</td><td>string</td><td>The SIC (Service Identifier Code) of the service that was executed.</td></tr><tr><td>user</td><td>string | undefined</td><td>The user SIC that executed the request.</td></tr><tr><td>api</td><td>string | undefined</td><td>The API SIC that was used to execute the command.</td></tr><tr><td>organization</td><td>string</td><td>The organization SIC that was used to execute the command.</td></tr><tr><td>meta</td><td>any | undefined</td><td>The metadata of the request, containing additional information in JSON format.</td></tr><tr><td>result</td><td><a data-mention href="#c4ai-sdk-aac-execute-command-api-result">#c4ai-sdk-aac-execute-command-api-result</a> | undefined</td><td>The result of the request.</td></tr><tr><td>error</td><td><a data-mention href="#c4ai-sdk-api-provider-error">#c4ai-sdk-api-provider-error</a> | undefined</td><td>The error of the request. If the request was successful, this field will be empty.</td></tr><tr><td>createdAt</td><td>string</td><td>The time when the request was created in the system.</td></tr></tbody></table>

### Example

> ❗️**Note:**  The same response object will be passed to [Execution Options](/sdk/request/execution-options.md#callback) in case it provided

```typescript
const exampleResult: C4AI_CommandRequest = {
  rawResult: {
    id: 'c4ai-cr::04b3735e-22ec-4de2-b5fa-ff9cc1f40048',
    status: 'COMPLETED',
    mode: 'real',
    command: 'EXECUTE',
    service: 'sic@0000000001:aac-instance:0000000001',
    result: {
      result: 'My neck can be up to 6 feet long, making it the longest neck of any land animal!',
      payload: [Object]
    },
    api: 'sic@0000000001:api-credentials:0000000019',
    organization: 'sic@0000000000:organization:0000000001',
    duration: 1,
    start: '2024-04-30T23:16:54.746Z',
    end: '2024-04-30T23:16:56.264Z',
    createdAt: 'Tue Apr 30 2024 23:16:56 GMT+0000'
  }
};
```

## C4AI SDK - API Provider Error

The `C4AI_SDK_TYPES__APIProviderError` type represents an error that may occur during the execution of a request within the Cloud4.ai system.

<table><thead><tr><th width="171">Property</th><th width="183">Type</th><th>Description</th></tr></thead><tbody><tr><td>name</td><td>string</td><td>The name of the error.</td></tr><tr><td>code</td><td>string</td><td>The error code.</td></tr><tr><td>description</td><td>string | undefined</td><td>An optional description providing more details about the error.</td></tr><tr><td>message</td><td>string</td><td>The error message.</td></tr></tbody></table>

### Example

```typescript
const exampleError: C4AI_SDK_TYPES__APIProviderError = {
  code: 'C4AI_INT_SDK_API_ERROR__EES__0001',
  name: 'Executor service is not active',
  message: 'Executor service is not active',
  description: 'Please make sure that the service status is Active and the services are available to receive commands.',
};
```

This example demonstrates an instance of the `C4AI_SDK_TYPES__APIProviderError` containing details of an error encountered during the execution of a request. Actual data is anonymized for confidentiality purposes.

## C4AI SDK - AAC Execute Command API Result

The `C4AI_SDK_TYPES__AAC_ExecuteCommandAPIResult` type represents the result of executing a command through the AAC (AI API Connector) service within the Cloud4.ai system.

| Property | Type                                     | Description                                                                  |
| -------- | ---------------------------------------- | ---------------------------------------------------------------------------- |
| result   | any                                      | The result of the command execution.                                         |
| payload  | C4AI\_SDK\_Dictionary\<any> \| undefined | An optional payload containing additional data specific to the AAC provider. |

### Example:

```typescript
const exampleResult: C4AI_SDK_TYPES__AAC_ExecuteCommandAPIResult = {
  result: 'Success',
  payload: {
    confidence: 0.85,
    entities: ['apple', 'orange', 'banana'],
  }
};
```

This example demonstrates an instance of the `C4AI_SDK_TYPES__AAC_ExecuteCommandAPIResult` type containing the result of a command execution through the AAC service. Actual data may vary depending on the specific AAC provider.
