API to fetch all workspaces in Freshservice

I went through the entire documentation provided in developers.freshservice.com and did not find an API to fetch all Workspaces for a Freshservice account.

This is required for a Marketplace app where the admin can choose the Workspace where the settings can be configured.

Below is a screenshot of the support article on the Freshservice helpdesk Workspaces : Freshservice

Could someone help me with the API to fetch all workspaces?

Arun Rajkumar

Hi @arunrajkumar235,

There’s no documented API available for Workspaces that I could find as well.

So, I have created a support ticket to Freshservice on your behalf to find out if there are any yet-to-be-documented APIs available. Here’s the ticket ID: #14952194

Please community on the email thread directly upon receiving replies from the Freshservice support.

1 Like

It isn’t documented, but there is a public Workspaces endpoint (api/v2/workspaces):

PS C:\FreshservicePS> Get-FSWorkspace -Verbose
VERBOSE: Appending Authorization header
VERBOSE: Invoke-FreshworksRestMethod - Initiating REST API call to https://its-fine.freshservice.com/api/v2/workspaces?page=1&per_page=100 with API key:  x
VERBOSE: Invoke-FreshworksRestMethod - REST call parameters:
VERBOSE: Invoke-FreshworksRestMethod - ContentType:  application/json; charset=utf-8
VERBOSE: Invoke-FreshworksRestMethod - Method:  GET
VERBOSE: Invoke-FreshworksRestMethod - Uri:  https://its-fine.freshservice.com/api/v2/workspaces?page=1&per_page=100
VERBOSE: Invoke-FreshworksRestMethod - ErrorAction:  Stop
VERBOSE: Invoke-FreshworksRestMethod - Headers:
VERBOSE: Invoke-FreshworksRestMethod - Authorization:  Basic x
VERBOSE: Invoke-FreshworksRestMethod - Accept-Charset:  utf-8
VERBOSE: Invoke-FreshworksRestMethod - UseBasicParsing:  True
VERBOSE: Invoke-FreshworksRestMethod - Invoking REST GET Method on https://its-fine.freshservice.com/api/v2/workspaces?page=1&per_page=100...
VERBOSE: Invoke-FreshworksRestMethod - Forcing TLS 1.2 protocol for invoking REST method.
VERBOSE: HTTP/1.1 GET with 0-byte payload
VERBOSE: received -byte response of content type application/json
VERBOSE: Returned status OK with code 200.                                                                              
VERBOSE: Current FreshService minute rate limit is 500 with 498 calls remaining (0.4% used) .
VERBOSE: Invoke-FreshworksRestMethod - Completed REST GET Method on https://its-fine.freshservice.com/api/v2/workspaces?page=1&per_page=100 in 00:00:00.2078021.
VERBOSE: Returning workspaces property with count 2

created_at    : 7/25/2023 1:25:30 PM
description   : 
id            : 2
name          : My Team
primary       : True
restricted    : False
state         : active
template_name : it
updated_at    : 7/25/2023 1:25:30 PM

created_at    : 8/25/2023 8:58:25 PM
description   : 
id            : 3
name          : IT Custom
primary       : False
restricted    : False
state         : active
template_name : it
updated_at    : 8/25/2023 8:59:09 PM

1 Like

That worked like a charm. Thanks for sharing, @rasimm.

@Raviraj, it would be great if this could be documented in the public API documentation for Freshservice so others can benefit from this.

@arunrajkumar235 Glad it worked for you. Don’t get me started on missing or unclear documentation. :wink:

1 Like

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.

@arunrajkumar235 @rasimm, We will document the product APIs when they are ready for public consumption.

The Freshservice team has confirmed that this API is unavailable to the public and will be considered a feature request.

I will move this topic to the Ideas category to add more people’s requests as upvotes to help the Freshservice product team assess this request accordingly.