Archive a task
client.Tasks.Delete(ctx, taskID) (*DeleteTaskResponse, error)
DELETE/api/tasks/{taskId}
Archive a task so it stops appearing in GET /tasks results. Turns and files are retained for audit purposes. Only the worker creator can archive a task.
Archive a task
package main
import (
"context"
"fmt"
"github.com/ramensoft/handinger-go"
"github.com/ramensoft/handinger-go/option"
)
func main() {
client := handinger.NewClient(
option.WithAPIKey("My API Key"),
)
deleteTaskResponse, err := client.Tasks.Delete(context.TODO(), "tsk_01HZY31W2SZJ8MJ2FQTR3M1K9D")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", deleteTaskResponse.Archived)
}
{
"archived": true
}Returns Examples
{
"archived": true
}