with ServiceTitan and SAP S/4HANA Cloud (Sandbox)?
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
servicetitan: {
type: "app",
app: "servicetitan",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api${this.servicetitan.$auth.environment}servicetitan.io/settings/v2/tenant/${this.servicetitan.$auth.tenant_id}/employees`,
headers: {
Authorization: `Bearer ${this.servicetitan.$auth.oauth_access_token}`,
"st-app-key": `${this.servicetitan.$auth.client_id}`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
sap_s_4hana_cloud_sandbox: {
type: "app",
app: "sap_s_4hana_cloud_sandbox",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.sap_s_4hana_cloud_sandbox.$auth.api_url}/sap/opu/odata/sap/API_PLANNED_ORDERS/A_PlannedOrder`,
headers: {
"accept": `application/json`,
"apikey": `${this.sap_s_4hana_cloud_sandbox.$auth.api_key}`,
},
params: {
"$top": `5`,
"$inlinecount": `allpages`,
"$orderby": `PlannedOrder`,
},
})
},
})