import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
cockpit: {
type: "app",
app: "cockpit",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.cockpit.$auth.server_url}/cockpit/api/content/items`,
headers: {
"api-key": `${this.cockpit.$auth.api_key}`,
"accept": `application/json`,
},
params: {
models: `{ "name":"x"}`,
},
})
},
})
Cockpit uses API keys for authentication. When you connect your Cockpit account, Pipedream securely stores the keys so you can easily authenticate to Cockpit APIs in both code and no-code steps.