-
Notifications
You must be signed in to change notification settings - Fork 0
Chaya's REST V2 Usage
The hosts resource defines a running machine instance in Evergreen.
Name | Type | Description |
---|---|---|
host_id | string | Unique identifier of a specific host |
distro | distro_info | Object containing information about the distro type of this host |
started_by | string | Name of the process or user that started this host |
host_type | string | The instance type requested for the provider, primarily used for ec2 dynamic hosts |
user | string | The user associated with this host. Set if this host was spawned for a specific user |
status | string | The current state of the host |
running_task | task_info | Object containing information about the task the host is currently running |
Name | Type | Description |
---|---|---|
distro_id | string | Unique Identifier of this distro. Can be used to fetch more informaiton about this distro |
provider | string | The service which provides this type of machine |
Name | Type | Description |
---|---|---|
task_id | string | Unique Identifier of this task. Can be used to fetch more informaiton about this task |
name | string | The name of this task |
dispatch_time | time | Time that this task was dispatched to this host |
version_id | string | Unique identifier for the version of the project that this task is run as part of |
build_id | string | Unique identifier for the build of the project that this task is run as part of |
GET /hosts
Returns a paginated list of all hosts in Evergreen
Name | Type | Description |
---|---|---|
start_at | string | Optional. The identifier of the host to start at in the pagination |
limit | int | Optional. The number of hosts to be returned per page of pagination. Defaults to 100 |
status | string | Optional. A status of host to limit the results to |
GET /users/<user_id>/hosts
Returns a list of hosts spawned by the given user.
Name | Type | Description |
---|---|---|
start_at | string | Optional. The identifier of the host to start at in the pagination |
limit | int | Optional. The number of hosts to be returned per page of pagination. Defaults to 100 |
status | string | Optional. A status of host to limit the results to |
GET /hosts/<host_id>
Fetches a single host using its ID
POST /hosts
Spawns a host. The host must be of a distro which is spawnable by users (see `Distro`_).
Name | Type | Description |
---|---|---|
distro |
string | `Distro`_ name to spawn |
keyname |
string | `Key`_ name to use |
POST /hosts/<host_id>/terminate
Immediately terminate a single host with given ID. Users may only terminate hosts which were created by them, unless the user is a super-user.
Hosts which have not been initialised yet will be marked as Terminated.
Trying to terminate a host which has already been terminated will result in an error.
All other host statuses will result in an attempt to terminate using the provider's API
A response code of 200 OK indicates that the host was successfully terminated
All other response codes indicate errors; the response body can be parsed as a rest.APIError
POST /hosts/<host_id>/change_password
Immediately changes the RDP password of a Windows host with a given ID. Users may only change passwords for hosts which were created by them, unless the user is a super-user.
A response code of 200 OK indicates that the host's password was successfully terminated
Attempting to set the RDP password of a host that is not a Windows host or host that is not running will result in an error.
All other response codes indicate errors; the response body can be parsed as a rest.APIError
Name | Type | Description |
---|---|---|
rdp_pwd | string | New RDP password; must meet RDP password criteria as provided by Microsoft at: https://technet.microsoft.com/en-us/library/cc786468(v=ws.10).aspx and be between 6 and 255 characters long |
POST /hosts/<host_id>/extend_expiration
Extend the expiration time of a host with a given ID. Users may only extend expirations for hosts which were created by them, unless the user is a super-user
The expiration date of a host may not be more than 1 week in the future.
A response code of 200 OK indicates that the host's expiration was successfully extended.
Attempt to extend the expiration time of a terminated host will result in an error
All other response codes indicate errors; the response body can be parsed as a rest.APIError
Name | Type | Description |
---|---|---|
add_hours | int | Number of hours to extend expiration; not to exceed 168 |