with Grafana and MinIO?
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
grafana: {
type: "app",
app: "grafana",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.grafana.$auth.domain}/api/org/`,
headers: {
Authorization: `Bearer ${this.grafana.$auth.service_account_token}`,
"accept": `application/json`,
},
})
},
})
import * as Minio from 'minio'
export default defineComponent({
props: {
minio: {
type: "app",
app: "minio",
}
},
async run({steps, $}) {
const minioClient = new Minio.Client({
endPoint: this.minio.$auth.endpoint,
port: this.minio.$auth.port,
useSSL: this.minio.$auth.use_ssl,
accessKey: this.minio.$auth.access_key,
secretKey: this.minio.$auth.access_secret,
})
const buckets = await minioClient.listBuckets()
return buckets;
},
})