참조: WQL REST API
WQL REST API 사용하여 다음을 반환합니다.
- 데이터 소스 및 데이터 소스 필터의 목록입니다.
- 특정 데이터 소스 에 대한 세부내용입니다.
- 특정 데이터 소스 의 기본 비즈니스 오브젝트
- 데이터 소스 의 필드:
- 특정 필드의 관련 비즈니스 오브젝트 .
- -query매개변수의GET /data엔드포인트가 표시됩니다.
- 요청 / 신청 본문의POST /data엔드포인트가 표시됩니다.
GET /dataSources/
및GET /dataSources/{ID}
사용할 올바른 별칭 을 확인하십시오.
참조참조: WQL 별칭 .
테넌트 호스트와 Workday 클라우드 플랫폼(WCP) 어플리케이션 프로그래밍 인터페이스; API 게이트웨이는 모두 WQL 요청을 지원합니다. WQL 요청을 수행하는 소스에 따라 사용하는 기본 URL이 다릅니다.
WQL 요청 소스
| 사용할 기본 URL
|
|---|---|
Workday 테넌트 호스트 | https://{hostname}/api/wql/{version}/{tenant}
|
WCP 어플리케이션 프로그래밍 인터페이스; API 게이트웨이 | https://api.workday.com/wql/{version}
|
GET /data
WQL 쿼리에서 데이터를 반환합니다. 이 요청 / 신청 2,048자 미만의 쿼리에 사용합니다. 시큐리티 권한이 있는 데이터만 조회할 수 있습니다. WQL은 다음을 사용하여 실행합니다.
query
매개변수입니다.구문:
{baseURL}/data?query={myquery}
쿼리 예:
{baseURL}/data?query=SELECT location, max(yearsOfService) FROM allWorkers GROUP BY location
JSON 응답 예:
{ "total": 152, "data": [ { "location": { "descriptor": "Academic Location WATS 1", "id": "5403216f5ef810381796f3bb216504f5" }, "max(yearsOfService)": "20" }, ... ] }
Workday 30분 후에 캐시된 WQL 쿼리 결과를 지웁니다. 캐시 수동으로 지우려면 을(를) 추가하십시오.
offset=0
을(를) 쿼리에 추가하십시오. 예를 들어 다음과 같습니다.{baseURL}/data?offset=0&query=SELECT firstName, location FROM allWorkers
POST /data
WQL 쿼리에서 데이터를 반환합니다. 이 요청 / 신청 2,048~16,000자 쿼리에 사용합니다. 시큐리티 권한이 있는 데이터만 조회할 수 있습니다. WQL은 다음을 사용하여 실행합니다.
query
매개변수입니다. 배치query
어플리케이션 프로그래밍 인터페이스; API 호출의 요청 / 신청 본문에 매개변수 및 쿼리를 포함하십시오.구문:
{baseURL}/data/
요청 / 신청 본문 예:
{ "query" : "SELECT location, max(yearsOfService) FROM allWorkers GROUP BY location" }
JSON 응답 예:
{ "total": 152, "data": [ { "location": { "descriptor": "Academic Location WATS 1", "id": "5403216f5ef810381796f3bb216504f5" }, "max(yearsOfService)": "20" }, ... ] }
GET /dataSources
다음을 반환합니다.
- WQL 쿼리에 사용할 데이터 소스의 모음입니다.
- 데이터 소스의 기본 비즈니스 오브젝트 입니다.
- 데이터 소스의 인덱싱 정보
구문:
{baseURL}/dataSources/
쿼리 예:
{baseURL}/dataSources
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" }, …… ] }
옵션 필터 있는 쿼리 예입니다. 'SourceIndexType' = Indexed 필터 사용하는 경우 인덱스 지정된 데이터 소스를 반환합니다.
{baseURL}/dataSources?SourceIndexType=Indexed
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}
WQL 쿼리에 사용할 지정된 ID의 데이터 소스 반환합니다. 이 요청 / 신청 데이터 소스 에 대한 기본 비즈니스 오브젝트 도 반환합니다.
구문:
{baseURL}/dataSources/‹datasource_wid›
쿼리 예:
{baseURL}/dataSources/aae24a47e36110000a37dcb7628d000d
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
WQL 쿼리에 사용할 특정 데이터 소스 의 필드를 반환합니다. 이 요청 / 신청 각 필드의 관련 비즈니스 오브젝트 도 반환합니다.
구문:
{baseURL}/dataSources/‹datasource_wid›/fields
쿼리 예:
{baseURL}/datasources/aae24a47e36110000a37dcb7628d000d/fields
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}
필드의 ID가 다음으로 지정된 경우 특정 필드에 대한 세부내용을 반환합니다.
{subresourceID}
. 이 요청 / 신청 각 필드의 관련 비즈니스 오브젝트 도 반환합니다. 구문:
{baseURL}/dataSources/‹datasource_wid›/fields/{subresourceID}
쿼리 예:
{baseURL}/dataSources/7884e9fbf68c10000b2b632e6e0100f1/fields/bb4ed38524451000419c823f09ba1587
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
WQL 쿼리에 사용할 특정 데이터 소스 에 대한 데이터 소스 필터를 반환합니다.
구문:
{baseURL}/dataSources/‹datasource_wid›/dataSourceFilters
쿼리 예:
{baseURL}/dataSources/6d34556ff015100012a60a4bb1ce0b92/dataSourceFilters
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" }, ... ] }