Navigating Workday's API: A Developer's Guide to Fetching Employee Data
Published on:
September 6, 2024

In the world of HR software, Workday stands as a titan. But for developers and product managers tasked with integrating Workday into their systems, the journey can be a bit challenging. 

This guide will walk you through the process of pulling employee data from Workday's API, offering insights and practical steps to streamline your integration efforts.

Workday's SOAP API: A Blast from the Past

While most modern applications have embraced REST architecture, Workday maintains its commitment to SOAP (Simple Object Access Protocol). This architectural choice presents a unique set of challenges and opportunities for developers.

Here's a glimpse of what you're dealing with in SOAP:

<xsd:simpleType name="Assignable_RoleReferenceEnumeration">
  <xsd:restriction base="xsd:string">
    <xsd:annotation>
      <xsd:appinfo>
        <wd:enumeration value="WID"/>
        <wd:enumeration value="Organization_Role_ID"/>
      </xsd:appinfo>
    </xsd:annotation>
  </xsd:restriction>
</xsd:simpleType>

 

While it may seem daunting at first, understanding this structure is crucial for successful integration.

Authentication and Permissions: Your First Hurdle

Before diving into data retrieval, you'll need to set up proper authentication and permissions. This process involves creating an Integrated System User (ISU) with the appropriate access rights.

Here's a step-by-step breakdown:

  1. Create an Integration System User
  2. Add the new user to the System Users list
  3. Create a User-Based Security Group
  4. Add your Integration System User to this group

The process diverges slightly depending on whether you're accessing HRIS or ATS data:

For HRIS access:

  1. Search for Public Web Services
  2. Navigate to Human Resources
  3. View the WSDL (Web Services Description Language)
  4. Locate your hostname, username, password, and endpoint URL

For ATS access:

  1. Go to the Domain Security Policy tab
  2. Find Recruiting Web Services
  3. Grant necessary permissions to your Security Group
  4. Secure your access credentials

Fetching Employee Data: A Python Approach

Now that we've laid the groundwork, let's dive into the code. We'll use Python to interact with Workday's API and retrieve employee data.

First, import the necessary libraries:

import requests
from xmltodict import parse
import json

Set up your credentials:

tenant_name = "your_tenant"
username = f"your_username@{tenant_name}"
password = "your_password"
url = f"https://services1.myworkday.com/ccx/service/{tenant_name}/Human_Resources/v42.0"

Craft your SOAP request:

page_number = 1

soap_request = f"""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bsvc="urn:com.workday/bsvc">
   <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken>
            <wsse:Username>{username}</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">{password}</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <bsvc:Get_Workers_Request>
         <bsvc:Response_Filter>
            <bsvc:Page>{page_number}</bsvc:Page>
            <bsvc:Count>100</bsvc:Count>
         </bsvc:Response_Filter>
      </bsvc:Get_Workers_Request>
   </soapenv:Body>
</soapenv:Envelope>

Make the API call and parse the response:

response = requests.post(url, data=soap_request, headers={"Content-Type": "text/xml"})
parsed_response = json.loads(parse(response.content))

The parsed response will contain the employee data you've requested, structured in a nested dictionary format.

Simplifying Integration with Unified APIs

While direct integration with Workday's SOAP API is possible, it can be time-consuming and complex. This is where unified API providers like Bindbee come into play. Bindbee offers a REST API that simplifies the integration process, handling the intricacies of Workday's SOAP API, pagination, and authentication.

By leveraging a unified API, you can:

  • Reduce development time
  • Simplify your codebase
  • Easily integrate with multiple HR systems beyond Workday

Conclusion

Integrating with Workday's API presents unique challenges, but with the right approach and tools, it's entirely manageable. Whether you choose to work directly with Workday's SOAP API or opt for a unified API solution, this guide provides you with the foundational knowledge to get started.

Remember, the world of API integrations is constantly evolving. Stay curious, keep learning, and don't hesitate to explore innovative solutions that can streamline your development process.

At Bindbee, we've developed a Unified API that allows you to easily retrieve data from Workday using REST (no SOAP needed). Our HRIS Unified API has also streamlined pagination and authentication processes. 

You can get in touch with Integration Experts at Bindbee for your integrations. Whether you're dealing with Workday, BambooHR, UKG, or any other HRIS system, Bindbee's unified API can streamline your integration process, saving you time and resources in your HR tech stack development.

Navigating Workday's API: A Developer's Guide to Fetching Employee Data
Kunal Tyagi
CTO -
Bindbee
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.