HTTP/1.1200OKContent-Length:871Content-Type:application/json;charset=utf-8Date:"Thu, 03 Aug 2017 18:04:15 GMT"{"Catalogs":[{"StoreFrontUrl":"customer.cloud.com","AzureSubscriptionId":"c38c7a5c...","Id":"cd2efc54-6918-4bf8-b469-18b62cd73bc2","Name":"Finance Catalog","State":"Active","SubState":"","Warnings":[{"Type":"CapacityUpdateFailed","IsDismissible":false,"WarningMessage":"The capacity settings failed to apply. Click Save to try to save the settings again."}],"StatusMessage":"","SubscriptionName":"Finance Azure Subscription","ResourceGroup":"FinanceRG","Region":"westus","VNetName":"FinanceVnet","Subnet":"FinanceSubnet","DomainName":"customer.local","DomainServiceAccount":"user","ImageId":"f5b89234-3898-49de-9a5b-6838fc58c617","TemplateImageName":"Windows Server 2012 R2 with VDA 7.14.1","TaskCompletionPercentage":100,"LastModifiedTime":"2017-08-03T18:04:15.6821456+00:00"},{"StoreFrontUrl":"","AzureSubscriptionId":"414b76fd-...","Id":"8ae0b05d-3bce-4b2d-a9fc-d9be0acce272","Name":"Sales Catalog","State":"Error","SubState":"ErrorVdaDeployingCitrixServersFailed","Warnings":[],"StatusMessage":"Failed to deploy Citrix server VMs: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs. See <a href=\"https://support.citrix.com/article/CTX224151\">CTX224151</a> for steps to troubleshoot common catalog creation failures. Contact Citrix support and provide the Transaction ID if further assistance is required.","TransactionId":"7d9b90ea-4bc5-4b0d-823c-11719ddafc02","SubscriptionName":"Sales Azure Subscription","ResourceGroup":"SalesRG","Region":"eastus","VNetName":"SalesVnet","Subnet":"default","DomainName":"customer.com","DomainServiceAccount":"user","ImageId":"f5b89234-3898-49de-9a5b-6838fc58c617","TemplateImageName":"Windows Server 2012 R2 with VDA 7.14.1","TaskCompletionPercentage":100,"LastModifiedTime":"2017-08-03T17:50:35.1667064+00:00"}],"CatalogLimit":{"Limit":3,"ExistingCatalogsCount":2,"ServiceState":"ProductionTrial","HasLimitReached":false}}

This example illustrates how to get the details of all catalogs that were created in a customer’s account using PowerShell.

functionGetAllCatalogs{param([Parameter(Mandatory=$true)][string]$customerId,[Parameter(Mandatory=$true)][string]$siteId,[Parameter(Mandatory=$true)][string]$bearerToken)$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-MethodGET-Headers$headersreturn$response}$customerId="customer1"#Replace with your customerId$siteId="61603f15-cdf9-4c7f-99ff-91636601a795"#Replace with your site ID$bearerToken="ey1.."#See Prerequisites for all API calls section for a sample of how to get your bearer token$response=GetAllCatalogs$customerId$siteId$bearerToken

This example illustrates how to get the details of all catalogs that were created in a customer’s account using C#.

publicstaticasyncTask<string>GetAllCatalogs(stringcustomerId,stringsiteId,stringbearerToken){varrequestUri=string.Format("https://catalogs.apps.cloud.com/{0}/{1}/catalogs",customerId,siteId);using(varclient=newHttpClient()){client.DefaultRequestHeaders.Accept.ParseAdd("application/json");client.DefaultRequestHeaders.Authorization=newAuthenticationHeaderValue("CwsAuth","Bearer="+bearerToken);varresponse=awaitclient.GetAsync(requestUri);if(response!=null){varcontent=awaitresponse.Content.ReadAsStringAsync();// Parsing the JSON content is left as an exercise to the reader.// Consult Json.NET documentation on newtonsoft.com for more information.returncontent;}returnnull;}}