# First class Data Warehouse Integration API

Version: 1.0.0

## Servers

Production AWS server
```
https://dwh-integration-api.treasuredata.com
```

Production EU01 server
```
https://dwh-integration-api.eu01.treasuredata.com
```

Production AP02 server
```
https://dwh-integration-api.ap02.treasuredata.com
```

Production AP03 server
```
https://dwh-integration-api.ap03.treasuredata.com
```

Production AWS Tokyo server
```
https://dwh-integration-api.treasuredata.co.jp
```

## Security

### apiKey

A dedicated DWH Integration user api key. A prefix `TD1 ` is needed. For example, `TD1 xxx`.

Type: apiKey
In: header
Name: Authorization

## Download OpenAPI description

[First class Data Warehouse Integration API](https://docs.treasure.ai/_bundle/apis/dwh_integration_api-public.yaml)

## Other

### List all DWH Integrations for the current user.

 - [GET /v1/dwh/](https://docs.treasure.ai/apis/dwh_integration_api-public/paths/~1v1~1dwh~1/get.md)

### Create a new DWH Integration

 - [POST /v1/dwh/](https://docs.treasure.ai/apis/dwh_integration_api-public/paths/~1v1~1dwh~1/post.md): Note: the DWH Integration will not automatically create the TD database and tables.
You need to create the TD database and tables before creating the DWH Integration.

### Get a DWH Integration.

 - [GET /v1/dwh/{dwh_id}](https://docs.treasure.ai/apis/dwh_integration_api-public/paths/~1v1~1dwh~1%7Bdwh_id%7D/get.md)

### Update a DWH Integration.

 - [PUT /v1/dwh/{dwh_id}](https://docs.treasure.ai/apis/dwh_integration_api-public/paths/~1v1~1dwh~1%7Bdwh_id%7D/put.md)

### Delete a DWH Integration.

 - [DELETE /v1/dwh/{dwh_id}](https://docs.treasure.ai/apis/dwh_integration_api-public/paths/~1v1~1dwh~1%7Bdwh_id%7D/delete.md): This will destroy the integration, generated Workflow project and all generated Bulkload Sessions.

### List all Bulkload sessions of the current DWH Integration.

 - [GET /v1/dwh/{dwh_id}/bulkload_sessions](https://docs.treasure.ai/apis/dwh_integration_api-public/paths/~1v1~1dwh~1%7Bdwh_id%7D~1bulkload_sessions/get.md)

### Get a DWH Integration configuration.

 - [GET /v1/dwh/{dwh_id}/configs](https://docs.treasure.ai/apis/dwh_integration_api-public/paths/~1v1~1dwh~1%7Bdwh_id%7D~1configs/get.md)

### Trigger run the DWH Integration workflow.

 - [PUT /v1/dwh/{dwh_id}/run_workflow](https://docs.treasure.ai/apis/dwh_integration_api-public/paths/~1v1~1dwh~1%7Bdwh_id%7D~1run_workflow/put.md)

### List all DWH Workflow session attempts.

 - [GET /v1/dwh/{dwh_id}/session_attempts](https://docs.treasure.ai/apis/dwh_integration_api-public/paths/~1v1~1dwh~1%7Bdwh_id%7D~1session_attempts/get.md)

### Guess DWH Integration configuration

 - [POST /v1/guess](https://docs.treasure.ai/apis/dwh_integration_api-public/paths/~1v1~1guess/post.md): Perform Guess operation for complete DWH Integration configuration by providing basic_configs.

