with Databox and Leonardo AI?
The Databox API enables you to create custom dashboards, integrating various data sources to track performance metrics in real-time. With Pipedream, you can leverage this API to automate the flow of data between Databox and other applications, creating bespoke monitoring solutions and data-driven workflows that save time and enhance insights.
import Databox from 'databox'
export default defineComponent({
props: {
databox: {
type: "app",
app: "databox",
},
},
async run({steps, $}) {
const client = new Databox({
push_token: `${this.databox.$auth.token}`
})
return await new Promise((resolve) => client.metrics((metrics) => resolve(metrics)))
}
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
leonardo_ai: {
type: "app",
app: "leonardo_ai",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://cloud.leonardo.ai/api/rest/v1/me`,
headers: {
Authorization: `Bearer ${this.leonardo_ai.$auth.api_key}`,
"accept": `application/json`,
},
})
},
})