0% found this document useful (0 votes)
23 views6 pages

Using Workday Strategic Sourcing API With Bruno For REST Data Calls

The document provides a comprehensive guide for developers on using the Workday Strategic Sourcing API with the Bruno API client, covering setup, authentication, and common REST data calls. It includes best practices, troubleshooting tips, and a cheat sheet for quick reference. The API allows automation of procurement tasks and requires API key-based authentication for access.

Uploaded by

jmorley00
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views6 pages

Using Workday Strategic Sourcing API With Bruno For REST Data Calls

The document provides a comprehensive guide for developers on using the Workday Strategic Sourcing API with the Bruno API client, covering setup, authentication, and common REST data calls. It includes best practices, troubleshooting tips, and a cheat sheet for quick reference. The API allows automation of procurement tasks and requires API key-based authentication for access.

Uploaded by

jmorley00
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

‭ sing Workday Strategic Sourcing API‬

U
‭with Bruno for REST Data Calls‬
‭ 5-Page Summary and Cheat Sheet for Developers and Integration Specialists‬
A
‭June 2025‬

‭Introduction‬
‭ he Workday Strategic Sourcing API enables developers to interact with Workday’s‬
T
‭procurement and sourcing platform, automating tasks like managing projects, contracts, and‬
‭suppliers. This RESTful API uses the JSON API specification and requires API key-based‬
‭authentication. Bruno, an open-source, offline API client, is ideal for testing these API calls due‬
‭to its simplicity and Git-friendly interface. This guide provides a beginner-friendly overview of‬
‭using the API with Bruno, covering setup, authentication, REST calls, and a cheat sheet for‬
‭quick reference.‬

‭Purpose and Scope‬

‭This document helps developers:‬

‭‬
● ‭ nderstand the API structure and authentication.‬
U
‭●‬ ‭Set up Bruno for API testing.‬
‭●‬ ‭Execute common REST calls (GET, POST, PATCH, DELETE).‬
‭●‬ ‭Troubleshoot issues and optimize interactions.‬

‭ o sensitive data (e.g., API keys, tokens) is included; placeholders are used. For official‬
N
‭documentation, visit Workday API Docs.‬

‭Prerequisites‬

‭‬
● ‭ orkday Strategic Sourcing account with API access.‬
W
‭●‬ ‭Bruno installed (Windows, macOS, or Linux).‬
‭●‬ ‭Basic REST API and JSON knowledge.‬
‭●‬ ‭Optional: Text editor for scripting.‬

‭Setting Up Bruno‬
‭ runo stores API requests as plain text in Bru markup, making it ideal for version-controlled‬
B
‭testing. Follow these steps to prepare Bruno for Workday Strategic Sourcing API calls.‬

‭Installing Bruno‬

‭ .‬ D
1 ‭ ownload Bruno from usebruno.com for your OS.‬
‭2.‬ ‭Install and create a workspace (e.g., "Workday API").‬
‭3.‬ ‭Create a collection named "Strategic Sourcing" for requests.‬

‭Configuring Authentication‬

‭ he API requires three HTTP headers, obtainable from the API Tokens section of your Workday‬
T
‭profile:‬

‭‬ X
● ‭ -Api-Key: Company API key.‬
‭●‬ ‭X-User-Token: User token.‬
‭●‬ ‭X-User-Email: User email.‬

‭In Bruno:‬

‭1.‬ O ‭ pen the "Strategic Sourcing" collection and select "Configure" from the environment‬
‭dropdown.‬
‭2.‬ ‭Create an environment (e.g., "Production") with variables:‬
‭○‬ ‭api_key: Company API key (e.g., <COMPANY_KEY>).‬
‭○‬ ‭user_token: User token (e.g., <USER_TOKEN>).‬
‭○‬ ‭user_email: User email (e.g., <USER_EMAIL>).‬
‭○‬ ‭base_url: API base URL (e.g., https://api.us.workdayspend.com).‬
‭○‬ ‭Mark sensitive variables as "Secret" to prevent exposure.‬

I‭n collection settings, add headers for all requests:‬


‭X-Api-Key: {{api_key}}‬
‭X-User-Token: {{user_token}}‬
‭X-User-Email: {{user_email}}‬

‭3.‬ ‭Content-Type: application/vnd.api+json‬

‭Verifying Setup‬

‭ est with a GET request to {{base_url}}/services/projects/v1/project_types. A 200 response‬


T
‭listing project types confirms authentication.‬

‭Making REST Data Calls‬


‭ he API supports standard HTTP methods for resources like projects and contracts. Below are‬
T
‭examples using Bruno, with JSON payloads per the JSON API specification.‬

‭GET: Retrieve a List of Projects‬

‭‬ R
● ‭ equest‬‭: Create "List Projects" in the collection.‬
‭●‬ ‭Method‬‭: GET‬
‭●‬ ‭URL‬‭: {{base_url}}/services/projects/v1/projects?page[size]=50‬‭(default 10, max 100).‬

‭ esponse‬‭: JSON array of projects.‬


R
‭{‬
‭"data": [‬
‭{‬
‭"id": "1",‬
‭"type": "projects",‬
‭"attributes": {‬
‭"name": "Sample Project"‬
‭}‬
‭}‬
‭]‬

‭●‬ ‭}‬

‭POST: Create a New Project‬

‭‬ R
● ‭ equest‬‭: Create "Create Project".‬
‭●‬ ‭Method‬‭: POST‬
‭●‬ ‭URL‬‭: {{base_url}}/services/projects/v1/projects‬

‭ ody‬‭:‬
B
‭{‬
‭"data": {‬
‭"type": "projects",‬
‭"attributes": {‬
‭"name": "New Project",‬
‭"external_id": "PROJ-001"‬
‭}‬
‭}‬

‭ ‬ }‭ ‬

‭●‬ ‭Response‬‭: Includes new project’s ID.‬

‭PATCH: Update a Project‬

‭●‬ ‭Request‬‭: Create "Update Project".‬


‭‬ M
● ‭ ethod‬‭: PATCH‬
‭●‬ ‭URL‬‭: {{base_url}}/services/projects/v1/projects/PROJ-001/external_id‬

‭ ody‬‭:‬
B
‭{‬
‭"data": {‬
‭"type": "projects",‬
‭"id": "PROJ-001",‬
‭"attributes": {‬
‭"name": "Updated Project"‬
‭}‬
‭}‬

‭ ‬ }‭ ‬

‭●‬ ‭Response‬‭: Updated project attributes.‬

‭DELETE: Remove a Project‬

‭‬
● ‭ equest‬‭: Create "Delete Project".‬
R
‭●‬ ‭Method‬‭: DELETE‬
‭●‬ ‭URL‬‭: {{base_url}}/services/projects/v1/projects/PROJ-001/external_id‬
‭●‬ ‭Response‬‭: HTTP 204 (No Content).‬

‭Best Practices and Troubleshooting‬


‭Optimize and secure API usage with these guidelines.‬

‭Best Practices‬

‭●‬ E ‭ nvironment Variables‬‭: Use Bruno variables for credentials‬‭and URLs to switch‬
‭environments.‬
‭●‬ ‭Pagination‬‭: Set page[size] (max 100) to manage response‬‭sizes.‬
‭●‬ ‭Rate Limits‬‭: Respect 5 requests/second limit for projects.‬
‭●‬ ‭Security‬‭: Avoid hardcoding keys; use Bruno’s secret‬‭variables.‬
‭●‬ ‭Version Control‬‭: Store collections in Git for collaboration.‬

‭Troubleshooting‬

‭‬
● ‭ 01 Unauthorized‬‭: Verify headers and user permissions.‬
4
‭●‬ ‭400 Bad Request‬‭: Check JSON syntax and required fields‬‭(e.g., type, id).‬
‭●‬ ‭429 Too Many Requests‬‭: Slow requests to meet 5 req/sec‬‭limit.‬
‭●‬ ‭Null Response‬‭: Confirm user access; add to Full Access‬‭team if needed.‬
‭●‬ ‭Connection Errors‬‭: Ensure correct base_url and region.‬

‭For support, submit a case via Workday’s Customer Center or check Workday API Docs.‬

‭Cheat Sheet: Workday Strategic Sourcing API with Bruno‬


‭ eaders (X-Api-Key, X-User-Token, X-User-Email, Content-Type: application/vnd.api+json) are‬
H
‭set in the collection.‬

‭Task‬ ‭Details‬

‭ etup‬
S ‭ reate "Production" environment with variables: api_key, user_token,‬
C
‭Environment‬ ‭user_email, base_url=https://api.us.workdayspend.com.‬

‭ ET Project‬
G ‭ ethod: GET‬
M
‭Types‬ ‭URL: {{base_url}}/services/projects/v1/project_types‬
‭Response: List of project types.‬

‭GET Projects‬ ‭ ethod: GET‬


M
‭URL: {{base_url}}/services/projects/v1/projects?page[size]=50‬
‭Response: Paginated project list.‬

‭POST Project‬ ‭ ethod: POST‬


M
‭URL: {{base_url}}/services/projects/v1/projects‬
‭Body: {"data": {"type": "projects", "attributes": {"name": "New Project",‬
‭"external_id": "PROJ-001"}}}‬

‭PATCH Project‬ ‭ ethod: PATCH‬


M
‭URL: {{base_url}}/services/projects/v1/projects/PROJ-001/external_id‬
‭Body: {"data": {"type": "projects", "id": "PROJ-001", "attributes": {"name":‬
‭"Updated Project"}}}‬
‭DELETE Project‬ ‭ ethod: DELETE‬
M
‭URL: {{base_url}}/services/projects/v1/projects/PROJ-001/external_id‬
‭Response: HTTP 204.‬

‭Troubleshooting‬ -‭ 401: Check headers/permissions.‬


‭- 429: Respect 5 req/sec limit.‬
‭- Null: Verify resource access.‬

‭For details, see Workday API Docs.‬

You might also like