Citrix Virtual Apps and Desktops REST APIs

How to get all applications in Citrix Virtual Apps and Desktops

Use REST APIs to get all applications in your Citrix Virtual Apps and Desktops site.

Follow the prerequisites and examples to get started with this API.

You can make API requests using the PowerShell code, C# code, Python, or any tool that supports invoking the REST API.

Prerequisites to get all applications

Get all applications in your site using any REST API tool

Learn from the following example to get all applications in your Citrix Virtual Apps and Desktops site using any REST API tool.

Request

GET https://[DdcServerAddress]/cvad/manage/Applications HTTP/1.1
Accept: application/json
Content-Type: application/json; charset=utf-8
Authorization: CWSAuth bearer=<token-from-prerequisites>
Citrix-CustomerId: loy6oujtu6a4
Citrix-InstanceId: 22ded57c-0306-47e4-b6e8-fed6252759e1
<!--NeedCopy-->

Response

HTTP/1.1 200 OK
citrix-transactionid: 391197e9-6495-4a20-8d2c-c664c6b62eac
content-Length: 1193
content-Type: application/json; charset=utf-8
date: "Thu, 10 Dec 2020 03:54:26 GMT"
Server: Citrix Systems, Inc.

{
    "Items": [
        {
            "Id": "1eccc030-77d9-468a-9244-5537c498a191",
            "Uid": 9,
            "ApplicationFolder": {
                "Id": "0",
                "Uid": 0,
                "Name": ""
            },
            "ApplicationType": "HostedOnDesktop",
            "ClientFolder": null,
            "ContainerScopes": [
                {
                    "Scopes": [
                        {
                            "Id": "00000000-0000-0000-0000-000000000000",
                            "Uid": null,
                            "Name": "All",
                            "Description": null,
                            "IsBuiltIn": true,
                            "IsAllScope": true,
                            "IsTenantScope": false,
                            "TenantId": null,
                            "TenantName": null
                        }
                    ],
                    "ScopeType": "ApplicationGroup"
                }
            ],
            "Description": null,
            "Enabled": true,
            "IconId": "2",
            "InstalledAppProperties": {
                "CommandLineExecutable": "C:\Program Files\Citrix\Studio\HelperConsole\StudioWindowsApp.exe",
                "CommandLineArguments": "%**",
                "WorkingDirectory": "C:\Program Files\Citrix\Studio\HelperConsole"
            },
            "AppVAppProperties": null,
            "ContentLocation": null,
            "Name": "app001",
            "PublishedName": "app001",
            "Visible": true,
            "SharingKind": "Shared",
            "Tags": [],
            "Tenants": null,
            "CloudWorkspaceManaged": false,
            "NumAssociatedDeliveryGroups": 0,
            "NumAssociatedApplicationGroups": 1,
            "AssociatedDeliveryGroupUuids": [],
            "AssociatedApplicationGroupUuids": [
                "53c23ae7-6bc9-4542-b8fd-1b7d538bad41"
            ],
            "ZoneId": ""
        }
        ...
    ]
}
<!--NeedCopy-->

Get all applications in your site using PowerShell

Learn from the following example to get all applications in your Citrix Virtual Apps and Desktops site using any PowerShell code.

function GetAllApplications {
    param (
        [Parameter(Mandatory=$true)]
        [string] $customerid,
        [Parameter(Mandatory=$true)]
        [string] $siteid,
        [Parameter(Mandatory=$true)]
        [string] $bearerToken
    )
    $requestUri = "https://[DdcServerAddress]/cvad/manage/Applications"
    $headers = @{
        "Accept" = "application/json";
        "Authorization" = "CWSAuth Bearer=$bearerToken";
        "Citrix-CustomerId" = $customerid;
        "Citrix-InstanceId" = $siteid;
    }

    $response = Invoke-RestMethod -Uri $requestUri -Method GET -Headers $headers 
    return $response
}

$customerid = "n2ypkklgy6cv"
$siteid = "12f7438-bf8e-42ba-b1b3-2eb75d098f57"
$bearerToken = "eyJ..."
$response = GetAllApplications $customerid $siteid $bearerToken 
<!--NeedCopy-->

Get all applications in your site using any C# code

Learn from the following example to get all applications in your Citrix Virtual Apps and Desktops site using any C# code.

public static async Task<string> GetAllApplications(
    string customerid,
    string siteid,
    string bearerToken)
{
    var requestUri = "https://[DdcServerAddress]/cvad/manage/Applications";
    using (var client = new HttpClient())
    {
        client.DefaultRequestHeaders.Accept.ParseAdd("application/json");
        client.DefaultRequestHeaders.Add("Citrix-CustomerId", customerid);
        client.DefaultRequestHeaders.Add("Citrix-InstanceId", siteid);
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("CWSAuth Bearer=" + bearerToken);

        var response = await client.GetAsync(requestUri);

        if (response != null)
        {
            var content = await response.Content.ReadAsStringAsync();
            return content;
        }

        return null;
    }
}
<!--NeedCopy-->

Get all applications in your site using Python

Learn from the following example to get all applications in your Citrix Virtual Apps and Desktops site using Python.

import requests 

def get_all_applications(bearerToken, customerid, siteid):
    request_uri = "https://[DdcServerAddress]/cvad/manage/Applications"
    headers = {
                'Authorization': 'CWSAuth Bearer %s' % bearerToken,
                'Citrix-CustomerId': customerid,
                'Citrix-InstanceId': siteid,
                'Content-Type': 'application/json',
                'Accept': 'application/json'
              }

    response = requests.get(request_uri, headers = headers)

    return response.json()
<!--NeedCopy-->
Resources
Citrix Virtual Apps and Desktops REST APIs OpenAPI Specification
Copy Download
How to get all applications in Citrix Virtual Apps and Desktops