Overview
Hydra has a limited set of REST web API calls to manage session hosts, scripts, and images.
To enable this feature, create a new secret in the Key Vault deployed with Hydra (you have to give yourself access to the secrets of the Key Vault first).
|
Name |
Secret value |
|---|---|
|
Hydra-RESTAccess |
A complex (URL encoded) self-defined secret with at least 32 characters. Make this complex to secure access. |
If the secret doesn’t exist, is empty, or has fewer than 32 characters, Hydra will not accept REST calls.
After creating or changing the secret, a restart of Hydra (the app service) is necessary. Do this only if no imaging or deployment is currently running. You can restart Hydra by:
-
Clicking on the Avatar menu (upper-right corner).
-
Selecting Restart Engine.
Authorization
Hydra REST API uses the Authorization header for authentication.
|
Header |
Value |
|---|---|
|
Authorization |
"SharedKey " |
Available Endpoints
Create a new host
|
Endpoint |
Request body |
Response |
|---|---|---|
|
POST |
Can contain:
|
A GUID to query the state of the task. |
Delete a host with VM
|
Endpoint |
Request body |
Response |
|---|---|---|
|
GET |
- |
A GUID to query the state of the task. |
Change VM size and/or OS-disk size a host with VM
VM will be started and stopped.
|
Endpoint |
Request body |
Response |
|---|---|---|
|
POST |
Can contain (one or both settings):
|
A GUID to query the state of the task. |
Get assigned session hosts for a user
|
Endpoint |
Request body |
Response |
|---|---|---|
|
GET |
- |
A list of session hosts where the user is assigned. If HostPool-Guid is a GUID. Empty, all assigned hosts in all pools are returned. |
Get available scripts for a user
|
Endpoint |
Request body |
Response |
|---|---|---|
|
GET |
- |
A list of scripts. |
Get available script collections
|
Endpoint |
Request body |
Response |
|---|---|---|
|
GET |
- |
A list of script collections. |
Run a script or script collection on a host
|
Endpoint |
Request body |
Response |
|---|---|---|
|
POST |
Should contain the ID of the script or collection as text. |
A GUID to query the state of the task. |
Get the list of imaging definitions
|
Endpoint |
Request body |
Response |
|---|---|---|
|
GET |
- |
A list of ImagingDefinition. |
Save and run a imaging definition
|
Endpoint |
Request body |
Response |
|---|---|---|
|
POST |
<ImagingDefinition> |
A GUID to query the state of the task. |
Get the state of tasks
|
Endpoint |
Request body |
Response |
|---|---|---|
|
GET |
- |
|
Optional filtering
HTTP-Get commands to query VMs by user or to delete a host can have an additional filter in the header:
|
Filter |
Value |
Description |
|---|---|---|
|
"LimitToSubscriptions" |
"49f90bf9-ddf8-48b2-bf90-629f3dbef550,f7f733a1-92f8-4ff4-8e49-6ecd7c3533f3" |
Filters by subscriptions of the VMs/hosts. |
|
"LimitToPoolGroups" |
"engineering,sales" |
Filters by pool groups. |
|
"LimitToPoolType" |
"personal" |
Filters by host pool type: personal or pooled. |