Skip to content

Commit

Permalink
Update index.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aballiet committed Nov 17, 2023
1 parent 8044e6f commit 8e926dc
Showing 1 changed file with 31 additions and 9 deletions.
40 changes: 31 additions & 9 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,8 @@ WARNING
* This API is utilized internally by the Airbyte Engineering team and may be modified in the future if the need arises.
* Modifications by the Airbyte Engineering team could create breaking changes and OSS users would need to update their code to catch up to any backwards incompatible changes in the API.

This API is a collection of HTTP RPC-style methods. While it is not a REST API, those familiar with REST should find the conventions of this API recognizable.

Here are some conventions that this API follows:
* All endpoints are http POST methods.
* All endpoints accept data via `application/json` request bodies. The API does not accept any data via query params.
* The naming convention for endpoints is: localhost:8000/{VERSION}/{METHOD_FAMILY}/{METHOD_NAME} e.g. `localhost:8000/v1/connections/create`.
* For all `update` methods, the whole object must be passed in, even the fields that did not change.

Authentication (OSS):
* When authenticating to the Configuration API, you must use Basic Authentication by setting the Authentication Header to Basic and base64 encoding the username and password (which are `airbyte` and `password` by default - so base64 encoding `airbyte:password` results in `YWlyYnl0ZTpwYXNzd29yZA==`). So the full header reads `'Authorization': "Basic YWlyYnl0ZTpwYXNzd29yZA=="`
* When authenticating to the Configuration API, you must use Basic Authentication by setting username and password (which are `airbyte` and `password` by default).

## Example Usage

Expand All @@ -70,6 +62,36 @@ provider "airbyte" {
}
```

Below a full example with a custom connector : defining a `SourceDefintion`, `Source` and a `Connection` :

```hcl
locals {
workspace_id = "<MY_AIRBYTE_WORKSPACE_ID>"
}
resource "airbyte_source_definition" "ashby" {
source_definition = {
docker_image_tag = "0.1.0"
docker_repository = "us-central1-docker.pkg.dev/<MY_GCP_PROJECT>/airbyte/source-ashby"
documentation_url = "https://developers.ashbyhq.com/reference/introduction"
name = "Ashby"
}
workspace_id = local.workspace_id
}
resource "airbyte_source" "ashby" {
connection_configuration = jsonencode({
api_key = "<MY_API_KEY>"
})
name = "Ashby"
source_definition_id = airbyte_source_definition.ashby.source_definition_id
workspace_id = local.workspace_id
}
# TODO for connection : I will publish a Terraform module to make it easier (need to discover Stream schema)
```

<!-- schema generated by tfplugindocs -->
## Schema

Expand Down

0 comments on commit 8e926dc

Please sign in to comment.