The project is in alpha version. Readers can refer to our opened GitHub issues to check the ongoing work on this project.
airbyte-sdk is a package to manage Airbyte configurations through your code. It can handle CRUD for sources, destinations, definitions and connections. It also has some commonly used functions to make the usage simpler.
When you want to handle Airbyte configurations through some automation or through API. You can also make use of this while creating some scripts.
Your project need to support node version 16 or above
Using npm:
$ npm install airbyte-sdk
Using yarn:
$ yarn add airbyte-sdk
You will have to provide the base url for the Airbyte instance.
setAirbyteHost('http://localhost:8001/');
You can also set default headers as described below
setAuthenticationHeaders(headers);
You can go through the following URL
- Go to https://github.com/harshithmullapudi/airbyte-sdk
- Create an issue if the issue is not already created, attach a tag [Bug, Improvement]
- Fork the repo, code and test thoroughly.
- Open a PR on the repo from your fork.
var { setAirbyteHost, Source, WorkspaceModel } = require('airbyte-sdk');
async function main() {
setAirbyteHost('http://localhost:8000');
const workspaceModel = await WorkspaceModel.createWorkspaceInstanceFromId(
'29cfb153-40a9-478a-a37c-f519560459b2',
);
const source = new Source(workspaceModel);
const allSources = await source.getAllSources();
console.log(allSources);
}
main();