|
1 | 1 | # Print Jobs
|
2 | 2 |
|
3 |
| -## Get Print Jobs |
| 3 | +## Get print jobs |
4 | 4 |
|
5 | 5 | ```shell
|
6 | 6 | curl https://api.simplyprint.io/{id}/jobs/GetPaginatedPrintJobs \
|
@@ -148,3 +148,124 @@ Get paginated data about ongoing or finished print jobs.
|
148 | 148 | | `data[].queueItem.user` | integer | The user id of the user who created the queue item. |
|
149 | 149 | | `data[].queueItem.queueNum` | integer | The queue number of the queue item. |
|
150 | 150 | | `page_amount` | integer | The total number of pages for the given parameters. |
|
| 151 | + |
| 152 | +## Get details |
| 153 | + |
| 154 | +```shell |
| 155 | +curl https://api.simplyprint.io/{id}/jobs/GetDetails \ |
| 156 | + -H 'accept: application/json' \ |
| 157 | + -H 'X-API-KEY: {API_KEY}' \ |
| 158 | + -d '{ |
| 159 | + "id": "job_id" |
| 160 | + }' |
| 161 | +``` |
| 162 | + |
| 163 | +> Success response |
| 164 | +
|
| 165 | +```json |
| 166 | +{ |
| 167 | + "status": true, |
| 168 | + "message": null, |
| 169 | + "job": { |
| 170 | + "id": 123, |
| 171 | + "filament": [ |
| 172 | + ... |
| 173 | + ], |
| 174 | + "pauses": [ |
| 175 | + ... |
| 176 | + ], |
| 177 | + "currentTime": 1697040000, |
| 178 | + "pictures": [ |
| 179 | + ... |
| 180 | + ], |
| 181 | + "notificationsSent": [ |
| 182 | + ... |
| 183 | + ], |
| 184 | + "cost": 12.34, |
| 185 | + "customFields": { |
| 186 | + ... |
| 187 | + }, |
| 188 | + "ended": 3600, |
| 189 | + "failedReason": "string", |
| 190 | + "cancelInfo": { |
| 191 | + "reason": "string", |
| 192 | + "comment": "string", |
| 193 | + "by": "string", |
| 194 | + "byOther": 1 |
| 195 | + }, |
| 196 | + "analysis": { |
| 197 | + ... |
| 198 | + }, |
| 199 | + "notifications": { |
| 200 | + ... |
| 201 | + }, |
| 202 | + "outsideSystem": true, |
| 203 | + "rating": 5, |
| 204 | + "started": 7200, |
| 205 | + "created": 10800, |
| 206 | + "state": "string", |
| 207 | + "file": "filename.gcode", |
| 208 | + "percentage": 50, |
| 209 | + "time": 1800, |
| 210 | + "canPreview": true, |
| 211 | + "layer": 10, |
| 212 | + "ai": [ |
| 213 | + 0.1, |
| 214 | + 0.2, |
| 215 | + 0.3 |
| 216 | + ], |
| 217 | + "printer": { |
| 218 | + "id": 456, |
| 219 | + "name": "Printer Name", |
| 220 | + "extruders": 2, |
| 221 | + "image": "https://cdn.simplyprint.io/prints/images/printer_image.jpg", |
| 222 | + "deleted": 1 |
| 223 | + }, |
| 224 | + "spools": [ |
| 225 | + ... |
| 226 | + ] |
| 227 | + } |
| 228 | +} |
| 229 | +``` |
| 230 | + |
| 231 | +`GET /{id}/jobs/GetDetails?id={job_id}` |
| 232 | + |
| 233 | +### Request Body |
| 234 | + |
| 235 | +| Parameter | Type | Description | |
| 236 | +|-----------|--------|--------------| |
| 237 | +| `id` | string | The job UID. | |
| 238 | + |
| 239 | +### Response |
| 240 | + |
| 241 | +| Parameter | Type | Description | |
| 242 | +|-------------------------|---------|------------------------------------------| |
| 243 | +| `status` | boolean | `true` if the request was successful. | |
| 244 | +| `message` | string | Error message if `status` is `false`. | |
| 245 | +| `job` | object | Details about the print job. | |
| 246 | +| `job.id` | integer | Unique identifier for the job. | |
| 247 | +| `job.filament` | array | Array of filament data. | |
| 248 | +| `job.pauses` | array | Array of pause history. | |
| 249 | +| `job.currentTime` | integer | Current timestamp. | |
| 250 | +| `job.pictures` | array | Array of pictures related to the job. | |
| 251 | +| `job.notificationsSent` | array | Array of notifications sent. | |
| 252 | +| `job.cost` | float | Cost of the print job. | |
| 253 | +| `job.customFields` | object | Custom fields for the job. | |
| 254 | +| `job.ended` | integer | Time since the job ended. | |
| 255 | +| `job.failedReason` | string | Reason for job failure, if any. | |
| 256 | +| `job.cancelInfo` | object | Information about job cancellation. | |
| 257 | +| `job.analysis` | object | G-code analysis data. | |
| 258 | +| `job.notifications` | object | Notification data. | |
| 259 | +| `job.outsideSystem` | boolean | `true` if the job is outside the system. | |
| 260 | +| `job.rating` | integer | Rating of the job. | |
| 261 | +| `job.started` | integer | Time since the job started. | |
| 262 | +| `job.created` | integer | Time since the job was created. | |
| 263 | +| `job.state` | string | Current state of the job. | |
| 264 | +| `job.file` | string | Original filename of the job. | |
| 265 | +| `job.percentage` | integer | Current completion percentage. | |
| 266 | +| `job.time` | integer | Time left or time since the job ended. | |
| 267 | +| `job.canPreview` | boolean | `true` if the job can be previewed. | |
| 268 | +| `job.layer` | integer | Current layer of the print. | |
| 269 | +| `job.ai` | array | Array of AI detection values. | |
| 270 | +| `job.printer` | object | Details about the printer. | |
| 271 | +| `job.spools` | array | Array of spool data. | |
0 commit comments