Add REST API endpoint to get task by ID

This commit is contained in:
Ken Hibino
2021-07-17 06:16:15 -07:00
parent f9d9166248
commit 8ff8ec57bc
3 changed files with 88 additions and 0 deletions

View File

@@ -197,6 +197,8 @@ func main() {
api.HandleFunc("/queues/{qname}/archived_tasks:run_all", newRunAllArchivedTasksHandlerFunc(inspector)).Methods("POST")
api.HandleFunc("/queues/{qname}/archived_tasks:batch_run", newBatchRunTasksHandlerFunc(inspector)).Methods("POST")
api.HandleFunc("/queues/{qname}/tasks/{task_id}", newGetTaskHandlerFunc(inspector)).Methods("GET")
// Servers endpoints.
api.HandleFunc("/servers", newListServersHandlerFunc(inspector)).Methods("GET")