# Create agent check in

URL: https://docs.hanzo.ai/docs/openapi/o11y/agentcheckindeprecated

> The deployed agent's check-in on its original hyphenated path, kept for backward compatibility with agents already running.

`POST /v1/o11y/cloud-integrations/{cloud_provider}/agent-check-in`

> [O11y →](https://docs.hanzo.ai/docs/openapi/o11y) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                                                                   |
| ------------- | --------------------------------------------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/o11y/cloud-integrations/{cloud_provider}/agent-check-in` |
| **Method**    | `POST`                                                                            |
| **Operation** | `AgentCheckInDeprecated`                                                          |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`                                            |

The deployed agent's check-in on its original
hyphenated path, kept for backward compatibility with agents already
running. Viewer gate — the agent's role is viewer.

## Request

7 fields, body `application/json` (required).

| Field                | In   | Type   | Required | Description |
| -------------------- | ---- | ------ | -------- | ----------- |
| `cloud_provider`     | path | string | yes      |             |
| `account_id`         | body | string | —        |             |
| `cloud_account_id`   | body | string | —        |             |
| `cloudIntegrationId` | body | any    | —        |             |
| `data`               | body | object | —        |             |
| `data.*`             | body | any    | —        |             |
| `providerAccountId`  | body | string | —        |             |

## Response

| Status    | Body                     | Meaning           |
| --------- | ------------------------ | ----------------- |
| `200`     | o11y.O11yAgentCheckInOut | ok                |
| `202`     | Approval                 | held for approval |
| `default` | problem-details          | refused           |

`200` body — 46 fields.

| Field                                                                                              | In   | Type                                     | Always | Description                                                                                                                                                         |
| -------------------------------------------------------------------------------------------------- | ---- | ---------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `data`                                                                                             | body | o11y.GettableAgentCheckIn                | —      |                                                                                                                                                                     |
| `data.account_id`                                                                                  | body | string                                   | —      | Older fields for backward compatibility with existing AWS agents                                                                                                    |
| `data.cloud_account_id`                                                                            | body | string                                   | —      |                                                                                                                                                                     |
| `data.cloudIntegrationId`                                                                          | body | string                                   | —      |                                                                                                                                                                     |
| `data.integration_config`                                                                          | body | o11y.IntegrationConfig                   | —      |                                                                                                                                                                     |
| `data.integration_config.enabled_regions`                                                          | body | string\[]                                | —      | backward compatible                                                                                                                                                 |
| `data.integration_config.telemetry`                                                                | body | o11y.OldAWSCollectionStrategy            | —      |                                                                                                                                                                     |
| `data.integration_config.telemetry.aws_logs`                                                       | body | o11y.OldAWSLogsStrategy                  | —      |                                                                                                                                                                     |
| `data.integration_config.telemetry.aws_logs.cloudwatch_logs_subscriptions`                         | body | object\[]                                | —      |                                                                                                                                                                     |
| `data.integration_config.telemetry.aws_logs.cloudwatch_logs_subscriptions[].filter_pattern`        | body | string                                   | —      |                                                                                                                                                                     |
| `data.integration_config.telemetry.aws_logs.cloudwatch_logs_subscriptions[].log_group_name_prefix` | body | string                                   | —      |                                                                                                                                                                     |
| `data.integration_config.telemetry.aws_metrics`                                                    | body | o11y.OldAWSMetricsStrategy               | —      |                                                                                                                                                                     |
| `data.integration_config.telemetry.aws_metrics.cloudwatch_metric_stream_filters`                   | body | object\[]                                | —      |                                                                                                                                                                     |
| `data.integration_config.telemetry.aws_metrics.cloudwatch_metric_stream_filters[].MetricNames`     | body | string\[]                                | —      |                                                                                                                                                                     |
| `data.integration_config.telemetry.aws_metrics.cloudwatch_metric_stream_filters[].Namespace`       | body | string                                   | —      |                                                                                                                                                                     |
| `data.integration_config.telemetry.provider`                                                       | body | string                                   | —      |                                                                                                                                                                     |
| `data.integration_config.telemetry.s3_buckets`                                                     | body | object                                   | —      |                                                                                                                                                                     |
| `data.integration_config.telemetry.s3_buckets.*`                                                   | body | string\[]                                | —      |                                                                                                                                                                     |
| `data.integrationConfig`                                                                           | body | o11y.ProviderIntegrationConfig           | —      |                                                                                                                                                                     |
| `data.integrationConfig.aws`                                                                       | body | o11y.AWSIntegrationConfig                | —      |                                                                                                                                                                     |
| `data.integrationConfig.aws.enabledRegions`                                                        | body | string\[]                                | —      |                                                                                                                                                                     |
| `data.integrationConfig.aws.telemetryCollectionStrategy`                                           | body | o11y.AWSTelemetryCollectionStrategy      | —      |                                                                                                                                                                     |
| `data.integrationConfig.aws.telemetryCollectionStrategy.logs`                                      | body | o11y.AWSLogsCollectionStrategy           | —      |                                                                                                                                                                     |
| `data.integrationConfig.aws.telemetryCollectionStrategy.logs.subscriptions`                        | body | o11y.AWSCloudWatchLogsSubscription\[]    | —      |                                                                                                                                                                     |
| `data.integrationConfig.aws.telemetryCollectionStrategy.logs.subscriptions[].filterPattern`        | body | string                                   | —      | <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html> "" implies no filtering is required                                          |
| `data.integrationConfig.aws.telemetryCollectionStrategy.logs.subscriptions[].logGroupNamePrefix`   | body | string                                   | —      | subscribe to all logs groups with specified prefix.                                                                                                                 |
| `data.integrationConfig.aws.telemetryCollectionStrategy.metrics`                                   | body | o11y.AWSMetricsCollectionStrategy        | —      |                                                                                                                                                                     |
| `data.integrationConfig.aws.telemetryCollectionStrategy.metrics.streamFilters`                     | body | o11y.AWSCloudWatchMetricStreamFilter\[]  | —      | to be used as <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-includefilters> |
| `data.integrationConfig.aws.telemetryCollectionStrategy.metrics.streamFilters[].metricNames`       | body | string\[]                                | —      |                                                                                                                                                                     |
| `data.integrationConfig.aws.telemetryCollectionStrategy.metrics.streamFilters[].namespace`         | body | string                                   | —      | <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-metricstream-metricstreamfilter.html>                                     |
| `data.integrationConfig.aws.telemetryCollectionStrategy.s3Buckets`                                 | body | object                                   | —      | Only available in S3 Sync Service Type in AWS                                                                                                                       |
| `data.integrationConfig.aws.telemetryCollectionStrategy.s3Buckets.*`                               | body | string\[]                                | —      |                                                                                                                                                                     |
| `data.integrationConfig.azure`                                                                     | body | o11y.AzureIntegrationConfig              | —      |                                                                                                                                                                     |
| `data.integrationConfig.azure.deploymentRegion`                                                    | body | string                                   | —      |                                                                                                                                                                     |
| `data.integrationConfig.azure.resourceGroups`                                                      | body | string\[]                                | —      |                                                                                                                                                                     |
| `data.integrationConfig.azure.telemetryCollectionStrategy`                                         | body | o11y.AzureTelemetryCollectionStrategy\[] | —      |                                                                                                                                                                     |
| `data.integrationConfig.azure.telemetryCollectionStrategy[].logs`                                  | body | o11y.AzureLogsCollectionStrategy         | —      |                                                                                                                                                                     |
| `data.integrationConfig.azure.telemetryCollectionStrategy[].logs.categoryGroups`                   | body | string\[]                                | —      | List of categories to enable for diagnostic settings, to start with it will have 'allLogs' and no filtering.                                                        |
| `data.integrationConfig.azure.telemetryCollectionStrategy[].metrics`                               | body | o11y.AzureMetricsCollectionStrategy      | —      |                                                                                                                                                                     |
| `data.integrationConfig.azure.telemetryCollectionStrategy[].resourceProvider`                      | body | string                                   | —      | <https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-providers-and-types>                                                            |
| `data.integrationConfig.azure.telemetryCollectionStrategy[].resourceType`                          | body | string                                   | —      |                                                                                                                                                                     |
| `data.integrationConfig.gcp`                                                                       | body | o11y.GCPIntegrationConfig                | —      |                                                                                                                                                                     |
| `data.providerAccountId`                                                                           | body | string                                   | —      |                                                                                                                                                                     |
| `data.removed_at`                                                                                  | body | string (date-time)                       | —      |                                                                                                                                                                     |
| `data.removedAt`                                                                                   | body | string (date-time)                       | —      |                                                                                                                                                                     |
| `status`                                                                                           | body | string                                   | —      | Status is "success".                                                                                                                                                |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo o11y cloud-integrations agent-check-in <cloud_provider>
```

**SDK**

**.ts**

```ts
import { Configuration, O11yApi } from 'hanzoai';

const api = new O11yApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.agentCheckInDeprecated({ cloud_provider: 'cloud_provider', account_id: "<account_id>", cloud_account_id: "<cloud_account_id>" });
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import O11yApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = O11yApi(client).agent_check_in_deprecated(cloud_provider='cloud_provider', account_id="<account_id>", cloud_account_id="<cloud_account_id>")
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.O11yAPI.AgentCheckInDeprecated(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, o11y_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = o11y_api::agent_check_in_deprecated(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.O11yApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new O11yApi(client).agentCheckInDeprecated();
```

**HTTP**

```bash
curl -X POST https://api.hanzo.ai/v1/o11y/cloud-integrations/<cloud_provider>/agent-check-in \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "account_id": "<account_id>",
       "cloud_account_id": "<cloud_account_id>"
     }'
```

**MCP**

Tool `o11y`, op `AgentCheckInDeprecated` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "o11y",
         "arguments": {
           "op": "AgentCheckInDeprecated",
           "input": {
             "cloud_provider": "<cloud_provider>",
             "account_id": "<account_id>",
             "cloud_account_id": "<cloud_account_id>"
           }
         }
       }
     }'
```

---

[O11y API](https://docs.hanzo.ai/docs/openapi/o11y) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
