import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
air: {
type: "app",
app: "air",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.air.inc/v1/assets`,
headers: {
"accept": `application/json`,
"x-api-key": `${this.air.$auth.api_key}`,
"x-air-workspace-id": `${this.air.$auth.workspace_id}`,
},
})
},
})
Air uses API keys for authentication. When you connect your Air account, Pipedream securely stores the keys so you can easily authenticate to Air APIs in both code and no-code steps.
To retrieve your API Key and Workspace ID,