with TestRail and Azure DevOps (Microsoft Entra ID OAuth)?
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
testrail: {
type: "app",
app: "testrail",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.testrail.$auth.api_url}/index.php?/api/v2/get_users`,
headers: {
"accept": `application/json`,
},
auth: {
username: `${this.testrail.$auth.username}`,
password: `${this.testrail.$auth.api_key}`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
azure_devops_microsoft_entra_id_oauth: {
type: "app",
app: "azure_devops_microsoft_entra_id_oauth",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://dev.azure.com/${this.azure_devops_microsoft_entra_id_oauth.$auth.organization}/_apis/projects`,
headers: {
Authorization: `Bearer ${this.azure_devops_microsoft_entra_id_oauth.$auth.oauth_access_token}`,
"content-type": `application/json`,
},
params: {
"api-version": `7.1`,
},
})
},
})