When attempting to pull a full list of custom objects on my instance, I get a 403 error. However, using the same API key in Postman, the results are returned. I looked at the error results in more detail and found that the URL is malformed. This is when using the Get-FreshserviceCustomObject cmdlet. I've also tried manually specifying the workspace (we only use one), and there's no difference.
Expected Behavior
It should pull a list of all custom objects on the instance. The URL it should hit is /api/v2/objects.
Current Behavior
It is instead hitting /api/_/business_objects?page=2. The issue may be with how it determines the need for pagination, as even if I set the per_page value high enough that everything should be pulled in a single call, this is still the endpoint the cmdlet is trying to invoke.
Possible Solution
Again, my guess is the way it decides on the need for pagination, but I'm not sure. As a workaround, I'm directly invoking the Invoke-FreshworkRestMethod private cmdlet and providing the URL manually.
Steps to Reproduce (for bugs)
Very simply, just use the Get-FreshserviceCustomObject cmdlet without any other parameters (or only workspace_id specified).
Context
I'm trying to build an automatic backup process for all of our custom objects.
Your Environment
Module version is 0.1.6, PowerShell version is 7.4.5, and Windows version is 10.0.17763.
Welp, I just looked and I think it's a FS issue. The relationlink value they are returning is incorrect. I guess it's a ticket to them, but I'll wait to see what they say before closing this issue.
When attempting to pull a full list of custom objects on my instance, I get a 403 error. However, using the same API key in Postman, the results are returned. I looked at the error results in more detail and found that the URL is malformed. This is when using the Get-FreshserviceCustomObject cmdlet. I've also tried manually specifying the workspace (we only use one), and there's no difference.
Expected Behavior
It should pull a list of all custom objects on the instance. The URL it should hit is/api/v2/objects.
Current Behavior
It is instead hitting/api/_/business_objects?page=2. The issue may be with how it determines the need for pagination, as even if I set the per_page value high enough that everything should be pulled in a single call, this is still the endpoint the cmdlet is trying to invoke.
Possible Solution
Again, my guess is the way it decides on the need for pagination, but I'm not sure. As a workaround, I'm directly invoking the Invoke-FreshworkRestMethod private cmdlet and providing the URL manually.
Steps to Reproduce (for bugs)
Very simply, just use the Get-FreshserviceCustomObject cmdlet without any other parameters (or only workspace_id specified).
Context
I'm trying to build an automatic backup process for all of our custom objects.
Your Environment
Module version is 0.1.6, PowerShell version is 7.4.5, and Windows version is 10.0.17763.