@@ -306,6 +306,208 @@ const docTemplate = `{
306
306
}
307
307
}
308
308
}
309
+ },
310
+ "/workspaces/{workspace}": {
311
+ "patch": {
312
+ "security": [
313
+ {
314
+ "CoderSessionToken": []
315
+ }
316
+ ],
317
+ "produces": [
318
+ "application/json"
319
+ ],
320
+ "tags": [
321
+ "Workspaces"
322
+ ],
323
+ "summary": "Update workspace metadata by ID",
324
+ "operationId": "update-workspace-metadata-by-id",
325
+ "parameters": [
326
+ {
327
+ "type": "string",
328
+ "format": "uuid",
329
+ "description": "Workspace ID",
330
+ "name": "workspace",
331
+ "in": "path",
332
+ "required": true
333
+ },
334
+ {
335
+ "description": "Metadata update request",
336
+ "name": "request",
337
+ "in": "body",
338
+ "required": true,
339
+ "schema": {
340
+ "$ref": "#/definitions/codersdk.UpdateWorkspaceRequest"
341
+ }
342
+ }
343
+ ],
344
+ "responses": {
345
+ "204": {
346
+ "description": "No Content"
347
+ }
348
+ }
349
+ }
350
+ },
351
+ "/workspaces/{workspace}/autostart": {
352
+ "put": {
353
+ "security": [
354
+ {
355
+ "CoderSessionToken": []
356
+ }
357
+ ],
358
+ "produces": [
359
+ "application/json"
360
+ ],
361
+ "tags": [
362
+ "Workspaces"
363
+ ],
364
+ "summary": "Update workspace autostart schedule by ID",
365
+ "operationId": "update-workspace-autostart-schedule-by-id",
366
+ "parameters": [
367
+ {
368
+ "type": "string",
369
+ "format": "uuid",
370
+ "description": "Workspace ID",
371
+ "name": "workspace",
372
+ "in": "path",
373
+ "required": true
374
+ },
375
+ {
376
+ "description": "Schedule update request",
377
+ "name": "request",
378
+ "in": "body",
379
+ "required": true,
380
+ "schema": {
381
+ "$ref": "#/definitions/codersdk.UpdateWorkspaceAutostartRequest"
382
+ }
383
+ }
384
+ ],
385
+ "responses": {
386
+ "204": {
387
+ "description": "No Content"
388
+ }
389
+ }
390
+ }
391
+ },
392
+ "/workspaces/{workspace}/extend": {
393
+ "put": {
394
+ "security": [
395
+ {
396
+ "CoderSessionToken": []
397
+ }
398
+ ],
399
+ "produces": [
400
+ "application/json"
401
+ ],
402
+ "tags": [
403
+ "Workspaces"
404
+ ],
405
+ "summary": "Extend workspace deadline by ID",
406
+ "operationId": "extend-workspace-deadline-by-id",
407
+ "parameters": [
408
+ {
409
+ "type": "string",
410
+ "format": "uuid",
411
+ "description": "Workspace ID",
412
+ "name": "workspace",
413
+ "in": "path",
414
+ "required": true
415
+ },
416
+ {
417
+ "description": "Extend deadline update request",
418
+ "name": "request",
419
+ "in": "body",
420
+ "required": true,
421
+ "schema": {
422
+ "$ref": "#/definitions/codersdk.PutExtendWorkspaceRequest"
423
+ }
424
+ }
425
+ ],
426
+ "responses": {
427
+ "200": {
428
+ "description": "OK",
429
+ "schema": {
430
+ "$ref": "#/definitions/codersdk.Response"
431
+ }
432
+ }
433
+ }
434
+ }
435
+ },
436
+ "/workspaces/{workspace}/ttl": {
437
+ "put": {
438
+ "security": [
439
+ {
440
+ "CoderSessionToken": []
441
+ }
442
+ ],
443
+ "produces": [
444
+ "application/json"
445
+ ],
446
+ "tags": [
447
+ "Workspaces"
448
+ ],
449
+ "summary": "Update workspace ttl by ID",
450
+ "operationId": "update-workspace-ttl-by-id",
451
+ "parameters": [
452
+ {
453
+ "type": "string",
454
+ "format": "uuid",
455
+ "description": "Workspace ID",
456
+ "name": "workspace",
457
+ "in": "path",
458
+ "required": true
459
+ },
460
+ {
461
+ "description": "Workspace TTL update request",
462
+ "name": "request",
463
+ "in": "body",
464
+ "required": true,
465
+ "schema": {
466
+ "$ref": "#/definitions/codersdk.UpdateWorkspaceTTLRequest"
467
+ }
468
+ }
469
+ ],
470
+ "responses": {
471
+ "204": {
472
+ "description": "No Content"
473
+ }
474
+ }
475
+ }
476
+ },
477
+ "/workspaces/{workspace}/watch": {
478
+ "get": {
479
+ "security": [
480
+ {
481
+ "CoderSessionToken": []
482
+ }
483
+ ],
484
+ "produces": [
485
+ "application/json"
486
+ ],
487
+ "tags": [
488
+ "Workspaces"
489
+ ],
490
+ "summary": "Watch workspace by ID",
491
+ "operationId": "watch-workspace-id",
492
+ "parameters": [
493
+ {
494
+ "type": "string",
495
+ "format": "uuid",
496
+ "description": "Workspace ID",
497
+ "name": "workspace",
498
+ "in": "path",
499
+ "required": true
500
+ }
501
+ ],
502
+ "responses": {
503
+ "200": {
504
+ "description": "OK",
505
+ "schema": {
506
+ "$ref": "#/definitions/codersdk.Response"
507
+ }
508
+ }
509
+ }
510
+ }
309
511
}
310
512
},
311
513
"definitions": {
@@ -464,6 +666,37 @@ const docTemplate = `{
464
666
}
465
667
}
466
668
},
669
+ "codersdk.PutExtendWorkspaceRequest": {
670
+ "type": "object",
671
+ "required": [
672
+ "deadline"
673
+ ],
674
+ "properties": {
675
+ "deadline": {
676
+ "type": "string"
677
+ }
678
+ }
679
+ },
680
+ "codersdk.Response": {
681
+ "type": "object",
682
+ "properties": {
683
+ "detail": {
684
+ "description": "Detail is a debug message that provides further insight into why the\naction failed. This information can be technical and a regular golang\nerr.Error() text.\n- \"database: too many open connections\"\n- \"stat: too many open files\"",
685
+ "type": "string"
686
+ },
687
+ "message": {
688
+ "description": "Message is an actionable message that depicts actions the request took.\nThese messages should be fully formed sentences with proper punctuation.\nExamples:\n- \"A user has been created.\"\n- \"Failed to create a user.\"",
689
+ "type": "string"
690
+ },
691
+ "validations": {
692
+ "description": "Validations are form field-specific friendly error messages. They will be\nshown on a form field in the UI. These can also be used to add additional\ncontext if there is a set of errors in the primary 'Message'.",
693
+ "type": "array",
694
+ "items": {
695
+ "$ref": "#/definitions/codersdk.ValidationError"
696
+ }
697
+ }
698
+ }
699
+ },
467
700
"codersdk.Template": {
468
701
"type": "object",
469
702
"properties": {
@@ -545,6 +778,45 @@ const docTemplate = `{
545
778
}
546
779
}
547
780
},
781
+ "codersdk.UpdateWorkspaceAutostartRequest": {
782
+ "type": "object",
783
+ "properties": {
784
+ "schedule": {
785
+ "type": "string"
786
+ }
787
+ }
788
+ },
789
+ "codersdk.UpdateWorkspaceRequest": {
790
+ "type": "object",
791
+ "properties": {
792
+ "name": {
793
+ "type": "string"
794
+ }
795
+ }
796
+ },
797
+ "codersdk.UpdateWorkspaceTTLRequest": {
798
+ "type": "object",
799
+ "properties": {
800
+ "ttl_ms": {
801
+ "type": "integer"
802
+ }
803
+ }
804
+ },
805
+ "codersdk.ValidationError": {
806
+ "type": "object",
807
+ "required": [
808
+ "detail",
809
+ "field"
810
+ ],
811
+ "properties": {
812
+ "detail": {
813
+ "type": "string"
814
+ },
815
+ "field": {
816
+ "type": "string"
817
+ }
818
+ }
819
+ },
548
820
"codersdk.Workspace": {
549
821
"type": "object",
550
822
"properties": {
0 commit comments