Autoscale APIs - Tech Preview

The Autoscale APIs provide a set of REST APIs that can be used to configure Autoscale.

Using this documentation

  • Read the prerequisites and ensure that you have the bearer token and customerId.
  • Use the Autoscale APIs described below.

API list

  • GET /techpreview/{customerid}/{siteid}/DeliveryGroups/{nameOrId}/PowerTimeSchemes
  • GET /techpreview/{customerid}/{siteid}/DeliveryGroups/{nameOrId}/PowerTimeSchemes/{schemeNameOrId}
  • POST /techpreview/{customerid}/{siteid}/DeliveryGroups/{nameOrId}/PowerTimeSchemes
  • DELETE /techpreview/{customerid}/{siteid}/DeliveryGroups/{nameOrId}/PowerTimeSchemes/{schemeNameOrId}
  • PATCH /techpreview/{customerid}/{siteid}/DeliveryGroups/{nameOrId}/PowerTimeSchemes/{schemeNameOrId}

Get the detailed information about the Autoscale APIs from: <https://{customerId}.xendesktop.net/citrix/orchestration/api/swagger/ui/index#/>

REST examples

The following examples illustrate how to configure Autoscale using REST APIs.

/techpreview/{customerid}/{siteid}/DeliveryGroups/{nameOrId}/PowerTimeSchemes

Method

GET

Description

Get the power time schemes associated with a Delivery Group

Request

GET https://{customerId}.xendesktop.net/citrix/orchestration/api/techpreview/{customerid}/{siteid}/DeliveryGroups/{nameOrId}/PowerTimeSchemes HTTP/1.1
Accept: */*
Authorization: Bearer <token-from-prerequisites>

Response

HTTP/1.1 200 OK
Content-Length: 377
Content-Type: application/json; charset=utf-8
Date: Mon, 25 Mar 2019 02:15:58 GMT
{
    "Items": [
        {
            "DaysOfWeek": [
                "Sunday"
            ],
            "Name": "DeliveryGroupCreationWithFullParameters_test",
            "DisplayName": "test",
            "PeakHours": null,
            "PeakTimeRanges": [
                "07:00-19:00"
            ],
            "PoolSize": null,
            "PoolSizeSchedule": [],
            "PoolUsingPercentage": true,
            "Id": "39"
        }
    ]
}

Interpreting the response

Property Name Description
DaysOfWeek The pattern of days of the week that the power time scheme covers.
Name The administrative name of the power time scheme.
DisplayName The name of the power time scheme displayed in Citrix Studio.
PeakHours Deprecated.
PeakTimeRanges A list of peak time ranges during the day.
PoolSize Deprecated.
PoolSizeSchedule A list of pool size schedules during the day.
PoolUsingPercentage Indicates whether the integer values in the pool size array are treated as absolute values (if this value is false) or as percentages of the number of machines in the Delivery Group (if this value is true).
Id ID of the power time scheme.

/techpreview/{customerid}/{siteid}/DeliveryGroups/{nameOrId}/PowerTimeSchemes/{schemeNameOrId}

Method

GET

Description

Get the details about a single power time scheme associated with a Delivery Group.

Request

GET https://{customerId}.xendesktop.net/citrix/orchestration/api/techpreview/{customerid}/{siteid}/DeliveryGroups/{nameOrId}/PowerTimeSchemes/{schemeNameOrId} HTTP/1.1
Accept: */*
Authorization: Bearer <token-from-prerequisites>

Response

HTTP/1.1 200 OK
Content-Length: 311
Content-Type: application/json; charset=utf-8
Date: Mon, 25 Mar 2019 02:55:53 GMT
{
  "DaysOfWeek": [
    "Saturday",
    "Sunday"
  ],
  "Name": "DeliveryGroupForPowerTimePooledVDI_Weekend",
  "DisplayName": "Weekend",
  "PeakHours": null,
  "PeakTimeRanges": [
    "07:00-19:00"
  ],
  "PoolSize": null,
  "PoolSizeSchedule": [],
  "PoolUsingPercentage": false,
  "Id": "61"
}

Interpreting the response

Property Name Description
DaysOfWeek The pattern of days of the week that the power time scheme covers.
Name The administrative name of the power time scheme.
DisplayName The name of the power time scheme displayed in Citrix Studio.
PeakHours Deprecated.
PeakTimeRanges List of peak time ranges during the day.
PoolSize Deprecated.
PoolSizeSchedule A list of pool size schedules during the day.
PoolUsingPercentage Indicates whether the integer values in the pool size array are treated as absolute values (if this value is false) or as percentages of the number of machines in the Delivery Group (if this value is true).
Id ID of the power time scheme.

/techpreview/{customerid}/{siteid}/DeliveryGroups/{nameOrId}/PowerTimeSchemes

Method

POST

Description

Create a power time scheme for a delivery group.

Request

POST https://{customerId}.xendesktop.net/citrix/orchestration/api/techpreview/{customerid}/{siteid}/DeliveryGroups/{nameOrId}/PowerTimeSchemes HTTP/1.1
Accept: */*
Content-Type: application/json
content-length: 331
Content-Type: application/json
Authorization: Bearer <token-from-prerequisites>
{
  "DaysOfWeek":  [
                     "Sunday"
                 ],
  "Name":  null,
  "DisplayName":  "Sunday",
  "PeakHours":  null,
  "PeakTimeRanges":  [

                     ],
  "PoolSize":  null,
  "PoolSizeSchedule":  [

                       ],
  "PoolUsingPercentage":  false
}

Interpreting the request

Property Name Description
DaysOfWeek The pattern of days of the week that the power time scheme covers.
Name The administrative name of the power time scheme. If not specified, the name will be generated based on the Delivery Group name and DisplayName
DisplayName The name of the power time scheme displayed in Citrix Studio. If not specified, the name will be generated based on DaysOfWeek and localized based on the X-CC-Locale request header.
PeakHours Deprecated.
PeakTimeRanges A list of peak time ranges during the day. If not specified, pool management will not be applied during any hours.
PoolSize Deprecated.
PoolSizeSchedule A list of pool size schedules during the day. If not specified during creation, pool management will not be applied during any hours.
PoolUsingPercentage Indicates whether the integer values in the pool size array are treated as absolute values (if this value is false) or as percentages of the number of machines in the Delivery Group (if this value is true). By default, the value is false.

Response

HTTP/1.1 200 OK
Content-Length: 270
Content-Type: application/json; charset=utf-8
Date: Mon, 25 Mar 2019 03:12:25 GMT
{
  "DaysOfWeek": [
    "Sunday"
  ],
  "Name": "DeliveryGroupForPowerTimePooledVDI_Sunday",
  "DisplayName": "Sunday",
  "PeakHours": null,
  "PeakTimeRanges": [],
  "PoolSize": null,
  "PoolSizeSchedule": [],
  "PoolUsingPercentage": false,
  "Id": "100"
}

Interpreting the response

Property Name Description
DaysOfWeek The pattern of days of the week that the power time scheme covers.
Name The administrative name of the power time scheme.
DisplayName The name of the power time scheme displayed in Citrix Studio.
PeakHours Deprecated.
PeakTimeRanges A list of peak time ranges during the day.
PoolSize Deprecated.
PoolSizeSchedule A list of pool size schedules during the day.
PoolUsingPercentage Indicates whether the integer values in the pool size array are treated as absolute values (if this value is false) or as percentages of the number of machines in the Delivery Group (if this value is true).
Id ID of the power time scheme.

/techpreview/{customerid}/{siteid}/DeliveryGroups/{nameOrId}/PowerTimeSchemes/{schemeNameOrId}

Method

DELETE

Description

Delete a power time scheme from a Delivery Group.

Request

DELETE https://{customerId}.xendesktop.net/citrix/orchestration/api/techpreview/{customerid}/{siteid}/DeliveryGroups/{nameOrId}/PowerTimeSchemes/{schemeNameOrId} HTTP/1.1
Accept: */*
Authorization: Bearer <token-from-prerequisites>

Response

HTTP/1.1 204 No Content
Content-Length: 0
Date: Mon, 25 Mar 2019 03:16:42 GMT

/techpreview/{customerid}/{siteid}/DeliveryGroups/{nameOrId}/PowerTimeSchemes/{schemeNameOrId}

Method

PATCH

Description

Update a power time scheme for a Delivery Group.

Request

PATCH https://{customerId}.xendesktop.net/citrix/orchestration/api/techpreview/{customerid}/{siteid}/DeliveryGroups/{nameOrId}/PowerTimeSchemes/{schemeNameOrId} HTTP/1.1
Accept: */*
content-length: 349
Authorization: Bearer <token-from-prerequisites>
{
  "DaysOfWeek":  [
                     "Saturday"
                 ],
  "Name":  "DeliveryGroupForPowerTimeStaticVDI_Weekend",
  "DisplayName":  "Weekend",
  "PeakHours":  null,
  "PeakTimeRanges":  null,
  "PoolSize":  null,
  "PoolSizeSchedule":  [

                       ],
  "PoolUsingPercentage":  false
}

Interpreting the request

Property Name Description
DaysOfWeek The pattern of days of the week that the power time scheme covers. If not specified, leaves the value unchanged.
Name The administrative name of the power time scheme. If not specified, leaves the value unchanged.
DisplayName The name of the power time scheme displayed in the Studio console. If not specified, leaves the value unchanged.
PeakHours Deprecated.
PeakTimeRanges A list of peak time ranges during the day. If not specified, leaves the value unchanged.
PoolSize Deprecated.
PoolSizeSchedule A list of pool size schedules during the day. If not specified, leaves the value unchanged.
PoolUsingPercentage Indicates whether the integer values in the pool size array are treated as absolute values (if this value is false) or as percentages of the number of machines in the Delivery Group (if this value is true). If not specified, leaves the value unchanged.

Response

HTTP/1.1 204 No Content
Content-Length: 0
Date: Mon, 25 Mar 2019 03:30:37 GMT
{
  "DaysOfWeek": [
    "Saturday"
  ],
  "Name": "DeliveryGroupForPowerTimeStaticVDI_Weekend",
  "DisplayName": "Weekend",
  "PeakHours": null,
  "PeakTimeRanges": [
    "07:00-19:00"
  ],
  "PoolSize": null,
  "PoolSizeSchedule": [],
  "PoolUsingPercentage": false,
  "Id": "124"
}

Interpreting the response

Property Name Description
DaysOfWeek The pattern of days of the week that the power time scheme covers.
Name The administrative name of the power time scheme.
DisplayName The name of the power time scheme displayed in Citrix Studio.
PeakHours Deprecated.
PeakTimeRanges A list of peak time ranges during the day.
PoolSize Deprecated.
PoolSizeSchedule A list of pool size schedules during the day.
PoolUsingPercentage Indicates whether the integer values in the pool size array are treated as absolute values (if this value is false) or as percentages of the number of machines in the Delivery Group (if this value is true).
Id ID of the power time scheme.

Comments