github.com/quite/nomad@v0.8.6/website/source/api/evaluations.html.md (about) 1 --- 2 layout: api 3 page_title: Evaluations - HTTP API 4 sidebar_current: api-evaluations 5 description: |- 6 The /evaluation are used to query for and interact with evaluations. 7 --- 8 9 # Evaluations HTTP API 10 11 The `/evaluation` endpoints are used to query for and interact with evaluations. 12 13 ## List Evaluations 14 15 This endpoint lists all evaluations. 16 17 | Method | Path | Produces | 18 | ------ | ------------------------ | -------------------------- | 19 | `GET` | `/v1/evaluations` | `application/json` | 20 21 The table below shows this endpoint's support for 22 [blocking queries](/api/index.html#blocking-queries) and 23 [required ACLs](/api/index.html#acls). 24 25 | Blocking Queries | ACL Required | 26 | ---------------- | -------------------- | 27 | `YES` | `namespace:read-job` | 28 29 ### Parameters 30 31 - `prefix` `(string: "")`- Specifies a string to filter evaluations on based on 32 an index prefix. This is specified as a querystring parameter. 33 34 ### Sample Request 35 36 ```text 37 $ curl \ 38 https://localhost:4646/v1/evaluations 39 ``` 40 41 ```text 42 $ curl \ 43 https://localhost:4646/v1/evaluations?prefix=25ba81c 44 ``` 45 46 ### Sample Response 47 48 ```json 49 [ 50 { 51 "ID": "5456bd7a-9fc0-c0dd-6131-cbee77f57577", 52 "Priority": 50, 53 "Type": "service", 54 "TriggeredBy": "job-register", 55 "JobID": "example", 56 "JobModifyIndex": 52, 57 "NodeID": "", 58 "NodeModifyIndex": 0, 59 "Status": "complete", 60 "StatusDescription": "", 61 "Wait": 0, 62 "NextEval": "", 63 "PreviousEval": "", 64 "BlockedEval": "", 65 "FailedTGAllocs": null, 66 "ClassEligibility": null, 67 "EscapedComputedClass": false, 68 "AnnotatePlan": false, 69 "SnapshotIndex": 53, 70 "QueuedAllocations": { 71 "cache": 0 72 }, 73 "CreateIndex": 53, 74 "ModifyIndex": 55 75 } 76 ] 77 ``` 78 79 ## Read Evaluation 80 81 This endpoint reads information about a specific evaluation by ID. 82 83 | Method | Path | Produces | 84 | ------ | ------------------------- | -------------------------- | 85 | `GET` | `/v1/evaluation/:eval_id` | `application/json` | 86 87 The table below shows this endpoint's support for 88 [blocking queries](/api/index.html#blocking-queries) and 89 [required ACLs](/api/index.html#acls). 90 91 | Blocking Queries | ACL Required | 92 | ---------------- | -------------------- | 93 | `YES` | `namespace:read-job` | 94 95 ### Parameters 96 97 - `:eval_id` `(string: <required>)`- Specifies the UUID of the evaluation. This 98 must be the full UUID, not the short 8-character one. This is specified as 99 part of the path. 100 101 ### Sample Request 102 103 ```text 104 $ curl \ 105 https://localhost:4646/v1/evaluation/5456bd7a-9fc0-c0dd-6131-cbee77f57577 106 ``` 107 108 ### Sample Response 109 110 ```json 111 { 112 "ID": "5456bd7a-9fc0-c0dd-6131-cbee77f57577", 113 "Priority": 50, 114 "Type": "service", 115 "TriggeredBy": "job-register", 116 "JobID": "example", 117 "JobModifyIndex": 52, 118 "NodeID": "", 119 "NodeModifyIndex": 0, 120 "Status": "complete", 121 "StatusDescription": "", 122 "Wait": 0, 123 "NextEval": "", 124 "PreviousEval": "", 125 "BlockedEval": "", 126 "FailedTGAllocs": null, 127 "ClassEligibility": null, 128 "EscapedComputedClass": false, 129 "AnnotatePlan": false, 130 "SnapshotIndex": 53, 131 "QueuedAllocations": { 132 "cache": 0 133 }, 134 "CreateIndex": 53, 135 "ModifyIndex": 55 136 } 137 ``` 138 139 ## List Allocations for Evaluation 140 141 This endpoint lists the allocations created or modified for the given 142 evaluation. 143 144 | Method | Path | Produces | 145 | ------ | ------------------------------------- | -------------------------- | 146 | `GET` | `/v1/evaluation/:eval_id/allocations` | `application/json` | 147 148 The table below shows this endpoint's support for 149 [blocking queries](/api/index.html#blocking-queries) and 150 [required ACLs](/api/index.html#acls). 151 152 | Blocking Queries | ACL Required | 153 | ---------------- | -------------------- | 154 | `YES` | `namespace:read-job` | 155 156 ### Parameters 157 158 - `:eval_id` `(string: <required>)`- Specifies the UUID of the evaluation. This 159 must be the full UUID, not the short 8-character one. This is specified as 160 part of the path. 161 162 ### Sample Request 163 164 ```text 165 $ curl \ 166 https://localhost:4646/v1/evaluation/5456bd7a-9fc0-c0dd-6131-cbee77f57577/allocations 167 ``` 168 169 ### Sample Response 170 171 ```json 172 [ 173 { 174 "ID": "a8198d79-cfdb-6593-a999-1e9adabcba2e", 175 "EvalID": "5456bd7a-9fc0-c0dd-6131-cbee77f57577", 176 "Name": "example.cache[0]", 177 "NodeID": "fb2170a8-257d-3c64-b14d-bc06cc94e34c", 178 "JobID": "example", 179 "TaskGroup": "cache", 180 "DesiredStatus": "run", 181 "DesiredDescription": "", 182 "ClientStatus": "running", 183 "ClientDescription": "", 184 "TaskStates": { 185 "redis": { 186 "State": "running", 187 "Failed": false, 188 "Events": [ 189 { 190 "Type": "Received", 191 "Time": 1495747371795703800, 192 "FailsTask": false, 193 "RestartReason": "", 194 "SetupError": "", 195 "DriverError": "", 196 "ExitCode": 0, 197 "Signal": 0, 198 "Message": "", 199 "KillTimeout": 0, 200 "KillError": "", 201 "KillReason": "", 202 "StartDelay": 0, 203 "DownloadError": "", 204 "ValidationError": "", 205 "DiskLimit": 0, 206 "FailedSibling": "", 207 "VaultError": "", 208 "TaskSignalReason": "", 209 "TaskSignal": "", 210 "DriverMessage": "" 211 }, 212 { 213 "Type": "Driver", 214 "Time": 1495747371798867200, 215 "FailsTask": false, 216 "RestartReason": "", 217 "SetupError": "", 218 "DriverError": "", 219 "ExitCode": 0, 220 "Signal": 0, 221 "Message": "", 222 "KillTimeout": 0, 223 "KillError": "", 224 "KillReason": "", 225 "StartDelay": 0, 226 "DownloadError": "", 227 "ValidationError": "", 228 "DiskLimit": 0, 229 "FailedSibling": "", 230 "VaultError": "", 231 "TaskSignalReason": "", 232 "TaskSignal": "", 233 "DriverMessage": "Downloading image redis:3.2" 234 }, 235 { 236 "Type": "Started", 237 "Time": 1495747379525667800, 238 "FailsTask": false, 239 "RestartReason": "", 240 "SetupError": "", 241 "DriverError": "", 242 "ExitCode": 0, 243 "Signal": 0, 244 "Message": "", 245 "KillTimeout": 0, 246 "KillError": "", 247 "KillReason": "", 248 "StartDelay": 0, 249 "DownloadError": "", 250 "ValidationError": "", 251 "DiskLimit": 0, 252 "FailedSibling": "", 253 "VaultError": "", 254 "TaskSignalReason": "", 255 "TaskSignal": "", 256 "DriverMessage": "" 257 } 258 ] 259 } 260 }, 261 "CreateIndex": 54, 262 "ModifyIndex": 57, 263 "CreateTime": 1495747371794276400 264 } 265 ] 266 ```