@@ -319,6 +319,121 @@ paths:
319
319
type : string
320
320
example : " something went wrong writing data to the device"
321
321
322
+ /mutateDevice :
323
+ patch :
324
+ summary : Mutates one or more fields on an existing device
325
+ description : |
326
+ Simply sets a few fields on a device.
327
+ At least one of the optional parameters (cost_center, assigned_to, location, operationalArea or condition) must be provided.
328
+ requestBody :
329
+ content :
330
+ application/json :
331
+ schema :
332
+ type : object
333
+ properties :
334
+ inventoryNumber :
335
+ description : The asset tag of the device.
336
+ type : string
337
+ technician :
338
+ description : The technician performing the action. This string will appear in the activity stream.
339
+ type : string
340
+ comment :
341
+ description : A comment composed by the technician that will appear in the activity stream.
342
+ type : string
343
+ cost_center :
344
+ description : The sys-id of the cost-center to update.
345
+ type : string
346
+ assigned_to :
347
+ description : The sys-id of the user to assign the device to.
348
+ type : string
349
+ location :
350
+ description : The sys-id of the location to set on the device.
351
+ type : string
352
+ operationalArea :
353
+ description : The operational area to set on the device.
354
+ type : string
355
+ condition :
356
+ description : The condition to set on the device.
357
+ type : string
358
+ required :
359
+ - inventoryNumber
360
+ - technician
361
+ - comment
362
+ responses :
363
+ ' 200 ' :
364
+ description : OK
365
+ content :
366
+ application/json :
367
+ schema :
368
+ type : object
369
+ properties :
370
+ message :
371
+ type : string
372
+ example : " Device 23282978 was mutated successfully."
373
+ ' 400 ' :
374
+ description : Bad Request (missing/invalid body or no optional fields provided)
375
+ content :
376
+ application/json :
377
+ schema :
378
+ type : object
379
+ properties :
380
+ name :
381
+ type : string
382
+ example : " MyItRestException"
383
+ message :
384
+ type : string
385
+ example : " You must set at least one of the optional parameters: cost_center, assigned_to, location, operationalArea or condition"
386
+ status :
387
+ type : integer
388
+ example : 400
389
+ ' 403 ' :
390
+ description : Forbidden
391
+ content :
392
+ application/json :
393
+ schema :
394
+ type : object
395
+ properties :
396
+ clazz :
397
+ type : string
398
+ example : " IllegalAccessException"
399
+ status :
400
+ type : integer
401
+ example : 403
402
+ message :
403
+ type : string
404
+ example : " You are not authorized to access this API"
405
+ ' 404 ' :
406
+ description : Not Found (device not present in CMDB)
407
+ content :
408
+ application/json :
409
+ schema :
410
+ type : object
411
+ properties :
412
+ name :
413
+ type : string
414
+ example : " MyItRestException"
415
+ message :
416
+ type : string
417
+ example : " Device with inventoryNumber 12345 not found in MyIT."
418
+ status :
419
+ type : integer
420
+ example : 404
421
+ ' 500 ' :
422
+ description : Internal Server Error
423
+ content :
424
+ application/json :
425
+ schema :
426
+ type : object
427
+ properties :
428
+ clazz :
429
+ type : string
430
+ example : " MyItRestException"
431
+ status :
432
+ type : integer
433
+ example : 500
434
+ message :
435
+ type : string
436
+ example : " something went wrong while writing data to the device"
322
437
components :
323
438
securitySchemes :
324
439
BasicAuth :
0 commit comments