import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
turso: {
type: "app",
app: "turso",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.turso.tech/v1/organizations`,
headers: {
Authorization: `Bearer ${this.turso.$auth.api_token}`,
},
})
},
})
Creates a new database in a group for the organization or user. See the documentation
Returns a list of databases belonging to the organization or user. See the documentation
Returns a list of groups belonging to the organization or user. See the documentation
Returns a list of organizations the authenticated user owns or is a member of. See the documentation
Turso uses OAuth authentication. When you connect your Turso account, Pipedream will open a popup window where you can sign into Turso and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Turso API.
Pipedream requests the following authorization scopes when you connect your account:
POST
https://api.turso.tech/v1/organizations/{{custom_fields.organization_slug}}/databases/{{custom_fields.database_name}}/auth/tokens
content-type: application/x-www-form-urlencoded
accept: application/json
authorization: {{custom_fields.database_token_access_type}}