C1sluo
07/15/2024, 3:13 AMkapa.ai
07/15/2024, 3:14 AMgetConnection
endpoint. This endpoint requires the connectionId
as a parameter and returns details of a single connection.
Here is the endpoint:
GET /connections/{connectionId}
The response from this endpoint will include details such as the sourceId
, destinationId
, workspaceId
, status
, schedule
, dataResidency
, and configurations
which includes the configured stream options for a connection.
Here is a sample response schema:
json
{
"connectionId": {"format": "UUID", "type": "string"},
"name": {"type": "string"},
"sourceId": {"format": "UUID", "type": "string"},
"destinationId": {"format": "UUID", "type": "string"},
"workspaceId": {"format": "UUID", "type": "string"},
"status": {"type": "string", "enum": ["active", "inactive", "deprecated"]},
"schedule": {
"description": "schedule for when the the connection should run, per the schedule type",
"type": "object",
"required": ["scheduleType"],
"properties": {
"scheduleType": {"type": "string", "enum": ["manual", "cron", "basic"]},
"cronExpression": {"type": "string"},
"basicTiming": {"type": "string"}
}
},
"dataResidency": {"type": "string", "enum": ["auto", "us", "eu"], "default": "auto"},
"configurations": {
"description": "A list of configured stream options for a connection.",
"type": "object",
"properties": {
"streams": {
"type": "array",
"items": {
"description": "Configurations for a single stream.",
"type": "object",
"required": ["name"],
"properties": {
"name": {"type": "string"},
"syncMode": {"enum": ["full_refresh_overwrite", "full_refresh_append", "incremental_append", "incremental_deduped_history"]},
// more properties...
}
}
}
}
}
}
(Source: [Airbyte Public API - Connections > Methods > getConnection > Responses Part 2](https://reference.airbyte.com/reference/start))
To create a new connection with the same data fields but a different source name, you can use the createConnection
endpoint. You can use the response from the getConnection
endpoint as the request body for the createConnection
endpoint, but change the sourceId
and name
to your new source.
Here is the endpoint:
POST /connections
kapa.ai
07/15/2024, 3:14 AMgetConnection
endpoint. This endpoint requires the connectionId
as a parameter and returns details of a single connection. Here is the endpoint: GET /connections/{connectionId}
The response from this endpoint will include details such as the sourceId
, destinationId
, workspaceId
, status
, schedule
, dataResidency
, and configurations
which includes the configured stream options for a connection. Here is a sample response schema: json { "connectionId": {"format": "UUID", "type": "string"}, "name": {"type": "string"}, "sourceId": {"format": "UUID", "type": "string"}, "destinationId": {"format": "UUID", "type": "string"}, "workspaceId": {"format": "UUID", "type": "string"}, "status": {"type": "string", "enum": ["active", "inactive", "deprecated"]}, "schedule": { "description": "schedule for when the the connection should run, per the schedule type", "type": "object", "required": ["scheduleType"], "properties": { "scheduleType": {"type": "string", "enum": ["manual", "cron", "basic"]}, "cronExpression": {"type": "string"}, "basicTiming": {"type": "string"} } }, "dataResidency": {"type": "string", "enum": ["auto", "us", "eu"], "default": "auto"}, "configurations": { "description": "A list of configured stream options for a connection.", "type": "object", "properties": { "streams": { "type": "array", "items": { "description": "Configurations for a single stream.", "type": "object", "required": ["name"], "properties": { "name": {"type": "string"}, "syncMode": {"enum": ["full_refresh_overwrite", "full_refresh_append", "incremental_append", "incremental_deduped_history"]}, // more properties... } } } } } }
(Source: [Airbyte Public API - Connections > Methods > getConnection > Responses Part 2](https://reference.airbyte.com/reference/start)) To create a new connection with the same data fields but a different source name, you can use the createConnection
endpoint. You can use the response from the getConnection
endpoint as the request body for the createConnection
endpoint, but change the sourceId
and name
to your new source. Here is the endpoint: POST /connections
Here is a sample request body: json { "name": "new_source_name", "sourceId": "new_source_id", "destinationId": "existing_destination_id", "configurations": { "streams": [ { "name": "stream_name", "syncMode": "sync_mode", // more properties... } ] }, "schedule": { "scheduleType": "schedule_type", "cronExpression": "cron_expression" }, "dataResidency": "data_residency" }
(Source: [Airbyte Public API - Connections > Methods > createConnection > Request body Part 2](https://reference.airbyte.com/reference/start)) Please replace "new_source_name"
and "new_source_id"
with your new source name and ID, and replace the other fields with the corresponding values from