-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
173 changed files
with
7,911 additions
and
834 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
## Airbyte API Server | ||
|
||
**Purpose:** | ||
|
||
- Enables users to control Airbyte programmatically and use with Orchestration tools (ex: Airflow, Dagster, Prefect) | ||
- Exists for Airbyte users to write applications against and enable [Powered by Airbyte](https://airbyte.com/embed-airbyte-connectors-with-api) ( | ||
Headless version and UI version) | ||
|
||
**Documentation** | ||
|
||
Documentation for the API can be found at https://reference.airbyte.com/ and is powered by readme.io. The documentation currently only fully supports | ||
Airbyte Cloud. We will have pages specific to OSS Airbtye Instances soon! | ||
|
||
The main differences will be configuration inputs for the source and destination create endpoints. | ||
OAuth endpoints and workspace updates are not supported in OSS currently. | ||
|
||
**Local Airbyte Instance Usage** | ||
|
||
*Docker Compose* | ||
|
||
If your instance of Airbyte is running locally using docker-compose, you can access the Airbyte API of the local instance by spinning up with the | ||
latest docker compose files. You can then make a call to `http://localhost:8006/v1/<endpoint>` or the health endpoint | ||
at `http://localhost:8006/health`. Calls to the Airbyte API through docker compose will go through the airbyte-proxy, which requires basic auth with a | ||
user and password supplied in the .env files. | ||
|
||
*Kubernetes* | ||
|
||
If you are running an instance of Airbyte locally using kubernetes, you can access the Airbyte API of the local instance by: | ||
|
||
1. Enabling the airbyte-api-server pod though helm with `helm install %release_name% charts/airbyte --set airbyte-api-server.enabled=true` | ||
or `helm upgrade %release_name% charts/airbyte --set airbyte-api-server.enabled=true` if you already have an instance running. | ||
2. Setting up a port forward to the airbyte-api-server kube svc by running `kubectl port-forward svc/airbyte-airbyte-api-server-svc 8006:80 &` | ||
3. Making a call to `http://localhost:8006/v1/<endpoint>` or the health endpoint at `http://localhost:8006/health`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
airbyte-api-server/src/main/kotlin/io/airbyte/api/server/Application.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
airbyte-api-server/src/main/kotlin/io/airbyte/api/server/constants/ClientConfigs.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
*/ | ||
|
||
package io.airbyte.api.server.constants | ||
|
||
const val INTERNAL_API_HOST = "http://\${airbyte.internal.api.host}" | ||
const val AUTH_HEADER = "Authorization" | ||
const val ENDPOINT_API_USER_INFO_HEADER = "X-Endpoint-API-UserInfo" | ||
const val ANALYTICS_HEADER = "X-Airbyte-Analytic-Source" | ||
const val ANALYTICS_HEADER_VALUE = "airbyte-api" | ||
|
||
const val AIRBYTE_API_AUTH_HEADER_VALUE = "AIRBYTE_API_AUTH_HEADER_VALUE" | ||
const val API_DOC_URL = "https://reference.airbyte.com" |
39 changes: 39 additions & 0 deletions
39
airbyte-api-server/src/main/kotlin/io/airbyte/api/server/constants/ServerConstants.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
*/ | ||
|
||
package io.airbyte.api.server.constants | ||
|
||
const val SOURCE_TYPE = "sourceType" | ||
const val DESTINATION_TYPE = "destinationType" | ||
|
||
const val CONNECTIONS_PATH = "/v1/connections" | ||
const val CONNECTIONS_WITH_ID_PATH = "$CONNECTIONS_PATH/{connectionId}" | ||
const val STREAMS_PATH = "/v1/streams" | ||
const val JOBS_PATH = "/v1/jobs" | ||
const val JOBS_WITH_ID_PATH = "$JOBS_PATH/{jobId}" | ||
const val SOURCES_PATH = "/v1/sources" | ||
const val INITIATE_OAUTH_PATH = "$SOURCES_PATH/initiateOAuth" | ||
const val SOURCES_WITH_ID_PATH = "$SOURCES_PATH/{sourceId}" | ||
const val DESTINATIONS_PATH = "/v1/destinations" | ||
const val DESTINATIONS_WITH_ID_PATH = "$DESTINATIONS_PATH/{destinationId}" | ||
const val WORKSPACES_PATH = "/v1/workspaces" | ||
const val WORKSPACES_WITH_ID_PATH = "$WORKSPACES_PATH/{workspaceId}" | ||
const val WORKSPACES_WITH_ID_AND_OAUTH_PATH = "$WORKSPACES_WITH_ID_PATH/oauth_credentials" | ||
|
||
val POST = io.micronaut.http.HttpMethod.POST.name | ||
val GET = io.micronaut.http.HttpMethod.GET.name | ||
val PATCH = io.micronaut.http.HttpMethod.PATCH.name | ||
val DELETE = io.micronaut.http.HttpMethod.DELETE.name | ||
val PUT = io.micronaut.http.HttpMethod.PUT.name | ||
|
||
const val WORKSPACE_IDS = "workspaceIds" | ||
const val INCLUDE_DELETED = "includeDeleted" | ||
|
||
const val OAUTH_CALLBACK_PATH = "/v1/oauth/callback" | ||
|
||
const val MESSAGE = "message" | ||
|
||
const val PARTIAL_UPDATE_OAUTH_KEY = "PARTIAL_UPDATE_OAUTH_KEY" | ||
|
||
const val HTTP_RESPONSE_BODY_DEBUG_MESSAGE = "HttpResponse body: " |
Oops, something went wrong.