import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
workday: {
type: "app",
app: "workday",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.workday.$auth.domain}/ccx/api/v1/${this.workday.$auth.tenant_id}/workers`,
headers: {
Authorization: `Bearer ${this.workday.$auth.oauth_access_token}`,
},
})
},
})
Emit new event for each new worker created in Workday. See the documentation
Change the business title of a worker. See the documentation
List supervisory organizations. See the documentation
Workday uses OAuth authentication. When you connect your Workday account, Pipedream will open a popup window where you can sign into Workday and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Workday API.
Pipedream requests the following authorization scopes when you connect your account:
GET
https://{{custom_fields.domain}}/{{custom_fields.tenant_id}}/authorize
?
client_id={{custom_fields.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
response_type=code
&
state={{oauth.state}}
&
scope={{oauth.space_separated_scopes}}
POST
https://{{custom_fields.domain}}/ccx/oauth2/{{custom_fields.tenant_id}}/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
POST
https://{{custom_fields.domain}}/ccx/oauth2/{{custom_fields.tenant_id}}/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}