### Activity Response Example Source: https://context7.com/euc-dev/horizon-apis/llms.txt Example JSON response for a system or audit activity. ```json # Response: # { # "content": [ # { # "id": "activity-uuid-1234", # "type": "SYSTEM", # "action": "POOL_CREATE", # "status": "COMPLETED", # "timestamp": "2024-01-15T10:30:00Z", # "details": "Created pool Windows-10-Pool" # } # ] # } ``` -------------------------------- ### Edge Deployment Response Example Source: https://context7.com/euc-dev/horizon-apis/llms.txt Example JSON response structure for edge deployment details. ```json # Response: # { # "id": "edge-uuid-1234", # "name": "Edge-Gateway-US-East", # "status": "READY", # "fqdn": "edge-gateway.domain.com", # "providerInstanceId": "provider-uuid" # } ``` -------------------------------- ### Configure Single Sign-On (SSO) Source: https://context7.com/euc-dev/horizon-apis/llms.txt Manages SSO configurations, including listing existing configurations, retrieving discovery data, and creating new SSO setups. ```bash # List SSO configurations curl --request GET 'https://cloud-sg.horizon.omnissa.com/admin/v2/sso-configurations?page=0&size=10' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' # Get SSO discovery data curl --request GET 'https://cloud-sg.horizon.omnissa.com/admin/v2/sso-configurations/discovery-data?metadata_url=https://idp.company.com/metadata' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' # Create SSO configuration curl --request POST 'https://cloud-sg.horizon.omnissa.com/admin/v2/sso-configurations' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "name": "Corporate-SAML", "metadataUrl": "https://idp.company.com/metadata", "enabled": true }' ``` -------------------------------- ### Connecting to the API Source: https://github.com/euc-dev/horizon-apis/blob/main/docs/view/versions/2512/index.md Demonstrates how to establish a connection to the Omnissa View API using the provided client library. Includes examples for basic login and for scenarios requiring certificate overrides. ```APIDOC ## Connecting to the API The URL of the API is **https://_server-address_ /view-vlsi/sdk** ### Client library The client library provides a **Connection** class to easily connect to the API. This class will be needed to use much of the client library code. ```c# // Uses try-with-resources to ensure connection is cleaned up after completion. try (Connection connection = new Connection("https://_server-address_ /view-vlsi/sdk")) { connection.login(username, password, domain); // Do work } ``` If a certificate override is needed this can be accomplished using the **HttpConfiguration** settings. ```c# HttpConfiguration httpConfig = HttpConfiguration.Factory.newInstance(); httpConfig.setThumbprintVerifier(new ThumbprintVerifier() { public Result verify(String thumbprint) { if (acceptedThumbprint == null) { return Result.UNKNOWN; } else if (acceptedThumbprint.equals(thumbprint)) { return Result.MATCH; } else { return Result.MISMATCH; } } public void onSuccess(X509Certificate[] chain, String thumbprint, Result verifyResult, boolean trustedChain, boolean verifiedAssertions) throws SSLException { } }); // Uses try-with-resources to ensure connection is cleaned up after completion. try (Connection connection = new Connection("https://server-address/view-vlsi/sdk", httpConfig)) { connection.login(username, password, domain); // Do work } ``` ``` -------------------------------- ### Connecting to the API Source: https://github.com/euc-dev/horizon-apis/blob/main/docs/view/index.md Demonstrates how to establish a connection to the Omnissa View API using the provided client library. Includes examples for basic connection and connection with certificate override. ```APIDOC ## Connecting to the API The URL of the API is **https://_server-address_/view-vlsi/sdk** ### Client library The client library provides a **Connection** class to easily connect to the API. This class will be needed to use much of the client library code. ```c# // Uses try-with-resources to ensure connection is cleaned up after completion. try (Connection connection = new Connection("https://_server-address_ /view-vlsi/sdk")) { connection.login(username, password, domain); // Do work } ``` If a certificate override is needed this can be accomplished using the **HttpConfiguration** settings. ```c# HttpConfiguration httpConfig = HttpConfiguration.Factory.newInstance(); httpConfig.setThumbprintVerifier(new ThumbprintVerifier() { public Result verify(String thumbprint) { if (acceptedThumbprint == null) { return Result.UNKNOWN; } else if (acceptedThumbprint.equals(thumbprint)) { return Result.MATCH; } else { return Result.MISMATCH; } } public void onSuccess(X509Certificate[] chain, String thumbprint, Result verifyResult, boolean trustedChain, boolean verifiedAssertions) throws SSLException { } }); // Uses try-with-resources to ensure connection is cleaned up after completion. try (Connection connection = new Connection("https://server-address/view-vlsi/sdk", httpConfig)) { connection.login(username, password, domain); // Do work } ``` !!! Note The maximum supported size of any array input to the API is 1000 data objects. ``` -------------------------------- ### UAG Gateways Response Example Source: https://context7.com/euc-dev/horizon-apis/llms.txt Example JSON response for UAG gateways, showing a list of gateway objects. ```json # Response: # { # "content": [ # { # "id": "gateway-uuid-1", # "name": "UAG-External-01", # "status": "READY", # "externalUrl": "https://uag.company.com" # } # ] # } ``` -------------------------------- ### Get Desktop Pool by ID Source: https://context7.com/euc-dev/horizon-apis/llms.txt Retrieves detailed information for a specific desktop pool template using its ID. Use 'expanded=all' for full configuration details. ```bash # Get single template by ID with full expansion curl --request GET 'https://cloud-sg.horizon.omnissa.com/admin/v2/templates/template-uuid-1234?expanded=all' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' # Response includes full template configuration: # { # "id": "template-uuid-1234", # "name": "Windows-10-Pool", # "status": "READY", # "providerInstanceId": "provider-uuid", # "imageVersionId": "image-version-uuid", # "vmSkuId": "Standard_D4s_v3", # "networkSettings": { # "subnetIds": ["subnet-uuid-1"] # }, # "powerPolicy": { # "spareVmCount": 5, # "minVmCount": 10, # "maxVmCount": 100 # } # } ``` -------------------------------- ### Create, Get, and Update Desktop Pools Source: https://context7.com/euc-dev/horizon-apis/llms.txt Use this code to retrieve, create, and update desktop pools. Ensure the connection object is properly initialized. ```csharp // Get all desktop pools Desktop desktop = connection.get(Desktop.class); List pools = desktop.getSummaryViews(); // Get specific desktop pool DesktopId desktopId = new DesktopId("pool-id-string"); DesktopInfo poolInfo = desktop.get(desktopId); // Create instant clone desktop pool DesktopSpec spec = new DesktopSpec(); spec.setName("IC-Windows10"); spec.setType(DesktopType.AUTOMATED); spec.setSource(DesktopSource.INSTANT_CLONE); DesktopAutomatedDesktopSpec automatedSpec = new DesktopAutomatedDesktopSpec(); automatedSpec.setVirtualCenterId(vcId); automatedSpec.setProvisioningType(ProvisioningType.INSTANT_CLONE); automatedSpec.setNamingMethod(NamingMethod.PATTERN); automatedSpec.setNamingPattern("IC-Win10-{n:fixed=3}"); automatedSpec.setMinimumCount(5); automatedSpec.setMaximumCount(100); spec.setAutomatedDesktopSpec(automatedSpec); desktop.create(spec); // Update desktop pool settings MapEntry enabledUpdate = new MapEntry(); enabledUpdate.key = "desktopSettings.enabled"; enabledUpdate.value = true; desktop.update(desktopId, new MapEntry[] { enabledUpdate }); ``` -------------------------------- ### Authentication Header Example Source: https://github.com/euc-dev/horizon-apis/blob/main/docs/horizon-cloud-nextgen/index.md This is the format for the Authentication header required for API calls, using the obtained access token. ```json Authentication : Bearer {access-token-value} ``` -------------------------------- ### GET /admin/v2/templates/{id} Source: https://context7.com/euc-dev/horizon-apis/llms.txt Retrieves detailed information about a specific desktop pool template by its ID. ```APIDOC ## GET /admin/v2/templates/{id} Retrieves detailed information about a specific desktop pool template. ### Method GET ### Endpoint `/admin/v2/templates/{id}` ### Path Parameters - **id** (string) - Required - The unique identifier of the desktop pool template. ### Query Parameters - **expanded** (string) - Optional - Controls the expansion of child data (e.g., 'all'). ### Request Example (Bash) ```bash # Get single template by ID with full expansion curl --request GET 'https://cloud-sg.horizon.omnissa.com/admin/v2/templates/template-uuid-1234?expanded=all' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the template. - **name** (string) - The name of the template. - **status** (string) - The current status of the template. - **providerInstanceId** (string) - The ID of the provider instance. - **imageVersionId** (string) - The ID of the image version. - **vmSkuId** (string) - The SKU ID for the virtual machines. - **networkSettings** (object) - Network configuration details. - **subnetIds** (array) - An array of subnet IDs. - **powerPolicy** (object) - Power management settings. - **spareVmCount** (integer) - The number of spare VMs. - **minVmCount** (integer) - The minimum number of VMs. - **maxVmCount** (integer) - The maximum number of VMs. #### Response Example ```json { "id": "template-uuid-1234", "name": "Windows-10-Pool", "status": "READY", "providerInstanceId": "provider-uuid", "imageVersionId": "image-version-uuid", "vmSkuId": "Standard_D4s_v3", "networkSettings": { "subnetIds": ["subnet-uuid-1"] }, "powerPolicy": { "spareVmCount": 5, "minVmCount": 10, "maxVmCount": 100 } } ``` ``` -------------------------------- ### Get All Activities with Date Filtering Source: https://context7.com/euc-dev/horizon-apis/llms.txt Retrieve system and audit activities within a specified date range. Supports pagination and language preference. ```bash # Get all activities with date filtering curl --request GET 'https://cloud-sg.horizon.omnissa.com/activity-manager/v1/activities?start_date=2024-01-01T00:00:00Z&end_date=2024-01-31T23:59:59Z&page=0&size=50' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Accept-Language: en-US' ``` -------------------------------- ### GET /admin/v2/templates Source: https://context7.com/euc-dev/horizon-apis/llms.txt Retrieves all desktop pool templates with filtering, pagination, and optional child data expansion. ```APIDOC ## GET /admin/v2/templates Retrieves all desktop pool templates with filtering, pagination, and optional child data expansion. ### Method GET ### Endpoint `/admin/v2/templates` ### Query Parameters - **page** (integer) - Optional - The page number to retrieve. - **size** (integer) - Optional - The number of items per page. - **expanded** (string) - Optional - Controls the expansion of child data (e.g., 'limited', 'all'). - **template_search** (string) - Optional - Search criteria for filtering templates. ### Request Example (Bash) ```bash # Get all templates with pagination curl --request GET 'https://cloud-sg.horizon.omnissa.com/admin/v2/templates?page=0&size=10&expanded=limited' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' # Filter templates by search criteria curl --request GET 'https://cloud-sg.horizon.omnissa.com/admin/v2/templates?template_search=name%20%24eq%20Windows-10-Pool' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` ### Response #### Success Response (200) - **content** (array) - An array of desktop pool template objects. - **totalElements** (integer) - The total number of elements available. - **totalPages** (integer) - The total number of pages. - **size** (integer) - The number of items per page. - **number** (integer) - The current page number. #### Response Example ```json { "content": [ { "id": "template-uuid-1234", "name": "Windows-10-Pool", "description": "Windows 10 Enterprise Desktop Pool", "status": "READY", "providerInstanceId": "provider-uuid", "imageId": "image-uuid", "poolType": "MULTI_USER", "vmCount": 50, "createdAt": "2024-01-15T10:30:00Z" } ], "totalElements": 25, "totalPages": 3, "size": 10, "number": 0 } ``` ``` -------------------------------- ### Curl Example for Obtaining Access Token with API Token Source: https://github.com/euc-dev/horizon-apis/blob/main/docs/horizon-cloud-nextgen/index.md This curl command demonstrates how to obtain an access token using an API token. Ensure you replace `{csp-host}` and `{api-token-from-CSP}` with your actual values. ```sh curl --request POST '{csp-host}/csp/gateway/am/api/auth/api-tokens/authorize' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'refresh_token={api-token-from-CSP}' ``` -------------------------------- ### Create Active Directory Configuration Source: https://context7.com/euc-dev/horizon-apis/llms.txt Create a new Active Directory configuration. Requires domain name, credentials, and OU details. ```bash # Create AD configuration curl --request POST 'https://cloud-sg.horizon.omnissa.com/admin/v2/active-directories' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "name": "Corp-AD", "domainName": "corp.company.com", "username": "svc_horizon@corp.company.com", "password": "SecurePassword123", "defaultOu": "OU=VDI,OU=Computers,DC=corp,DC=company,DC=com" }' ``` -------------------------------- ### Connect to View API (Java/C#) Source: https://context7.com/euc-dev/horizon-apis/llms.txt Establishes a connection to the Horizon View API and retrieves desktop pool information. Requires username, password, and domain for login. ```csharp // Java/C# - Connect to View API try (Connection connection = new Connection("https://horizon-server.company.com/view-vlsi/sdk")) { connection.login(username, password, domain); // Get desktop pools Desktop desktop = connection.get(Desktop.class); List desktops = desktop.getSummaryViews(); for (DesktopSummaryView d : desktops) { System.out.println("Pool: " + d.getName() + " Status: " + d.getStatus()); } } ``` -------------------------------- ### Get UAG Gateways Source: https://context7.com/euc-dev/horizon-apis/llms.txt Fetch the gateways associated with a specific UAG deployment using its ID. ```bash # Get UAG gateways curl --request GET 'https://cloud-sg.horizon.omnissa.com/admin/v2/uag-deployments/uag-uuid-1234/gateways' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### List Desktop Pools with Pagination Source: https://context7.com/euc-dev/horizon-apis/llms.txt Retrieves all desktop pool templates with pagination. Use the 'expanded=limited' parameter for concise results. ```bash # Get all templates with pagination curl --request GET 'https://cloud-sg.horizon.omnissa.com/admin/v2/templates?page=0&size=10&expanded=limited' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' # Response: # { # "content": [ # { # "id": "template-uuid-1234", # "name": "Windows-10-Pool", # "description": "Windows 10 Enterprise Desktop Pool", # "status": "READY", # "providerInstanceId": "provider-uuid", # "imageId": "image-uuid", # "poolType": "MULTI_USER", # "vmCount": 50, # "createdAt": "2024-01-15T10:30:00Z" # } # ], # "totalElements": 25, # "totalPages": 3, # "size": 10, # "number": 0 # } # Filter templates by search criteria curl --request GET 'https://cloud-sg.horizon.omnissa.com/admin/v2/templates?template_search=name%20%24eq%20Windows-10-Pool' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### Policies API Source: https://github.com/euc-dev/horizon-apis/blob/main/docs/view/versions/2512/index-methods.md Endpoints for managing user policies, including clearing, getting, listing, and updating policies. ```APIDOC ## POST /euc-dev/horizon-apis/policies/clear ### Description Clears all user policies. ### Method POST ### Endpoint /euc-dev/horizon-apis/policies/clear ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) Confirmation of policy clearing. #### Response Example None ``` ```APIDOC ## GET /euc-dev/horizon-apis/policies/get ### Description Retrieves a specific user policy. ### Method GET ### Endpoint /euc-dev/horizon-apis/policies/get ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) Details of the user policy. #### Response Example None ``` ```APIDOC ## GET /euc-dev/horizon-apis/policies/list ### Description Lists all user policies. ### Method GET ### Endpoint /euc-dev/horizon-apis/policies/list ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) List of user policies. #### Response Example None ``` ```APIDOC ## GET /euc-dev/horizon-apis/policies/listUnentitledPolicies ### Description Lists all policies that are not entitled to the user. ### Method GET ### Endpoint /euc-dev/horizon-apis/policies/listUnentitledPolicies ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) List of unentitled policies. #### Response Example None ``` ```APIDOC ## POST /euc-dev/horizon-apis/policies/set ### Description Sets a user policy. ### Method POST ### Endpoint /euc-dev/horizon-apis/policies/set ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) Confirmation of policy setting. #### Response Example None ``` ```APIDOC ## PUT /euc-dev/horizon-apis/policies/update ### Description Updates a user policy. ### Method PUT ### Endpoint /euc-dev/horizon-apis/policies/update ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) Confirmation of policy update. #### Response Example None ``` -------------------------------- ### Get Specific Activity by ID Source: https://context7.com/euc-dev/horizon-apis/llms.txt Retrieve a single system or audit activity using its unique identifier. ```bash # Get specific activity by ID curl --request GET 'https://cloud-sg.horizon.omnissa.com/activity-manager/v1/activities/activity-uuid-1234' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### Get Active Directory Organizational Units Source: https://context7.com/euc-dev/horizon-apis/llms.txt Retrieve the organizational units for a specific Active Directory configuration. ```bash # Get organizational units curl --request GET 'https://cloud-sg.horizon.omnissa.com/admin/v2/active-directories/ad-uuid-1234/org-units' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### Desktop APIs Source: https://github.com/euc-dev/horizon-apis/blob/main/docs/view/versions/2512/index-methods.md APIs for managing desktops, including adding machines and applying images. ```APIDOC ## POST /api/desktops/{desktopId}/machines/batch ### Description Adds multiple machines to a manual desktop pool. ### Method POST ### Endpoint /api/desktops/{desktopId}/machines/batch ### Parameters #### Path Parameters - **desktopId** (string) - Required - The ID of the manual desktop pool. #### Request Body - **machineIds** (array of strings) - Required - A list of machine IDs to add. ### Request Example ```json { "machineIds": ["machine-001", "machine-002"] } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message. #### Response Example ```json { "message": "Machines added to desktop pool successfully." } ``` ``` ```APIDOC ## POST /api/desktops/{desktopId}/machines/specifiedNaming/batch ### Description Adds multiple machines to a desktop pool using specified naming conventions. ### Method POST ### Endpoint /api/desktops/{desktopId}/machines/specifiedNaming/batch ### Parameters #### Path Parameters - **desktopId** (string) - Required - The ID of the desktop pool. #### Request Body - **machineNames** (array of strings) - Required - A list of machine names to create. - **namingPattern** (string) - Optional - The naming pattern to use. ### Request Example ```json { "machineNames": ["desktop-01", "desktop-02"], "namingPattern": "DESKTOP-####" } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message. #### Response Example ```json { "message": "Machines added to desktop pool with specified naming." } ``` ``` ```APIDOC ## POST /api/desktops/{desktopId}/machines ### Description Adds a single machine to a manual desktop pool. ### Method POST ### Endpoint /api/desktops/{desktopId}/machines ### Parameters #### Path Parameters - **desktopId** (string) - Required - The ID of the manual desktop pool. #### Request Body - **machineId** (string) - Required - The ID of the machine to add. ### Request Example ```json { "machineId": "machine-003" } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message. #### Response Example ```json { "message": "Machine added to desktop pool successfully." } ``` ``` ```APIDOC ## POST /api/desktops/{desktopId}/machines/specifiedNaming ### Description Adds a single machine to a desktop pool using specified naming conventions. ### Method POST ### Endpoint /api/desktops/{desktopId}/machines/specifiedNaming ### Parameters #### Path Parameters - **desktopId** (string) - Required - The ID of the desktop pool. #### Request Body - **machineName** (string) - Required - The name of the machine to create. - **namingPattern** (string) - Optional - The naming pattern to use. ### Request Example ```json { "machineName": "desktop-03", "namingPattern": "DESKTOP-####" } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message. #### Response Example ```json { "message": "Machine added to desktop pool with specified naming." } ``` ``` ```APIDOC ## POST /api/desktops/{desktopId}/image ### Description Applies a specified image to a desktop. ### Method POST ### Endpoint /api/desktops/{desktopId}/image ### Parameters #### Path Parameters - **desktopId** (string) - Required - The ID of the desktop. #### Request Body - **imageId** (string) - Required - The ID of the image to apply. ### Request Example ```json { "imageId": "img-abc" } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the image application process has started. #### Response Example ```json { "message": "Image application initiated for desktop." } ``` ``` -------------------------------- ### Get Specific Edge Deployment Source: https://context7.com/euc-dev/horizon-apis/llms.txt Retrieve details for a specific edge deployment using its unique ID. ```bash # Get specific edge deployment curl --request GET 'https://cloud-sg.horizon.omnissa.com/admin/v2/edge-deployments/edge-uuid-1234' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### List Desktops by Name (Descending) Source: https://github.com/euc-dev/horizon-apis/blob/main/docs/view/versions/2512/queries-landing.md Use QueryDefinition to specify the entity type and sort order for listing desktops by name in descending order. ```java QueryDefinition defn = new QueryDefinition(); defn.setQueryEntityType(new TypeNameImpl("DesktopSummaryView")); defn.setSortBy("desktopSummaryData.name"); defn.setSortDescending(true); QueryResults queryResults = queryService.create(defn); // Handle results ``` ```java QueryControls controls = new QueryControls(); controls.setSortBy(DesktopSummaryViewCName.DESKTOP_SUMMARY_VIEW_CNAME.desktopSummaryData.name); controls.setSortDescending(true); try (Query query = new Query<>(connection, DesktopSummaryView.class, null, controls)) { // Handle results } ``` -------------------------------- ### List Active Directory Configurations Source: https://context7.com/euc-dev/horizon-apis/llms.txt Retrieve a list of configured Active Directory settings. Pagination is supported. ```bash # List Active Directory configurations curl --request GET 'https://cloud-sg.horizon.omnissa.com/admin/v2/active-directories?page=0&size=10' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### ConnectionServer APIs Source: https://github.com/euc-dev/horizon-apis/blob/main/docs/view/versions/2512/index-methods.md APIs for managing Connection Servers, including getting tags, listing servers, and updating their configurations. ```APIDOC ## GET /api/connectionServer/{id}/tags ### Description Retrieves tags associated with a specific Connection Server. ### Method GET ### Endpoint /api/connectionServer/{id}/tags ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the Connection Server. ### Response #### Success Response (200) - **tags** (array of strings) - A list of tags associated with the Connection Server. #### Response Example ```json { "tags": ["tag1", "tag2"] } ``` ``` ```APIDOC ## GET /api/connectionServers ### Description Lists all available Connection Servers. ### Method GET ### Endpoint /api/connectionServers ### Response #### Success Response (200) - **servers** (array of objects) - A list of Connection Server objects. - **id** (string) - The unique identifier of the Connection Server. - **name** (string) - The name of the Connection Server. #### Response Example ```json { "servers": [ {"id": "cs-123", "name": "ConnectionServer1"}, {"id": "cs-456", "name": "ConnectionServer2"} ] } ``` ``` ```APIDOC ## PUT /api/connectionServer/{id} ### Description Updates the configuration of a specific Connection Server. ### Method PUT ### Endpoint /api/connectionServer/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the Connection Server to update. #### Request Body - **configuration** (object) - Required - The new configuration settings for the Connection Server. ### Request Example ```json { "configuration": { "setting1": "value1", "setting2": "value2" } } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the update was successful. #### Response Example ```json { "message": "Connection server updated successfully." } ``` ``` -------------------------------- ### List Edge Deployments Source: https://context7.com/euc-dev/horizon-apis/llms.txt Use this endpoint to list existing edge deployments. Specify page and size for pagination. ```bash # List edge deployments curl --request GET 'https://cloud-sg.horizon.omnissa.com/admin/v2/edge-deployments?page=0&size=10' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### Get Service Instance Source: https://github.com/euc-dev/horizon-apis/blob/main/docs/view/versions/2512/mo-types-landing.md Retrieve an instance of a particular service using its class object when using the Connection class. ```java PersistentDisk persistentDisk = connection.get(PersistentDisk.class); ``` -------------------------------- ### List Provider Instances Source: https://context7.com/euc-dev/horizon-apis/llms.txt Retrieves configured cloud provider instances such as Azure, AWS, or vSphere. Supports pagination. ```bash # List all provider instances curl --request GET 'https://cloud-sg.horizon.omnissa.com/admin/v3/providers/instances?page=0&size=10' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' ``` ```bash # List supported providers curl --request GET 'https://cloud-sg.horizon.omnissa.com/admin/v1/providers' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### Horizon DaaS API Introduction Source: https://github.com/euc-dev/horizon-apis/blob/main/docs/horizon-daas/index.md Provides an introduction to the Horizon DaaS REST API. ```APIDOC ## Introduction to the Horizon DaaS REST API ### Description This document provides a comprehensive introduction to the Horizon DaaS REST API, covering its features, capabilities, and usage guidelines. ### File [Introduction to the Horizon DaaS REST API](horizondaas-api.pdf) ### Size 410KB ``` -------------------------------- ### Connect to Omnissa View API Source: https://github.com/euc-dev/horizon-apis/blob/main/docs/view/index.md Establishes a connection to the API using the Connection class. Ensure the connection is cleaned up after use with try-with-resources. ```csharp // Uses try-with-resources to ensure connection is cleaned up after completion. try (Connection connection = new Connection("https://_server-address_ /view-vlsi/sdk")) { connection.login(username, password, domain); // Do work } ``` -------------------------------- ### Connect to Omnissa View API Source: https://github.com/euc-dev/horizon-apis/blob/main/docs/view/versions/2512/index.md Establishes a connection to the API using the client library's Connection class. Ensure the connection is cleaned up after use with try-with-resources. ```csharp // Uses try-with-resources to ensure connection is cleaned up after completion. try (Connection connection = new Connection("https://_server-address_ /view-vlsi/sdk")) { connection.login(username, password, domain); // Do work } ``` -------------------------------- ### Count Persistent Disks by Name Prefix Source: https://github.com/euc-dev/horizon-apis/blob/main/docs/view/versions/2512/queries-landing.md Count persistent disks whose names start with a specific prefix. Use QueryDefinition with a StartsWith filter for server-side filtering. ```java QueryDefinition defn = new QueryDefinition(); defn.setQueryEntityType(new TypeNameImpl("PersistentDiskInfo")); defn.setFilter(new StartsWith("general.name", "a")); int count = queryService.getCount(defn); ``` ```java QueryFilter filter = QueryFilter.startsWith(PersistentDiskInfoCName.PERSISTENT_DISK_INFO_CNAME.general.name, "a"); int count = Query.count(connection, PersistentDiskInfo.class, filter); ``` -------------------------------- ### Accessing Property Names with CName Source: https://github.com/euc-dev/horizon-apis/blob/main/docs/view/versions/2512/do-types-landing.md Use CName classes to get compile-time verification for property names and type checking. The cname() method provides the dotted path string for a property. ```Java RDSServerInfoCName INFO_CNAME = RDSServerInfoCName.RDS_SERVER_INFO_CNAME; CName ENABLED_CNAME = INFO_CNAME.settings.enabled; String ENABLED_PROPERTY_NAME = ENABLED_CNAME.cname(); // provides "settings.enabled" ``` -------------------------------- ### Retrieve Helpdesk Session Information and Diagnostics Source: https://context7.com/euc-dev/horizon-apis/llms.txt Fetches session details, performance data, and VM information for troubleshooting user sessions using cURL commands. ```bash # Get helpdesk session information curl --request GET 'https://cloud-sg.horizon.omnissa.com/helpdesk/v1/sessions/session-uuid-1234' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' # Get session performance data curl --request GET 'https://cloud-sg.horizon.omnissa.com/helpdesk/v1/sessions/session-uuid-1234/performance' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' # Get VM details for helpdesk curl --request GET 'https://cloud-sg.horizon.omnissa.com/helpdesk/v1/vms/vm-uuid-1234' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### List Provider Instances Source: https://context7.com/euc-dev/horizon-apis/llms.txt Retrieves configured cloud provider instances (e.g., Azure, AWS, vSphere) and lists supported providers. ```APIDOC ## GET /admin/v3/providers/instances ### Description Retrieves a paginated list of configured cloud provider instances. ### Method GET ### Endpoint `/admin/v3/providers/instances` ### Query Parameters - **page** (integer) - Optional - The page number to retrieve (default: 0). - **size** (integer) - Optional - The number of items per page (default: 10). ### Request Example ```bash curl --request GET 'https://cloud-sg.horizon.omnissa.com/admin/v3/providers/instances?page=0&size=10' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' ``` ### Response #### Success Response (200) - **content** (array) - List of provider instances. - **id** (string) - The unique identifier of the provider instance. - **name** (string) - The name of the provider instance. - **providerLabel** (string) - The label indicating the cloud provider type (e.g., "AZURE"). - **status** (string) - The status of the provider instance. - **region** (string) - The region configured for the provider instance. - **subscriptionId** (string) - The subscription ID (if applicable, e.g., for Azure). #### Response Example ```json { "content": [ { "id": "provider-uuid-1234", "name": "Azure-East-US", "providerLabel": "AZURE", "status": "READY", "region": "eastus", "subscriptionId": "azure-subscription-id" } ] } ``` ## GET /admin/v1/providers ### Description Retrieves a list of supported cloud providers. ### Method GET ### Endpoint `/admin/v1/providers` ### Request Example ```bash curl --request GET 'https://cloud-sg.horizon.omnissa.com/admin/v1/providers' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` ``` -------------------------------- ### Manage User Entitlements for Desktops and Applications Source: https://context7.com/euc-dev/horizon-apis/llms.txt Handles user and group entitlements to desktop pools and applications, including creation, deletion, and retrieval of entitled users. ```csharp // Get entitlement service UserEntitlement entitlement = connection.get(UserEntitlement.class); // Create entitlement UserEntitlementSpec spec = new UserEntitlementSpec(); spec.setUserOrGroupId(userId); spec.setResourceId(desktopId); entitlement.create(spec); // Create multiple entitlements UserEntitlementSpec[] specs = new UserEntitlementSpec[2]; specs[0] = new UserEntitlementSpec(); specs[0].setUserOrGroupId(userId1); specs[0].setResourceId(desktopId); specs[1] = new UserEntitlementSpec(); specs[1].setUserOrGroupId(groupId1); specs[1].setResourceId(desktopId); entitlement.createUserEntitlements(specs); // Delete entitlement UserEntitlementId entitlementId = new UserEntitlementId("entitlement-id"); entitlement.delete(entitlementId); // Get entitled users EntitledUserOrGroup entitledUsers = connection.get(EntitledUserOrGroup.class); List users = entitledUsers.getLocalSummaryViews(desktopId); ``` -------------------------------- ### Azure Infrastructure - List VM SKUs Source: https://context7.com/euc-dev/horizon-apis/llms.txt Retrieves available Azure VM SKUs with their compute preferences for a given provider instance. Useful for selecting appropriate VM sizes for deployments. ```bash # Get Azure VM SKUs with preferences curl --request GET 'https://cloud-sg.horizon.omnissa.com/admin/v2/providers/azure/instances/provider-uuid-1234/compute-vm-skus?page=0&size=50' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' ```