Passa al contenuto principale
Administrator Guide
Ultimo aggiornamento: 2026-03-13
Riferimenti: API REST WQL

Riferimenti: API REST WQL

Utilizzare l' API REST WQL per restituire:
  • Un elenco di origini dati e filtri origine dati .
  • Dettagli su origine dati specifica .
  • Gli oggetti business principali per origine dati specifica .
  • Campi in origine dati.
  • L' oggetto business correlato per un campo specifico.
È possibile utilizzare le informazioni della risposta per creare una richiesta WQL in:
  • Il
    query
    parametro di
    GET /data
    endpoint.
  • Il corpo della richiesta di
    POST /data
    endpoint.
Prima di creare la richiesta, è possibile effettuare chiamate con
GET /dataSources/
e
GET /dataSources/{ID}
endpoint per verificare i nomi alias corretti da utilizzare.
Sia gli host definito nel tenant sia il gateway API Workday Cloud Platform (WCP) supportano le richieste WQL. A seconda della provenienza delle richieste WQL, l'URL di base utilizzato varia.
Origine richiesta WQL
URL base da utilizzare
host definito nel tenant Workday
https://{hostname}/api/wql/{version}/{tenant}
Gateway API WCP
https://api.workday.com/wql/{version}

GET /data

Restituisce i dati da una query WQL. Utilizzare questa richiesta per query con meno di 2.048 caratteri. È possibile visualizzare solo i dati per i quali si dispone dell'accesso di sicurezza. Si esegue WQL utilizzando
query
parametro.
Sintassi:
{baseURL}/data?query={myquery}
Query di esempio:
{baseURL}/data?query=SELECT location, max(yearsOfService) FROM allWorkers GROUP BY location
Esempio risposta JSON :
{ "total": 152, "data": [ { "location": { "descriptor": "Academic Location WATS 1", "id": "5403216f5ef810381796f3bb216504f5" }, "max(yearsOfService)": "20" }, ... ] }
Il Workday cancella i risultati delle query WQL memorizzati nella cache dopo 30 minuti. Per cancellare manualmente la cache , è possibile aggiungere
offset=0
alla query. Esempio:
{baseURL}/data?offset=0&query=SELECT firstName, location FROM allWorkers

POST /data

Restituisce i dati da una query WQL. Utilizzare questa richiesta per query di lunghezza compresa tra 2.048 e 16.000 caratteri. È possibile visualizzare solo i dati per i quali si dispone dell'accesso di sicurezza. Si esegue WQL utilizzando
query
parametro. Posizionare il
query
parametro e query nel corpo della richiesta della chiamata API .
Sintassi:
{baseURL}/data/
Esempio di corpo della richiesta:
{ "query" : "
SELECT location, max(yearsOfService) FROM allWorkers GROUP BY location
" }
Esempio risposta JSON :
{ "total": 152, "data": [ { "location": { "descriptor": "Academic Location WATS 1", "id": "5403216f5ef810381796f3bb216504f5" }, "max(yearsOfService)": "20" }, ... ] }

GET /dataSources

Resi:
  • Raccolta di origini dati da utilizzare in una query WQL.
  • L' oggetto business principale per le origini dati.
  • Informazioni di indicizzazione delle origini dati.
Syntax:
{baseURL}/dataSources/
Query di esempio:
{baseURL}/dataSources
Esempio risposta JSON :
{ "total": 1722, "data": [ { "id": "aae24a47e36110000a37dcb7628d000d", "descriptor": "Indexed In Progress ~Worker~ Calibration Placements", "alias": "indexedInProgressWorkerCalibrationPlacements", "description": "Accesses a ~worker's~ in progress ~worker~ calibration event as the primary business object and the ~worker's~ attributes as the secondary business object. Returns the calibrated values specific to a ~worker~ for an in progress Calibration event.", "primaryBusinessObject": { "descriptor": "Indexed In Progress ~Worker~ Calibration Placements", "id": "aae24a47e36110000a37dd177601000e" }, "dataSourceIndexType": "Indexed" }, …… ] }
Query di esempio con filtro facoltativo . Restituisce le origini dati indicizzate quando si utilizza il filtro "SourceIndexType" = Indexed.:
{baseURL}/dataSources?SourceIndexType=Indexed
Esempio risposta JSON :
{ "total": 35, "data": [ { "id": "aae24a47e36110000a37dcb7628d000d", "descriptor": "Indexed In Progress ~Worker~ Calibration Placements", "alias": "indexedInProgressWorkerCalibrationPlacements", "description": "Accesses a ~worker's~ in progress ~worker~ calibration event as the primary business object and the ~worker's~ attributes as the secondary business object. Returns the calibrated values specific to a ~worker~ for an in progress Calibration event.", "primaryBusinessObject": { "descriptor": "Indexed In Progress ~Worker~ Calibration Placements", "id": "aae24a47e36110000a37dd177601000e" }, "dataSourceIndexType": "Indexed" }, …… ] }

GET /dataSources/{ID}

Restituisce origine dati per l'ID specificato da utilizzare in una query WQL. La richiesta restituisce anche l' oggetto business principale per l' origine dati.
Syntax:
{baseURL}/dataSources/‹datasource_wid›
Query di esempio:
{baseURL}/dataSources/aae24a47e36110000a37dcb7628d000d
Esempio risposta JSON :
{ "id": "aae24a47e36110000a37dcb7628d000d", "descriptor": "Indexed In Progress ~Worker~ Calibration Placements", "optionalParameters": [ { "label": "Include ~Terminated~ ~Workers~", "alias": "includeTerminatedWorkers", "type": "Boolean" }, ... ], "supportsEntryDate": false, "description": "Accesses a ~worker's~ in progress ~worker~ calibration event as the primary business object and the ~worker's~ attributes as the secondary business object. Returns the calibrated values specific to a ~worker~ for an in progress Calibration event.", "supportsEffectiveDate": false, "alias": "indexedInProgressWorkerCalibrationPlacements", "dataSourceIndexType": "Indexed", "requiredParameters": [ { "label": "Calibration Node for nBox", "type": "Multi-instance", "alias": "calibrationNodeForNBox" } ], "fullAlias": "my::indexedInProgressWorkerCalibrationPlacements", "filterIsRequired": false, "primaryBusinessObject": { "descriptor": "Indexed In Progress ~Worker~ Calibration Placements", "id": "aae24a47e36110000a37dd177601000e" } }

GET /dataSources/{ID}/fields

Restituisce i campi di origine dati specifica da utilizzare in una query WQL. La richiesta restituisce anche l' oggetto business correlato per ogni campo.
Sintassi:
{baseURL}/dataSources/‹datasource_wid›/fields
Query di esempio:
{baseURL}/datasources/aae24a47e36110000a37dcb7628d000d/fields
Esempio risposta JSON :
{ "total": 2967, "data": [ { "id": "09d50672a44001ea5d41efcfd6419a00", "descriptor": "Trended Worker Org for Cost Center_Current_QA (tenant setup)", "alias": "cf_TrendedWorkerOrgForCostCenter_Current_QATenantSetup", "type": "Single instance", "relatedBusinessObject": { "descriptor": "Position Set", "id": "373872302e7e4afe96aa37c0dd93e53e" } },... ] }

GET /dataSources/{ID}/fields/{subresourceID}

Restituisce i dettagli di un campo particolare quando l'ID del campo è specificato come
{subresourceID}
. La richiesta restituisce anche l' oggetto business correlato per ogni campo.
Sintassi:
{baseURL}/dataSources/‹datasource_wid›/fields/{subresourceID}
Query di esempio:
{baseURL}/dataSources/7884e9fbf68c10000b2b632e6e0100f1/fields/bb4ed38524451000419c823f09ba1587
Esempio risposta JSON :
{ "id": "bb4ed38524451000419c823f09ba1587", "descriptor": "ACA IRS 1094-C Reporting - ~Worker~ Included in Full Time Count for September", "type": "Boolean", "alias": "ACAIRS1094_CReporting_WorkerIncludedInFullTimeCountForSeptember", "requiredParameters": [ { "alias": "yearForIRSReporting", "label": "Year", "type": "Single Instance" }, { "type": "Single Instance", "alias": "companyWith1094_CCountDataAvailableForYearSelection", "label": "Company with 1094-c Count Data Available for Year Selection" } ], "optionalParameters": [ { "type": "Single Instance", "alias": "month", "label": "Month" } ] }

GET /dataSources/{ID}/dataSourceFilters

Restituisce i filtri origine dati per origine dati specifica da utilizzare in una query WQL.
Sintassi:
{baseURL}/dataSources/‹datasource_wid›/dataSourceFilters
Query di esempio:
{baseURL}/dataSources/6d34556ff015100012a60a4bb1ce0b92/dataSourceFilters
Esempio risposta JSON :
{ "total": 6, "data": [ { "id": "432abca0a751100008144ff171b8000a", "descriptor": "Student Applications for Admissions Cohort Finalize Decisions", "alias": "studentApplicationsForAdmissionsCohortFinalizeDecisions", "optionalParameters": [ { "type": "Single Instance", "description": "The Application Grouping for this Student Application.", "alias": "applicationGrouping" } ], "description": "Return Applications that are valid for Publication with this Cohort\n- has an Admissions Decision\n- Decisions Published Status is Confidential - For Internal Use Only\n- No Inactive Status" }, ... ] }