npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

wcp-node

v0.0.7

Published

Node client for Workday Cloud Platform

Downloads

12

Readme

wcp-node

Promise based Workday Cloud Platform helper library for Node.js

Features

  • Makes http requests to Workday Cloud Platform from Node.js
  • Supports the Promise API
  • Automatically retrieves the access token for the first request or if the bearer token is expired
  • Currently supports authentication using the client credentials grant type (integration system users)
  • Uses axios http client
  • Supports Implicit Grant Type (the caller is responsible for handling and refreshing the access token)

Supported versions

This library works with Node.js versions 8 and above or support with async/await

Installing

Using npm:

$ npm install wcp-node

End User Docs

For detailed information about Workday Cloud Platform, head out here:

https://cloud.workday.com/documentation/index.html

Prerequisite

  • Complete the Manage Workday Cloud Platform+TG task
  • Register a Developer Tenant
  • Create an API Client
  • Complete the Create Client Credentials Mapping+TG task

Please refer to the Workday Cloud Platform documentation for more details.

Methods

.get(url, axios_options)
.put(url, data, axios_options)
.post(url, data, axios_options)
.patch(url, data, axios_options)

You may modify how the http request is constructed by passing in additional settings in axios_options.

Example

Acquire and setup the wcp object

const Wcp = require('@workdaylabs/wcp-node');

const tenantAlias = '{tenantAlias}';
const clientId = '{clientId}';
const clientSecret = '{clientSecret}';
const wcp = new Wcp(tenantAlias, clientId, clientSecret);

(For Workday internal development only) If you are using a WCP server other than cloud.workday.com, use the following to create wcp instance instead

const wcpServer = 'workday';
const wcp = new Wcp(tenantAlias, clientId, clientSecret, wcpServer);

Performing a GET request

const getWorkers = async () => {
	const url = '/performanceManagement/v1/workers';
	const result = await wcp.get(url);
	console.log('result', result);
}

getWorkers();

Performing a POST request

const postFeedback = async () => {
  const data = {
    displayFeedbackGiverName: true,
    workerManagerAndMe: false,
    workerAndMe: false,
    comment: 'Great job!',
  };
  const workerId = '0e44c92412d34b01ace61e80a47aaf6d';
  const url = `/performanceManagement/v1/workers/${workerId}/anytimeFeedbackEntries?view=giveFeedbackDetail`;
  try {
    console.log('result', await wcp.post(url, data));
  } catch (e) {
    if (e.response && e.response.data && e.response.data.error) {
      console.log(e.response.data.error);
      console.log(e.response.data.errors);
    } else {
      console.log(e.toString());
    }
  }
}

postFeedback();

PUT and PATCH requests are similar to POST

Implicit Grant Type

You may use this library for implicit grant type as well. In this case, however, the library is not responsible to renew the access token. You may check against the access token timestamp for validity. The access token needs to be renewed and set again if expired (by setting wcp.token).

const Wcp = require('wcp-node');

const wcp = new Wcp();

const authCode = 'eyJraWQiOiIyMDE5LTA2LTI1IiwiYWxnIjoiUlM1MTIifQ.eyJpc3MiOiJDXHUwMDNkVVMsU1RcdTAwM2RDQSxMXHUwMDNkUGxlYXNhbnRvbixPVVx1MDAzZERldmVsb3BtZW50LE9cdTAwM2RXb3JrZGF5LENOXHUwMDNkT0NUT1BBQVMiLCJhdXRoX3RpbWUiOjE1NjE1MDM0OTYsImF1dGhfdHlwZSI6IlBhYVMiLCJzeXNfYWNjdF90eXAiOiJFUyIsInNjb3BlIjp7ImNsaWVudF9pZCI6Ik1ETm1OamhoTURjdFpUZ3lZaTAwWldRekxXSmlNVEl0TVRWaU5HVTBPVGt5TXpobCJ9LCJ0b2tlblR5cGUiOiJJZGVudGl0eSIsInN1YiI6InRvcmNpdW9saSIsImF1ZCI6IndkIiwiZXhwIjoxNTYxNTA3MDk2LCJpYXQiOjE1NjE1MDM0OTYsImp0aSI6IjZkaWsyOGRqMzU0eDFvZW9ocXhpc3Y0N29ldzFkaGp4YjNvZXFuZXU5enZ2d2dwMnhlIiwidGVuYW50IjoibGFiczlfaW50ZXJuYWwxIn0.LSN1C9bzUG9yzg7S8_wOOfYu2T8JdTQHBxkOpGGFTjNvmV7BuTNyCFnqYdKtyTi3sPzvsdvRPdg5axSwPyi81XTbFVCuI6hTmiXDVjTlhU6tEtuTdqmtUUq5OUc6_PYhIfAJuBpHQB-ubeJq8apV-Q16FwPeyX6xATEpJCKm8FeLITJk3mLfH7a7JWYbKRCzgs5-04yy6V0WWISOZDBs1seK70aCx2DQaGTnHPKr6Axa7pKAyZu3htuGbl4yhCK_ptMsCJYpfgNHuEq5JVX3ZzuwuD2SzxtfvSZ1T2-ZEEUXQ4e_oh3KCWN_BROWXk3HxC_9HpgbXMOK_Pd4GuZODQ';
wcp.token = { access_token: authCode };
const getWorkers = async () => {
  const url = '/performanceManagement/v1/workers';
  const result = await wcp.get(url);
  console.log('result', result);
};

getWorkers();

Problems?

Please log issues in the github repository