---
title: "Create Asset"
method: POST
path: "/api/v1/sdk/assets"
tags: ["public-api", "public-assets"]
---

# Create Asset

`POST /api/v1/sdk/assets`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/api/v1/sdk/assets`
- Auth: none declared

Create a new asset (data source connection).

Requires read-write API key scope. Does NOT auto-trigger schema discovery;
call POST /assets/{id}/discover explicitly when ready.

**SDK Usage:**
```python
from anomalyarmor import Client
client = Client()
asset = client.assets.create(
    name="Production Warehouse",
    asset_type="snowflake",
    host="abc123.snowflakecomputing.com",
    database_name="ANALYTICS",
    username="readonly_user",
    password="...",
)
```

## Headers

- `Authorization` string

## Request body

- CreateAssetRequest: Request to create a new asset (data source connection).
  - `name` string, required: Display name
  - `asset_type` string, required: Database type: snowflake, postgresql, databricks, bigquery, redshift, mysql, clickhouse, athena
  - `description` string, nullable: Optional description
  - `host` string, nullable: Database host
  - `port` integer, nullable: Database port
  - `database_name` string, nullable: Database name (required)
  - `username` string, nullable: Database username
  - `password` string, nullable: Database password
  - `ssl_enabled` boolean: Enable SSL
  - `default_catalog` string, nullable: Default catalog (Databricks/Snowflake)
  - `http_path` string, nullable: HTTP path (Databricks)
  - `extra_params` object, nullable: Extra connection parameters
  - `connection_config` object, nullable: Connection config dict (alternative to flat fields)

## Response `201`

Successful Response

- StandardResponse: Standard API response wrapper.
  - `success` boolean, required
  - `data` unknown
  - `message` string, nullable
  - `error` string, nullable
  - `meta` object, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api.md) · [All operations](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api/revisions/51c755fb5d0b?raw)
