This example illustrates how to get the details of all applications published for a catalog in a customer’s account using PowerShell.

functionGetCatalogApplications{param([Parameter(Mandatory=$true)][string]$customerId,[Parameter(Mandatory=$true)][string]$siteId,[Parameter(Mandatory=$true)][string]$catalogId,[Parameter(Mandatory=$true)][string]$bearerToken)$requestUri=[string]::Format("https://catalogs.apps.cloud.com/{0}/{1}/catalogs/{2}/apps",$customerId,$siteId,$catalogId)$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$catalogId="8d352ba7-1917-41c3-95e5-50f436be8968"#Replace with your catalog ID$bearerToken="ey1.."#See Prerequisites for all API calls section for a sample of how to get your bearer token$response=GetCatalogApplications$customerId$siteId$catalogId$bearerToken

This example illustrates how to get the details of all applications published for a catalog in a customer’s account using C#.

publicstaticasyncTask<string>GetCatalogApplications(stringcustomerId,stringsiteId,stringcatalogId,stringbearerToken){varrequestUri=string.Format("https://catalogs.apps.cloud.com/{0}/{1}/catalogs/{2}/apps",customerId,siteId,catalogId);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;}}