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

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #850
johnstcn opened this issue Apr 18, 2022 · 1 comment
Closed
Tracked by #850
Milestone

Comments

@johnstcn
Copy link
Member

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.)

@johnstcn johnstcn added new feature ✨ api Area: HTTP API labels Apr 18, 2022
@johnstcn johnstcn added this to the V2 Beta milestone Apr 18, 2022
@johnstcn johnstcn self-assigned this Apr 18, 2022
@johnstcn
Copy link
Member Author

johnstcn commented Apr 21, 2022

As showing the next scheduled start time in the UI alongside the schedule was deemed unnecessary, instead of adding a new endpoint, will just compute Next() in the CLI. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants