API SDK v0.3.0 released with Freshservice Tickets API support

Early this year, we launched the Node.js API SDK (beta) for Freshworks REST APIs with support for Freshteam endpoints. Yesterday, we released v0.3.0 of the API SDK with support for Freshservice v2 Tickets API. It took a long time, but here it is, finally.

Huge shoutout to @Thakur_Ganeshsingh and @Raviraj for their contribution to this release!

Where to find it

The API SDK is available on NPM as @freshworks/api-sdk . For further details, see:

Example usage

Instantiate:

const { Freshteam } = require("@freshworks/api-sdk");

const ft = new Freshteam(domain, apiKey);

Retrieve list of employees:

// Fetch employees filtered by active employes
const res = ft.employees.list({ status: "active" });
// Access the data as an Array of Employee objects
const employeesList = res.json();
// Access the headers, statusCode and raw response body
const { headers, statusCode, body } = res;

Breaking change

This release also introduces a breaking change in the library’s API. All methods now return resource objects wrapped in a Promise<Response<T>>. This was necessary to access response headers for pagination. As a result, you will now need to call .json() on the return value of any method to access the underlying objects returned from the API.

See the “Breaking Change” section in the v0.3.0 release notes for further information.

The road ahead

While the API SDK project will stay in beta until it hits 1.0, the methods are tested to be stable and production-ready. The beta tag implies that the library API may have breaking changes till the interfaces stabilize. We will try to minimise breaking changes, and future updates will mainly add support for additional Freshworks REST APIs. Expect to see broader support for Freshservice REST APIs in the coming months.

If you find any issues or have a feature request, please add them to the API SDK issue queue.

7 Likes

This is Awesome!!! So glad to see functionality for Freshservice Tickets. Congratulation to the whole Freshworks Team. Look forward to testing this out!! :raised_hands: :clap:

2 Likes