github.com/kardianos/nomad@v0.1.3-0.20151022182107-b13df73ee850/website/source/docs/http/alloc.html.md (about) 1 --- 2 layout: "http" 3 page_title: "HTTP API: /v1/allocation" 4 sidebar_current: "docs-http-alloc-" 5 description: |- 6 The '/1/allocation' endpoint is used to query a specific allocation. 7 --- 8 9 # /v1/allocation 10 11 The `allocation` endpoint is used to query the a specific allocation. 12 By default, the agent's local region is used; another region can 13 be specified using the `?region=` query parameter. 14 15 ## GET 16 17 <dl> 18 <dt>Description</dt> 19 <dd> 20 Query a specific allocation. 21 </dd> 22 23 <dt>Method</dt> 24 <dd>GET</dd> 25 26 <dt>URL</dt> 27 <dd>`/v1/allocation/<ID>`</dd> 28 29 <dt>Parameters</dt> 30 <dd> 31 None 32 </dd> 33 34 <dt>Returns</dt> 35 <dd> 36 37 ```javascript 38 { 39 "ID": "3575ba9d-7a12-0c96-7b28-add168c67984", 40 "EvalID": "151accaa-1ac6-90fe-d427-313e70ccbb88", 41 "Name": "binstore-storagelocker.binsl[3]", 42 "NodeID": "", 43 "JobID": "binstore-storagelocker", 44 "Job": { 45 "Region": "global", 46 "ID": "binstore-storagelocker", 47 "Name": "binstore-storagelocker", 48 "Type": "service", 49 "Priority": 50, 50 "AllAtOnce": false, 51 "Datacenters": [ 52 "us2", 53 "eu1" 54 ], 55 "Constraints": [ 56 { 57 "Hard": false, 58 "LTarget": "kernel.os", 59 "RTarget": "windows", 60 "Operand": "=", 61 "Weight": 0 62 } 63 ], 64 "TaskGroups": [ 65 { 66 "Name": "binsl", 67 "Count": 5, 68 "Constraints": [ 69 { 70 "Hard": false, 71 "LTarget": "kernel.os", 72 "RTarget": "linux", 73 "Operand": "=", 74 "Weight": 0 75 } 76 ], 77 "Tasks": [ 78 { 79 "Name": "binstore", 80 "Driver": "docker", 81 "Config": { 82 "image": "hashicorp/binstore" 83 }, 84 "Constraints": null, 85 "Resources": { 86 "CPU": 500, 87 "MemoryMB": 0, 88 "DiskMB": 0, 89 "IOPS": 0, 90 "Networks": [ 91 { 92 "Device": "", 93 "CIDR": "", 94 "IP": "", 95 "MBits": 100, 96 "ReservedPorts": null, 97 "DynamicPorts": 0 98 } 99 ] 100 }, 101 "Meta": null 102 }, 103 { 104 "Name": "storagelocker", 105 "Driver": "java", 106 "Config": { 107 "image": "hashicorp/storagelocker" 108 }, 109 "Constraints": [ 110 { 111 "Hard": false, 112 "LTarget": "kernel.arch", 113 "RTarget": "amd64", 114 "Operand": "=", 115 "Weight": 0 116 } 117 ], 118 "Resources": { 119 "CPU": 500, 120 "MemoryMB": 0, 121 "DiskMB": 0, 122 "IOPS": 0, 123 "Networks": null 124 }, 125 "Meta": null 126 } 127 ], 128 "Meta": { 129 "elb_checks": "3", 130 "elb_interval": "10", 131 "elb_mode": "tcp" 132 } 133 } 134 ], 135 "Update": { 136 "Stagger": 0, 137 "MaxParallel": 0 138 }, 139 "Meta": { 140 "foo": "bar" 141 }, 142 "Status": "", 143 "StatusDescription": "", 144 "CreateIndex": 14, 145 "ModifyIndex": 14 146 }, 147 "TaskGroup": "binsl", 148 "Resources": { 149 "CPU": 1000, 150 "MemoryMB": 0, 151 "DiskMB": 0, 152 "IOPS": 0, 153 "Networks": [ 154 { 155 "Device": "", 156 "CIDR": "", 157 "IP": "", 158 "MBits": 100, 159 "ReservedPorts": null, 160 "DynamicPorts": 0 161 } 162 ] 163 }, 164 "TaskResources": null, 165 "Metrics": { 166 "NodesEvaluated": 0, 167 "NodesFiltered": 0, 168 "ClassFiltered": null, 169 "ConstraintFiltered": null, 170 "NodesExhausted": 0, 171 "ClassExhausted": null, 172 "DimensionExhausted": null, 173 "Scores": null, 174 "AllocationTime": 9408, 175 "CoalescedFailures": 4 176 }, 177 "DesiredStatus": "failed", 178 "DesiredDescription": "failed to find a node for placement", 179 "ClientStatus": "failed", 180 "ClientDescription": "", 181 "CreateIndex": 16, 182 "ModifyIndex": 16 183 } 184 ``` 185 186 </dd> 187 </dl> 188