Introducing Workday® Graph API: An Overview

 
 

Workday’s latest release, 2023R1, introduces the new Graph API. This API provides users with a more comprehensive way to access data and perform actions within the Workday application. Graph API is a major improvement over the previous REST API, and it is sure to change the way that developers interact with Workday data. 

In this article, we will provide an overview of the new Workday Graph API with a goal of providing you with a good understanding of Graph API functionality and how you can use it to streamline your Workday development.

What is Graph API?

Workday Graph API is a set of web services that enables you to access data in the Workday system. The API uses standard HTTP methods and headers to communicate with the Workday servers, with all requests and responses formatted in JSON.

Workday Graph API is implemented using OAuth 2.0., which means that you must first register your application with Workday in order to use the API. Once registered, you will be given a Client ID and Client Secret that you will need to include in all of your API requests.

Workday Graph API Authentication

To authenticate with the API, you will need to create a new OAuth 2.0 client and configure it with your Workday account. 

To create a new OAuth 2.0 client, log into the Workday Developer Portal and navigate to the "My Apps" section. Then, click on the "Add New App" button.

After you have created your OAuth 2.0 client, you will need to configure it with your Workday account by logging into the Workday Developer Portal and navigating to the "My Apps" section. From there, click on the name of your app.

On the "Edit App" page, you will see a section called "Credentials" where you will need to enter your Workday username and password to allow the app to access your Workday account.

Once your app is configured with your Workday account, you will need to obtain an access token to make calls to the Workday Graph API. This can be done by making a request to the Workday authorization server with your OAuth 2.0 client ID and client secret.

The Workday authorization server will then provide you with an access token that you can use to authenticate your API requests. This access token will have a limited lifespan and will need to be refreshed periodically.

Making API Calls With Workday Graph API

To make basic API calls with the Workday Graph API, you'll need to first create a file called `config.js` in your project's root directory. The contents of this file will be used to configure the Workday Graph API. You'll need to provide your Workday tenant name, your Workday tenant URL, and your Workday API key. All of this information can be found in the Workday developer portal. Once you have your `config.js` file set up, you can start making API calls.

Workday Graph API Rate Limiting

When you make requests to the Workday Graph API, each request counts towards your rate limit. The Workday Graph API limits the number of requests that can be made within a given time period. This ensures that the API is available for all developers and that no one developer can monopolize the API.

If you exceed the rate limit, you will receive a 429 error code. To avoid this error, we recommend that you plan your requests so that you stay within the rate limit. You can also check the headers of each response to see your current rate limit status.

Workday Graph API Error Handling

Whenever you make a call to the Workday Graph API, there is the potential for an error to occur. While most errors are minor and can be safely ignored, some errors can cause problems with your application. For example, if you try to read data that doesn't exist, you will receive an error message.

To handle errors gracefully, you need to have a mechanism in place to catch them when they occur. The best way to do this is to use a try/catch block. Try/catch blocks are a standard way of handling errors in most programming languages.

When an error occurs in the try block, the code in the catch block will execute. This will allow you to easily handle the error and prevent it from crashing your application.

How Can Makse Group Help?

While Graph API is a powerful and versatile new feature for using Workday web services, it can be a bit overwhelming to get started with if you are not already familiar with programming. To see how you can take advantage of Workday’s full functionality by building custom Workday integrations with third-party applications, contact Makse Group today to speak to a Workday integration expert. 

Previous
Previous

Streamline Workday® Accounts Payable with Corpay Integration 

Next
Next

What Are Workday® Web Services?