with bit.io and Azure Cosmos DB?
bit.io is a modern database as a service platform that provides a straightforward way to share, manage, and collaborate on data sets. By leveraging the bit.io API on Pipedream, you can automate interactions with your databases, such as triggering queries in response to external events, syncing data between various applications, or maintaining your datasets with scheduled tasks.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
bit_io: {
type: "app",
app: "bit_io",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.bit.io/api/v1beta/repos`,
headers: {
Authorization: `Bearer ${this.bit_io.$auth.api_key}`,
},
})
},
})
import { CosmosClient } from "@azure/cosmos";
export default defineComponent({
props: {
azure_cosmos_db: {
type: "app",
app: "azure_cosmos_db",
}
},
async run({ steps, $ }) {
const endpoint = this.azure_cosmos_db.$auth.uri;
const key = this.azure_cosmos_db.$auth.key;
const databaseId = this.azure_cosmos_db.$auth.database_name;
const client = new CosmosClient({ endpoint, key });
return await client.database(databaseId).read();
},
})