Skip to content

Commit c991528

Browse files
committed
Add comment for usage of workspace history logs endpoint
1 parent 4421b46 commit c991528

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

coderd/workspacehistorylogs.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ type WorkspaceHistoryLog struct {
2929
Output string `json:"output"`
3030
}
3131

32+
// Returns workspace history logs based on query parameters.
33+
// The intended usage for a client to stream all logs (with JS API):
34+
// const timestamp = new Date().getTime();
35+
// 1. GET /logs?before=<timestamp>
36+
// 2. GET /logs?after=<timestamp>&follow
37+
// The combination of these responses should provide all current logs
38+
// to the consumer, and future logs are streamed in the follow request.
3239
func (api *api) workspaceHistoryLogsByName(rw http.ResponseWriter, r *http.Request) {
3340
follow := r.URL.Query().Has("follow")
3441
afterRaw := r.URL.Query().Get("after")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy