Archive a workspace
client.Admin.Workspaces.Archive(ctx, workspaceID) (*AdminWorkspaceArchiveResponse, error)
POST/compute/v1/admin/workspaces/{workspace_id}/archive
Archives a workspace and deactivates all its API keys. This action is irreversible.
Parameters
workspaceID string
Returns
Archive a workspace
package main
import (
"context"
"fmt"
"github.com/boltz-bio/boltz-api-go"
"github.com/boltz-bio/boltz-api-go/option"
)
func main() {
client := boltzapi.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Admin.Workspaces.Archive(context.TODO(), "workspace_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.ID)
}
{
"id": "id",
"archived_at": "2019-12-27T18:11:19.117Z",
"created_at": "2019-12-27T18:11:19.117Z",
"data_retention": {
"unit": "hours",
"value": 1
},
"is_default": true,
"name": "name",
"updated_at": "2019-12-27T18:11:19.117Z"
}Returns Examples
{
"id": "id",
"archived_at": "2019-12-27T18:11:19.117Z",
"created_at": "2019-12-27T18:11:19.117Z",
"data_retention": {
"unit": "hours",
"value": 1
},
"is_default": true,
"name": "name",
"updated_at": "2019-12-27T18:11:19.117Z"
}