---
title: "Activate a connection by id."
method: POST
path: "/connections/{id}/activate"
tags: ["Connection Operations"]
---

# Activate a connection by id.

`POST /connections/{id}/activate`

## Request

- Base URL: `https://replace-with-account.api.decodable.co/v1alpha2`
- URL: `https://replace-with-account.api.decodable.co/v1alpha2/connections/{id}/activate`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://auth.decodable.co/authorize?audience=https://api.decodable.co/`
    - Token URL: `https://auth.decodable.co/oauth/token` scopes: `activate:connection`
- TypeScript: <https://skmtc.dev/decodable/apis/decodable-control-plane/docs/connections/:id/activate/post.ts> (a function with typed inputs; its response is checked against the schema)

Requires permission matching: `connection:activate:default.<name>`.

## Path parameters

- `id` string, required

## Query parameters

- `force` boolean
- `tasks` integer
- `response_schema_v` 'v1' | 'v2'

## Request body

- object
  - `start_position` StartPosition: A descriptor of a start position on a stream
    - `type` string
    - `value` string
  - `task_size` string, nullable: A task size identifier.

## Response `200`

A connection update response.

- union
  - object, nullable: the number of tasks used when an object is activated
    - `id` string: An opaque ID, created by Decodable, that uniquely identifies a resource.
    - `name` string: The connection name.
    - `description` string: The connection description.
    - `connector` 'astra-streaming' | 'clickhouse' | 'confluent-cloud' | 'datadog' | 'datagen' | 'delta-lake' | 'druid' | 'dynamodb-cdc' | 'elasticsearch' | 'gcp-pubsub' | 'hudi' | 'influxdb' | 'kafka' | 'kinesis' | 'mongodb' | 'mongodb-cdc' | 'ms-sql' | 'mysql-cdc' | 'oracle' | 'oracle-cdc' | 'pinot' | 'polaris' | 'postgres' | 'postgres-cdc' | 'pulsar' | 'redis' | 'redpanda' | 'redshift' | 'rest' | 'rockset' | 's3' | 's3-lambda' | 's3-v2' | 'singlestore-db' | 'snowflake' | 'startree' | 'streamnative' | 'timescale': The connector used by the connection.
    - `type` 'source' | 'sink': The connection type.
    - `stream_mappings` object[]: The connection stream mappings. If present, `schema` and `stream_id` must be `null`.
      - `stream_id` string: An opaque ID, created by Decodable, that uniquely identifies a resource.
      - `external_resource_specifier` unknown
    - `stream_id` string: An opaque ID, created by Decodable, that uniquely identifies a resource.
    - `schema` object[], required: Record schema.
      - `name` string: The field name.
      - `type` string: The field type.
    - `schema_v2` SchemaV2: Record schema, version 2.
      - `fields` union[]: The fields in this schema.
        - union
          - PhysicalField: A physical field.
            - `kind` 'physical', required
            - `name` string
            - `type` string
          - ComputedField: A computed field.
            - `kind` 'computed', required
            - `name` string
            - `expression` string
          - MetadataField: A metadata field.
            - `kind` 'metadata', required
            - `name` string
            - `type` string
            - `key` string
      - `watermarks` object[]: Watermark expressions for this stream. At this time only one expression is supported.
        - `name` string
        - `expression` string
      - `constraints` object
        - `primary_key` string[]: Column names to use for primary key.
    - `properties` object: The connection properties.
    - `autoscale_configuration` AutoscaleConfiguration, nullable: The configuration for autoscale conditions.
      - `pause_conditions` object, nullable: A map of pause conditions and their given setting values.
      - `resume_conditions` object, nullable: A map of resume conditions and their given setting values.
    - `last_runtime_error` RuntimeError: The pipeline last runtime error.
      - `message` string: last runtime error message
      - `raw_exception` string: raw exception from the underlying system
      - `timestamp` string, date-time: last runtime error timestamp
    - `last_activated_time` string, date-time: The date and time this object was last activated.
    - `target_state` 'RUNNING' | 'STOPPED'
    - `actual_state` 'UNKNOWN' | 'STARTING' | 'RUNNING' | 'FAILED' | 'FINISHED' | 'STOPPED' | 'PAUSING' | 'PAUSED'
    - `requested_tasks` integer: the number of tasks to be allocated to an object when it is activated
    - `actual_tasks` integer: the number of tasks actively in use by an object
    - `requested_task_size` string, nullable: the task size to be allocated to an object when it is activated
    - `actual_task_size` string, nullable: the task size actively in use by an object
    - `create_time` string, date-time: The date and time the resource was created.
    - `update_time` string, date-time: The date and time the resource was updated.
  - object, nullable: the number of tasks used when an object is activated
    - `id` string: An opaque ID, created by Decodable, that uniquely identifies a resource.
    - `name` string: The connection name.
    - `description` string: The connection description.
    - `connector` 'astra-streaming' | 'clickhouse' | 'confluent-cloud' | 'datadog' | 'datagen' | 'delta-lake' | 'druid' | 'dynamodb-cdc' | 'elasticsearch' | 'gcp-pubsub' | 'hudi' | 'influxdb' | 'kafka' | 'kinesis' | 'mongodb' | 'mongodb-cdc' | 'ms-sql' | 'mysql-cdc' | 'oracle' | 'oracle-cdc' | 'pinot' | 'polaris' | 'postgres' | 'postgres-cdc' | 'pulsar' | 'redis' | 'redpanda' | 'redshift' | 'rest' | 'rockset' | 's3' | 's3-lambda' | 's3-v2' | 'singlestore-db' | 'snowflake' | 'startree' | 'streamnative' | 'timescale': The connector used by the connection.
    - `type` 'source' | 'sink': The connection type.
    - `stream_mappings` object[]: The connection stream mappings. If present, `schema` and `stream_id` must be `null`.
      - `stream_id` string: An opaque ID, created by Decodable, that uniquely identifies a resource.
      - `external_resource_specifier` unknown
    - `stream_id` string: An opaque ID, created by Decodable, that uniquely identifies a resource.
    - `schema` object[]: Record schema.
      - `name` string: The field name.
      - `type` string: The field type.
    - `schema_v2` SchemaV2, required: Record schema, version 2.
      - `fields` union[]: The fields in this schema.
        - union
          - PhysicalField: A physical field.
            - `kind` 'physical', required
            - `name` string
            - `type` string
          - ComputedField: A computed field.
            - `kind` 'computed', required
            - `name` string
            - `expression` string
          - MetadataField: A metadata field.
            - `kind` 'metadata', required
            - `name` string
            - `type` string
            - `key` string
      - `watermarks` object[]: Watermark expressions for this stream. At this time only one expression is supported.
        - `name` string
        - `expression` string
      - `constraints` object
        - `primary_key` string[]: Column names to use for primary key.
    - `properties` object: The connection properties.
    - `autoscale_configuration` AutoscaleConfiguration, nullable: The configuration for autoscale conditions.
      - `pause_conditions` object, nullable: A map of pause conditions and their given setting values.
      - `resume_conditions` object, nullable: A map of resume conditions and their given setting values.
    - `last_runtime_error` RuntimeError: The pipeline last runtime error.
      - `message` string: last runtime error message
      - `raw_exception` string: raw exception from the underlying system
      - `timestamp` string, date-time: last runtime error timestamp
    - `last_activated_time` string, date-time: The date and time this object was last activated.
    - `target_state` 'RUNNING' | 'STOPPED'
    - `actual_state` 'UNKNOWN' | 'STARTING' | 'RUNNING' | 'FAILED' | 'FINISHED' | 'STOPPED' | 'PAUSING' | 'PAUSED'
    - `requested_tasks` integer: the number of tasks to be allocated to an object when it is activated
    - `actual_tasks` integer: the number of tasks actively in use by an object
    - `requested_task_size` string, nullable: the task size to be allocated to an object when it is activated
    - `actual_task_size` string, nullable: the task size actively in use by an object
    - `create_time` string, date-time: The date and time the resource was created.
    - `update_time` string, date-time: The date and time the resource was updated.

## Other responses

- `403`: Access denied: requesting user lacks a required permission.
- `404`: The requested resource does not exist.
- `409`: A resource conflict has been detected.
- `default`: An error has occurred.

---

[API](https://skmtc.dev/decodable/apis/decodable-control-plane.md) - [All operations](https://skmtc.dev/decodable/apis/decodable-control-plane/llms.txt) - [OpenAPI document](https://skmtc.dev/decodable/apis/decodable-control-plane/revisions/9718a3019da8?raw)
