> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreflux.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Workday

> Client-mode REST API connector for a curated Workday staffing slice: list workers and get one worker

Technical Preview

# Workday

Client-mode REST API connector for a curated Workday staffing slice: list workers and get one worker.

* Hub category: **HR**.
* Base: `https://impl.workday.com`

## Template reference

Generated from the shipped broker template `workday` (`-routeCode WORKDAY`). It lists every event the template defines.

### Auth

Auth headers used by the template: `Authorization: Bearer {value.json.api_token}`.

### Template parameters

| Placeholder | Type | Description | Required |
| - | - | - | - |
| `RouteName` | string | Name of the Workday connector | no |
| `BaseUrl` | string | Workday base URL without trailing slash (e.g. [https://impl.workday.com](https://impl.workday.com)) | yes |

`BASE_ADDRESS` default: `https://impl.workday.com`.

### Events

| Event | Method | Endpoint | Request topic | Response topic | Payload fields |
| - | - | - | - | - | - |
| `Listworkers` | GET | `/ccx/api/staffing/v6/{value.json.tenant}/workers` | `hr/workday/workers/list` | `hr/workday/workers/list/response` | `api_token`, `tenant` |
| `Getworker` | GET | `/ccx/api/staffing/v6/{value.json.tenant}/workers/{value.json.worker_id}` | `hr/workday/workers/get` | `hr/workday/workers/get/response` | `api_token`, `tenant`, `worker_id` |

### Deploy

Get the template card (JSON with `template` and `metadata`) from the broker, then deploy the connector:

```bash theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
mosquitto_pub -t '$SYS/Coreflux/Command' -m "-routeCode WORKDAY"
```

The deployable connector from the REST API app, with `BASE_ADDRESS` already filled in:

```lot theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
DEFINE ROUTE WorkdayRestApi WITH TYPE REST_API
    ADD REST_API_CONFIG
        WITH BASE_ADDRESS "https://impl.workday.com"
        WITH ENABLE_CLIENT "true"
        WITH USE_SSL "true"
        WITH REQUEST_TIMEOUT '60'
        WITH DEFAULT_CONTENT_TYPE "application/json"
    ADD EVENT Listworkers
        WITH SOURCE_TOPIC "hr/workday/workers/list"
        WITH DESTINATION_TOPIC "hr/workday/workers/list/response"
        WITH METHOD "GET"
        WITH ENDPOINT "/ccx/api/staffing/v6/{value.json.tenant}/workers"
        WITH HEADERS
            ADD "Accept" "application/json"
            ADD "Authorization" "Bearer {value.json.api_token}"
    ADD EVENT Getworker
        WITH SOURCE_TOPIC "hr/workday/workers/get"
        WITH DESTINATION_TOPIC "hr/workday/workers/get/response"
        WITH METHOD "GET"
        WITH ENDPOINT "/ccx/api/staffing/v6/{value.json.tenant}/workers/{value.json.worker_id}"
        WITH HEADERS
            ADD "Accept" "application/json"
            ADD "Authorization" "Bearer {value.json.api_token}"
```

Deploy it with `-addRoute` (do not include `ADD METADATA`).

### Usage example

Call `Listworkers` by publishing a JSON payload to its request topic, and read the reply on the response topic:

```bash theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
mosquitto_sub -t 'hr/workday/workers/list/response' &
mosquitto_pub -t 'hr/workday/workers/list' -m '{"api_token": "<api_token>", "tenant": "<tenant>"}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.