import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
snipe_it: {
type: "app",
app: "snipe_it",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.snipe_it.$auth.api_url}/api/v1/users`,
headers: {
Authorization: `Bearer ${this.snipe_it.$auth.api_key}`,
"accept": `application/json`,
"content-type": `application/json`,
},
})
},
})
Snipe-IT uses API keys for authentication. When you connect your Snipe-IT account, Pipedream securely stores the keys so you can easily authenticate to Snipe-IT APIs in both code and no-code steps.