Reference: WQL REST API
Use the WQL REST API to return:
- A list of data sources and data source filters.
- Details about a specific data source.
- Fields in a data source.
- Thequeryparameter of theGET /dataendpoint.
- The request body of thePOST /dataendpoint.
Base URL:
https://{hostname}/api/wql/{version}/{tenant}
Base URL for Workday Extend:
https://api.workday.com/wql/{version}
GET /data
Returns the data from a WQL query. Use this request for queries with less
than 2,048 characters. You can only view data you have security access to. You
execute WQL using the
query
parameter. Example:
{baseURL}/data?query={myquery}
Example JSON response:
{ "total": 152, "data": [ { "location": { "descriptor": "Academic Location WATS 1", "id": "5403216f5ef810381796f3bb216504f5" }, "max(yearsOfService)": "20" }, ... ] }
Workday clears cached WQL query results after 15 minutes. To clear the cache
manually, you can add
offset=0
to your query. Example:{baseURL}/data?offset=0&query=SELECT firstName, location FROM allWorkers
POST /data
Returns the data from a WQL query. Use this request for queries between 2,048 and
16,000 characters. You can only view data you have security access to. You execute
WQL using the
query
parameter. Place the query
parameter and query in the request body of the API call.Example:
{baseURL}/data/
Example request body:
{ "query" : "SELECT firstName, location FROM allWorkers" }
Example JSON
response:
{ "total": 152, "data": [ { "location": { "descriptor": "Academic Location WATS 1", "id": "5403216f5ef810381796f3bb216504f5" }, "max(yearsOfService)": "20" }, ... ] }
GET /dataSources
Returns a collection of data sources for use in a WQL query.
Example:
{baseURL}/dataSources
Example JSON response:
{ "total": 1722, "data": [ { "id": "6d34556ff015100012a60a4bb1ce0b92", "descriptor": "Student Applications", "alias": "studentApplications", "description": "Accesses the Student Application object and returns one row for each application. Includes data source filters with built-in prompts. You can use this data source to list student applications and related data." }, ... ] }
GET /dataSources/{ID}
Returns a data source for the specified ID for use in a WQL query.
Example:
{baseURL}/dataSources/1edd77f5e9754d71872102b5a5f2cd8
Example JSON response:
{ id*: string, // wid / id / reference id descriptor: string, // A description of the instance alias: string, // data source alias for WQL query description: string, filterIsRequired: boolean }
GET /dataSources/{ID}/fields
Returns the fields of a specific data source for use in a WQL query.
Example:
{baseURL}/datasources/1edd77f5e9754d71872102b5a5f2cd8e/fields
Example JSON response:
{ "total": 190, "data": [ { "id": "a2b4bca236de10001b3ee3180c190038", "descriptor": "Academic Period", "type": "Single instance", "alias": "academicPeriod" }, ... ] }
GET /dataSources/{ID}/dataSourceFilters
Returns the data source filters for a specific data source for use in a WQL
query.
Example:
{baseURL}/dataSources/6d34556ff015100012a60a4bb1ce0b92/dataSourceFilters
Example JSON response:
{ "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" }, ... ] }