Jump to content
Welcome to our new Citrix community!
  • 0

The catalogs api is not returning Ids for each catalog, even though the name and other data is coming back

Paul W Rapoza


Here is my code to get all the catalogs from the site.  I have the bearer token and get the full list of catalogs back, but there are no catalog Ids returned.  I tried to set the flag to return only ids but that returns nothing.  I need the ID for each so I can get all the machines from that catalog (end goal being to try to create a job to reboot all the machines in a catalog).  Why am I not getting back Ids?  Same issue happen when I try the API on the website, I get the list, but no ids):  https://developer.cloud.com/machine-catalogs/apis/get/{customerId}/{siteId}/catalogs


My code:


function GetCatalogs
    param (
        [Parameter(Mandatory = $true)]
        [Parameter(Mandatory = $true)]
        [Parameter(Mandatory = $true)]
    $requestUri = [string]::Format("https://catalogs.apps.cloud.com/{0}/{1}/catalogs", $customerId, $siteId)
    $headers = @{
        "Accept"        = "application/json";
        "Authorization" = "CwsAuth bearer=$bearerToken"
    $response = Invoke-RestMethod -Uri $requestUri -Method GET -Headers $headers
    return $response


Link to comment

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...