forked from evergreen-ci/evergreen
-
Notifications
You must be signed in to change notification settings - Fork 0
Chaya's REST V2 Usage
Chaya Malik edited this page Nov 24, 2020
·
15 revisions
Task Annotations give users more context about task failures.
Name | Type | Description |
---|---|---|
task_id | string | Identifier of the task that this annotation is for |
task_execution | int | The number of the execution of the task that the annotation is for |
metadata | map[string]interface{} | Structured data about the task. Since this is user-given json data, the structure can differ between annotations |
note | note_object | Comment about the task failure |
issues | []issue_link | Links to tickets definitely related |
suspected_issues | []issue_link | Links to tickets possibly related |
Name | Type | Description |
---|---|---|
message | string | Comment about the task failure |
source | source_object | The source of the note |
Name | Type | Description |
---|---|---|
author | string | The author of the edit |
time | time | The time of the edit |
requester | string | The source of the request, either an api or a user |
Name | Type | Description |
---|---|---|
url | string | The url of the ticket |
issue_key | string | Text to be displayed |
source | source_object | The source of the edit |
GET /tasks/<task_id>/annotations
Returns the latest annotation for the given task
Name | Type | Description |
---|---|---|
fetch_all_executions | boolean | Optional. Fetches annotations for all executions of the task if they are available |
execution | int | Optional. The 0-based number corresponding to the execution of the task the annotation is associated with. Defaults to the latest execution. |
PUT tasks/{task_id}/annotation
Creates a task annotation, or updates an existing task annotation, overwriting the existing fields that contain a value. The annotation is created based on the annotation specified in the request body. Note that usage of this endpoint requires that the requesting user have security to modify task annotations. The user does not need to specify the source, it will be added automatically. Example request body:
{ "task_id": "my_task_id", "note": { "message": "this is a note about my_task_id's failure", "project_patches": 10 }, "issues" [ { "url": "https://link.com", "issue_key": "link-1234" }, ] }
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
GET /hosts/<host_id>
Fetches a single host using its ID