book
Article ID: CTX312284
calendar_today
Updated On:
Description
Citrix DaaS (Formerly Citrix Virtual Apps and Desktops service) has always accumulated valuable data on infrastructure performance, user activity and resource consumption that has been retrieved and put to great use by various functions such as IT, HR and Operations. We at Citrix fully acknowledge the need to be resilient and provide a smooth experience to developers who retrieve the data and ensure that the right audience get access to that data. In our continuous effort to improve on the above-mentioned parameters, we are introducing a new version of oData API that provides better resiliency and governance and has more computing resources to function efficiently.
What has changed?
The existing endpoint of the following format will be retired on 30 June 2023.
https://[customer_id].xendesktop.net/citrix/monitor/odata/v4/data
The new version of oData APIs would hosted on the following endpoint
https://api-us.cloud.com/monitorodata. Here are the region specific endpoints
• US region: https://api-us.cloud.com/monitorodata
• EU region: https://api-eu.cloud.com/monitorodata
• AP-S region: https://api-ap-s.cloud.com/monitorodata
Additionally, the following limitation will be applied to the rate limits:
- Only one API call is allowed for a tenant at a time. Attempts to invoke parallel calls will result in a 429 error code as depicted here.
What actions are required from your end?
Following are the required to your scripts that invoke the oData APIs
- Change the endpoint location to point to the new location. Example - https://api-us.cloud.com/monitorodata
- Change the pagination mechanism to adhere strictly to the rate limits documented here .Here is a short example on how to iterate through large data sets
$customerId = "[customerid]"
$api = " https://api-us.cloud.com/monitorodata"
$endpoint = "$api/Applications"$bearer = "CWSAuth bearer=[token]"
$headers = @{'Citrix-CustomerId'=$customerId;'Authorization'=$bearer}
$results = Invoke-RestMethod $endpoint -Headers $headers -Verbose
Write-Host “Number of items returned in the first call : ”, $results.value.Count
while($results.'@odata.nextLink' -ne $null)
{
$results = Invoke-RestMethod $results.'@odata.nextLink' -Headers $headers -Verbose
Write-Host "Number of items returned in next call : ", $results.value.Count
}
A proactive approach to updating the scripts as described above will save failures and downstream disruption to your data collection mechanisms. Please note that Odata APIs are still in tech preview.