Citrix Virtual Apps and Desktops REST APIs

How to get details of the App-V servers, packages, and isolation groups configured in Citrix Virtual Apps and Desktops

Use REST APIs to get details about the Microsoft Application Virtualization (App-V) servers, packages, and isolation groups configured within 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 details of the App-V servers, packages, and isolation groups

Get details about the App-V servers, packages, and isolation groups using any REST API tool

Learn from the following example to get details about the App-V servers, packages, and isolation groups configured within your Citrix Virtual Apps and Desktops site using any REST API tool.

Request

GET https://[DdcServerAddress]/cvad/manage/appvservers 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: 06137dc7-193a-41d5-a1a4-317c20f46c85
content-Length: 152
content-Type: application/json; charset=utf-8
date: "Mon, 1 Jan 2021 14:37:42 GMT"

{
  "Items": [
    {
      "Name": "AppVServer01",
      "ManagementServer": "aps-appv01.mydomain.net",
      "PublishingServer": "aps-streaming1.mydomain.net",
      "IsStudioConfigured": true
    },
  {
      "Name": "AppVServer02",
      "ManagementServer": "aps-appv02.mydomain.net",
      "PublishingServer": "aps-streaming2.mydomain.net",
      "IsStudioConfigured": true
    }
  ],
  "ContinuationToken": null,
  "TotalItems": 2
}
<!--NeedCopy-->

Request

GET https://[DdcServerAddress]/cvad/manage/appvpackages 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: 06137dc7-193a-41d5-a1a4-317c20f46c85
content-Length: 409
content-Type: application/json; charset=utf-8
date: "Mon, 1 Jan 2021 14:39:10 GMT"

{
  "Items": [
    {
      "AppVApplications": [
        {
          "Id": "00000000...",
          "Identifier": "null",
          "ServerMachineConfigurationUid": "3abc8a76-34b1-4337-84f8-123c540fdfaa",
          "Name": "sample application",
          "PackageId": "1",
          "PackageName": "sample-pkg1",
          "PackageVersion": "1.0.0.1",
          "PackageVersionId": "fa10f3a3-249b-467e-a8a8-5cc1ef1518e0",
          "PublishingServer": "aps-streaming1.mydomain.net",
          "Uid": 0,
          "BrokerApplicationNames": [
          ]
        }
      ],
      "Description": "Sample App-V package",
      "Exists": true,
      "LibraryUid": 0,
      "LibraryName": "string",
      "LibraryDescription": "string",
      "Name": "sample-pkg1",
      "Id": "1",
      "Path": "string",
      "Uid": 0,
      "Version": "1.0.0.1",
      "VersionGuid": "fa10f3a3-249b-467e-a8a8-5cc1ef1518e0",
      "SourceName": "",
      "SourceType": "Unknown",
      "SourceTypeName": "Unknown",
      "OrderNumber": 0,
      "ExplicitInclusion": true,
      "NumOfBrokerApplications": 0,
      "NumOfBrokerDeliveryGroups": 0
    }
  ],
  "ContinuationToken": null,
  "TotalItems": 1
}
<!--NeedCopy-->

Request

GET https://[DdcServerAddress]/cvad/manage/appvisolationgroups 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: 06137dc7-193a-41d5-a1a4-317c20f46c85
content-Length: 423
content-Type: application/json; charset=utf-8
date: "Mon, 1 Jan 2021 14:43:09 GMT"

{
  "Items": [
    {
      "Name": "sample-igroup",
      "Description": "Sample Isolation Group",
      "Version": "0",
      "Uid": 0,
      "AppVPackages": [
        {
          "AppVApplications": [
            {
              "Id": "00000000...",
              "Identifier": "null",
              "ServerMachineConfigurationUid": "3abc8a76-34b1-4337-84f8-123c540fdfaa",
              "Name": "sample application",
              "PackageId": "1",
              "PackageName": "sample-pkg1",
              "PackageVersion": "1.0.0.1",
              "PackageVersionId": "fa10f3a3-249b-467e-a8a8-5cc1ef1518e0",
              "PublishingServer": "aps-streaming1.mydomain.net",
              "Uid": 0,
              "BrokerApplicationNames": []
            }
          ],
          "Description": "Sample App-V package",
          "Exists": true,
          "LibraryUid": 0,
          "LibraryName": "string",
          "LibraryDescription": "string",
          "Name": "sample-pkg1",
          "Id": "1",
          "Path": "string",
          "Uid": 0,
          "Version": "1.0.0.1",
          "VersionGuid": "fa10f3a3-249b-467e-a8a8-5cc1ef1518e0",
          "SourceName": "",
          "SourceType": "Unknown",
          "SourceTypeName": "Unknown",
          "OrderNumber": 0,
          "ExplicitInclusion": true,
          "NumOfBrokerApplications": 0,
          "NumOfBrokerDeliveryGroups": 0
        }
      ]
    }
  ],
  "ContinuationToken": null,
  "TotalItems": 1
}
<!--NeedCopy-->

Get details about the App-V servers, packages, and isolation groups using PowerShell

Learn from the following example to get details about the App-V servers, packages, and isolation groups configured within your Citrix Virtual Apps and Desktops site using any PowerShell code.

function GetAppVServers {
    param (
        [Parameter(Mandatory=$true)]
        [string] $customerid,
        [Parameter(Mandatory=$true)]
        [string] $siteid,
        [Parameter(Mandatory=$true)]
        [string] $bearerToken
    )
    $requestUri = "https://[DdcServerAddress]/cvad/manage/appvservers"
    $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
}

function GetAppVPackages {
    param (
        [Parameter(Mandatory=$true)]
        [string] $customerid,
        [Parameter(Mandatory=$true)]
        [string] $siteid,
        [Parameter(Mandatory=$true)]
        [string] $bearerToken
    )
    $requestUri = "https://[DdcServerAddress]/cvad/manage/appvpackages"
    $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
}

function GetAppVIsolationGroups {
    param (
        [Parameter(Mandatory=$true)]
        [string] $customerid,
        [Parameter(Mandatory=$true)]
        [string] $siteid,
        [Parameter(Mandatory=$true)]
        [string] $bearerToken
    )
    $requestUri = "https://[DdcServerAddress]/cvad/manage/appvisolationgroups"
    $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 = "customer1"
$siteid = "61603f15-cdf9-4c7f-99ff-91636601a795"
$bearerToken = "ey1.."
$response1 = GetAppVServers $customerid $siteid $bearerToken 
$response2 = GetAppVPackages $customerid $siteid $bearerToken 
$response3 = GetAppVIsolationGroups $customerid $siteid $bearerToken 
<!--NeedCopy-->

Get details about the App-V servers, packages, and isolation groups using C# code

Learn from the following example to get details about the App-V servers, packages, and isolation groups configured within your Citrix Virtual Apps and Desktops site using C# code.

public static async Task<string> GetAppVServers(
    string customerid,
    string siteid,
    string bearerToken)
{
    var requestUri = "https://[DdcServerAddress]/cvad/manage/appvservers";
    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;
    }
}

public static async Task<string> GetAppVPackages(
    string customerid,
    string siteid,
    string bearerToken)
{
    var requestUri = "https://[DdcServerAddress]/cvad/manage/appvpackages";
    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;
    }
}

public static async Task<string> GetAppVIsolationGroups(
    string customerid,
    string siteid,
    string bearerToken)
{
    var requestUri = "https://[DdcServerAddress]/cvad/manage/appvisolationgroups";
    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 details about the App-V servers, packages, and isolation groups using Python

Learn from the following example to get details about the App-V servers, packages, and isolation groups configured within your Citrix Virtual Apps and Desktops site using Python.

import requests 

def get_appv_servers(bearerToken, customerid, siteid):
    request_uri = "https://[DdcServerAddress]/cvad/manage/appvservers"
    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()

def get_appv_packages(bearerToken, customerid, siteid):
    request_uri = "https://[DdcServerAddress]/cvad/manage/appvpackages"
    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()

def get_appv_isolation_groups(bearerToken, customerid, siteid):
    request_uri = "https://[DdcServerAddress]/cvad/manage/appvisolationgroups"
    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 details of the App-V servers, packages, and isolation groups configured in Citrix Virtual Apps and Desktops