Workspace Environment Management REST APIs

Use cases and integrations of REST APIs for Workspace Environment Management

Follow the use cases and integrations to enable CPU spike protection in Workspace Environment Management.

Step 1: Query all configuration sets.

Administrators can query all configuration set definitions by invoking:

GET https://api.wem.cloud.com/services/wem/sites HTTP/1.1
Accept: application/json
Authorization: Bearer Your-Bearer-Token
Citrix-CustomerId: Your-Customer-ID
Citrix-TransactionId: ab3e279b-f936-4abe-bfd5-cd24032e66a8
<!--NeedCopy-->

You might retrieve the following results:

HTTP/1.1 200 OK
Citrix-TransactionId: ab3e279b-f936-4abe-bfd5-cd24032e66a8,
Date: Thu, 08 Aug 2019 05:50:09 GMT,
X-Content-Type-Options: nosniff,
Content-Length: 113

{
  "items": [
    {
      "id": 1,
      "name": "Default Site",
      "description": "Default VUEM Site"
    }
  ]
}
<!--NeedCopy-->

Administrators can choose an existing configuration set or create a new one to apply settings. The descriptions below take the default configuration set as an example.

Step 2: Create a new machine-level AD object

Administrators can create a machine-level AD object by invoking:

POST https://api.wem.cloud.com/services/wem/machines HTTP/1.1
Accept: application/json
Content-Type: application/json; charset=utf-8
Authorization: Bearer Your-Bearer-Token
Citrix-CustomerId: Your-Customer-ID
Citrix-TransactionId: ab3e279b-f936-4abe-bfd5-cd24032e66a8

{
  "name": "CN=YourComputerName,CN=Computers,DC=bvt,DC=local",
  "type": "Computer",
  "description": "This is a test computer",
  "siteId": 1,
  "enabled": true,
  "priority": 100
}
<!--NeedCopy-->

The API service might return the following results if the AD object creation completes successfully:

HTTP/1.1 201 Created
Citrix-TransactionId: ab3e279b-f936-4abe-bfd5-cd24032e66a8,
Date: Thu, 08 Aug 2019 05:50:09 GMT,
X-Content-Type-Options: nosniff,
Content-Length: 0
Location: wem/machines/1
<!--NeedCopy-->

Step 3: Enable CPU spike protection, intelligent CPU optimization, and intelligent I/O optimization in the default configuration set.

Administrators can enable CPU spike protection, intelligent CPU optimization, and intelligent I/O optimization by invoking the API:

PUT https://api.wem.cloud.com/services/wem/systemOptimizations HTTP/1.1
Accept: application/json
Content-Type: application/json; charset=utf-8
Authorization: Bearer Your-Bearer-Token
Citrix-CustomerId: Your-Customer-ID
Citrix-TransactionId: ab3e279b-f936-4abe-bfd5-cd24032e66a8

{
  "id": 1,
  "enableCpuSpikeProtection": true,
  "enableIntelligentCpuOptimization": true,
  "enableIntelligentIoOptimization": true
}
<!--NeedCopy-->

The API service might return the following results if the configuration update completes successfully:

HTTP/1.1 204 NoContent
Citrix-TransactionId: ab3e279b-f936-4abe-bfd5-cd24032e66a8,
Date: Thu, 08 Aug 2019 05:50:09 GMT,
X-Content-Type-Options: nosniff,
Content-Length: 0
<!--NeedCopy-->

The configuration of system optimization completes after the preceding steps are performed. The configuration takes effect on the target device where the WEM agent is running.

Resources
Workspace Environment Management REST APIs OpenAPI Specification
Copy Download
Use cases and integrations of REST APIs for Workspace Environment Management

In this article