Workday Graph API

Graph API for querying and traversing Workday data using a graph-based approach. Provides a flexible query interface for accessing interconnected Workday business objects and their relationships across the platform.

OpenAPI Specification

workday-extend-graph-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Workday Extend Workday Graph API
  description: >-
    Graph API for querying and traversing Workday data using a flexible,
    graph-based approach. Provides a unified query interface for accessing
    interconnected Workday business objects and their relationships. Supports
    Workday Query Language (WQL) for complex data retrieval and GraphQL-style
    queries across the Workday platform, enabling developers to efficiently
    access workers, organizations, positions, and other business objects.
  version: v1
  contact:
    name: Workday Developer Support
    url: https://support.developer.workday.com/s/
  termsOfService: https://www.workday.com/en-us/legal.html
externalDocs:
  description: Workday Graph API Explorer
  url: https://developer.workday.com/graph-api-explorer
servers:
  - url: https://{baseUrl}/api/graphql/v1/{tenant}
    description: Workday Graph API Server
    variables:
      baseUrl:
        default: api.workday.com
      tenant:
        default: tenant
security:
  - OAuth2:
      - graph:read
tags:
  - name: Graph Query
    description: >-
      Operations for querying Workday business objects using the Graph API.
      Supports flexible field selection and relationship traversal.
  - name: Schema Introspection
    description: >-
      Operations for discovering available business objects, their fields,
      relationships, and query capabilities through the Graph API.
  - name: WQL Query
    description: >-
      Operations for executing Workday Query Language (WQL) queries against
      the Workday data model. WQL provides SQL-like syntax for complex data
      retrieval across business objects.
paths:
  /query:
    post:
      operationId: executeGraphQuery
      summary: Workday Extend Execute a graph query
      description: >-
        Executes a graph query against the Workday data model. Supports field
        selection, filtering, relationship traversal, and pagination. Returns
        the requested business objects with only the selected fields.
      tags:
        - Graph Query
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GraphQueryRequest'
      responses:
        '200':
          description: Successful query response with matching data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphQueryResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /wql:
    post:
      operationId: executeWqlQuery
      summary: Workday Extend Execute a WQL query
      description: >-
        Executes a Workday Query Language (WQL) query for complex data retrieval.
        WQL uses SQL-like syntax to query business objects and supports filtering,
        sorting, aggregation, and relationship traversal. Results can be paginated
        using limit and offset parameters within the query.
      tags:
        - WQL Query
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WqlQueryRequest'
      responses:
        '200':
          description: Successful WQL query response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WqlQueryResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /schema:
    get:
      operationId: getSchema
      summary: Workday Extend Retrieve the graph schema
      description: >-
        Returns the full graph schema including all available business object
        types, their fields, relationships, and query capabilities. Used for
        introspection and discovery of the data model.
      tags:
        - Schema Introspection
      responses:
        '200':
          description: Successful response with schema information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphSchema'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /schema/types:
    get:
      operationId: listSchemaTypes
      summary: Workday Extend List available business object types
      description: >-
        Returns a collection of available business object types that can be
        queried through the Graph API, including their descriptions and
        available fields.
      tags:
        - Schema Introspection
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/search'
      responses:
        '200':
          description: Successful response with business object types
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SchemaType'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /schema/types/{typeName}:
    get:
      operationId: getSchemaType
      summary: Workday Extend Retrieve a specific business object type schema
      description: >-
        Returns the full schema definition for a specific business object type,
        including all fields, their types, relationships to other objects, and
        available query operations.
      tags:
        - Schema Introspection
      parameters:
        - name: typeName
          in: path
          required: true
          description: The name of the business object type
          schema:
            type: string
      responses:
        '200':
          description: Successful response with type schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaType'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://{baseUrl}/authorize
          tokenUrl: https://{baseUrl}/oauth2/{tenant}/token
          scopes:
            graph:read: Query Workday data through the Graph API
            graph:schema: Access schema introspection
  parameters:
    limit:
      name: limit
      in: query
      description: Maximum number of results to return
      schema:
        type: integer
        default: 20
        maximum: 100
    offset:
      name: offset
      in: query
      description: Number of results to skip for pagination
      schema:
        type: integer
        default: 0
    search:
      name: search
      in: query
      description: Search term to filter results
      schema:
        type: string
  responses:
    BadRequest:
      description: Invalid request or query syntax error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error code identifying the type of error
        message:
          type: string
          description: Human-readable error message
        location:
          type: object
          properties:
            line:
              type: integer
              description: Line number in the query where the error occurred
            column:
              type: integer
              description: Column number in the query where the error occurred
    GraphQueryRequest:
      type: object
      required:
        - query
      properties:
        query:
          type: string
          description: >-
            The graph query string specifying the business objects, fields,
            filters, and relationships to retrieve
        variables:
          type: object
          additionalProperties: true
          description: >-
            Variables to substitute into the query. Referenced in the query
            using the $variableName syntax.
        limit:
          type: integer
          default: 20
          maximum: 100
          description: Maximum number of results to return
        offset:
          type: integer
          default: 0
          description: Number of results to skip for pagination
    GraphQueryResponse:
      type: object
      properties:
        data:
          type: object
          additionalProperties: true
          description: >-
            The query result data organized by the queried business object types
        total:
          type: integer
          description: Total number of matching records
        hasMore:
          type: boolean
          description: Whether additional results are available beyond the current page
    WqlQueryRequest:
      type: object
      required:
        - query
      properties:
        query:
          type: string
          description: >-
            The WQL query string using SQL-like syntax. Example:
            SELECT worker, fullName, businessTitle FROM workers
            WHERE isActive = true LIMIT 50 OFFSET 0
    WqlQueryResponse:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            additionalProperties: true
          description: Array of result rows matching the WQL query
        total:
          type: integer
          description: Total number of matching records
        columns:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                description: Column name from the query
              dataType:
                type: string
                description: Data type of the column values
          description: Metadata about the result columns
    GraphSchema:
      type: object
      properties:
        types:
          type: array
          items:
            $ref: '#/components/schemas/SchemaType'
          description: All available business object types
        version:
          type: string
          description: Schema version identifier
    SchemaType:
      type: object
      properties:
        name:
          type: string
          description: The name of the business object type
        description:
          type: string
          description: Description of the business object type
        fields:
          type: array
          items:
            $ref: '#/components/schemas/SchemaField'
          description: Fields available on this type
        relationships:
          type: array
          items:
            $ref: '#/components/schemas/SchemaRelationship'
          description: Relationships to other business object types
        isQueryable:
          type: boolean
          description: Whether this type can be directly queried
    SchemaField:
      type: object
      properties:
        name:
          type: string
          description: Field name
        dataType:
          type: string
          description: Data type of the field
        description:
          type: string
          description: Description of the field
        isFilterable:
          type: boolean
          description: Whether this field can be used in filters
        isSortable:
          type: boolean
          description: Whether results can be sorted by this field
    SchemaRelationship:
      type: object
      properties:
        name:
          type: string
          description: Relationship name
        targetType:
          type: string
          description: The related business object type
        cardinality:
          type: string
          enum:
            - one-to-one
            - one-to-many
            - many-to-many
          description: Relationship cardinality
        description:
          type: string
          description: Description of the relationship