How to retrieve data related to application

Application represents a virtualized application running on a session. Use Citrix Monitor Service API to get the details of applications.

Prerequisites

DesktopGroup Id with active application

  • LifecycleState=0 represents the active application.

Request

GET /monitorodata/Applications?$filter=LifecycleState eq 0&$expand=DesktopGroups($select=Id) HTTP/1.1
Host: api.cloud.com
Authorization: CWSAuth bearer=<Token>
Citrix-CustomerId: <CustomerId>
<!--NeedCopy-->

Response

HTTP/1.1 200 OK
Date: Thu, 01 Aug 2024 06:23:00 GMT
Content-Type: application/json; odata.metadata=minimal
Content-Length: 5506
Connection: keep-alive
odata-version: 4.0

{
    "@odata.context": "https://api.cloud.com/monitorodata/$metadata#Applications(DesktopGroups(Id))",
    "value": [
        {
            "Id": "40610fc4-cbc0-4458-baaa-07254ae54d41",
            "Name": "Citrix Floor Plan Viewer",
            "PublishedName": "Citrix Floor Plan Viewer",
            "ApplicationType": 0,
            "Enabled": false,
            "AdminFolder": "",
            "LifecycleState": 0,
            "Path": "C:\\Program Files (x86)\\Norskale\\Norskale Agent Host\\VUEMAppCmd.exe",
            "BrowserName": "Citrix Floor Plan Viewer",
            "CreatedDate": "2018-12-11T19:55:33.29Z",
            "ModifiedDate": "2018-12-11T19:55:33.29Z",
            "DesktopGroups": [
                {
                    "Id": "0052e44f-f32d-476f-a307-cfd617baabda"
                }
            ]
        }
    ]
}
<!--NeedCopy-->

Count by ApplicationType

  • Use groupby operation to get the count group by ApplicationType.

Request

GET /monitorodata/Applications?$apply=groupby((ApplicationType), aggregate(NAme with countdistinct as NumberofApplications)) HTTP/1.1
Host: api.cloud.com
Authorization: CWSAuth bearer=<Token>
Citrix-CustomerId: <CustomerId>
<!--NeedCopy-->

Response

HTTP/1.1 200 OK
Date: Thu, 01 Aug 2024 06:23:00 GMT
Content-Type: application/json; odata.metadata=minimal
Content-Length: 5506
Connection: keep-alive
odata-version: 4.0

{
    "@odata.context": "https://api.cloud.com/monitorodata/$metadata#Applications(ApplicationType,NumberofApplications)",
    "value": [
        {
            "@odata.id": null,
            "ApplicationType": 0,
            "NumberofApplications": 68
        }
    ]
}
<!--NeedCopy-->

Active applications with count

  • LifecycleState eq 0 represents Active applications.
  • $count=true parameter returns count in response.

Request

GET /monitorodata/Applications?$filter=LifecycleState eq 0&$count=true HTTP/1.1
Host: api.cloud.com
Authorization: CWSAuth bearer=<Token>
Citrix-CustomerId: <CustomerId>
<!--NeedCopy-->

Response

HTTP/1.1 200 OK
Date: Thu, 01 Aug 2024 06:23:00 GMT
Content-Type: application/json; odata.metadata=minimal
Content-Length: 5506
Connection: keep-alive
odata-version: 4.0

{
    "@odata.context": "https://api.cloud.com/monitorodata/$metadata#Applications",
    "@odata.count": 68,
    "value": [
        {
            "Id": "88040e8b-8b62-4cde-bc2c-014d87518191",
            "Name": "MyCigna",
            "PublishedName": "MyCigna",
            "ApplicationType": 0,
            "Enabled": false,
            "AdminFolder": "",
            "LifecycleState": 0,
            "Path": "C:\\Program Files (x86)\\Norskale\\Norskale Agent Host\\VUEMAppCmd.exe",
            "BrowserName": "MyCigna",
            "CreatedDate": "2018-12-11T19:56:18.177Z",
            "ModifiedDate": "2018-12-11T19:56:18.177Z"
        }
    ]
}
<!--NeedCopy-->
Resources
Citrix Monitor Service API OpenAPI Specification
Copy Download
How to retrieve data related to application