diff --git a/docs/index.md b/docs/index.md index ed42da4..a719898 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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 @@ -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 = "" +} + +resource "airbyte_source_definition" "ashby" { + source_definition = { + docker_image_tag = "0.1.0" + docker_repository = "us-central1-docker.pkg.dev//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 = "" + }) + 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