Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: autostart/autostop: add GET /workspaces/:id/autostart endpoint #1058

@johnstcn

Description

@johnstcn

What

Add endpoints to return information about workspace autostop/autostart times:

  • GET /workspaces/:id/autostart
  • GET /workspaces/:id/autostop

Both of these endpoints will return the following information (example):

{
  "schedule": "CRON_TZ=Europe/Dublin 30 9 * * 1-5",
  "next": "2022-04-18T09:30:00Z"
}

Why

To support #861 and to show the information in the UI, we will need to poll the workspace object to retrieve the schedule in case it changes. Instead of this, we can return this information directly from coderd.

(Also for the TDD session at the engineering off-site.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions