Skip to content

Archive a rubric

client.Rubrics.Archive(ctx, rubricID) (*RubricArchiveResponse, error)
DELETE/v5/rubrics/{rubric_id}

Archive a rubric (soft delete).

This is a soft delete, not a permanent one: it records an archived timestamp on the rubric while retaining the rubric and its version history, so it can later be brought back via the restore variant of the update endpoint. An archived rubric is hidden from the list endpoint but stays retrievable by id. The rubric’s criteria are left untouched — archiving does not cascade to or delete them. Archiving a rubric that is already archived is rejected.

ParametersExpand Collapse
rubricID string
ReturnsExpand Collapse
type RubricArchiveResponse struct{…}
ID string
Deleted bool
Object RubricArchiveResponseObjectOptional

Archive a rubric

package main

import (
  "context"
  "fmt"

  "github.com/scaleapi/sgp-dev-go"
  "github.com/scaleapi/sgp-dev-go/option"
)

func main() {
  client := sgpdev.NewClient(
    option.WithAPIKey("My API Key"),
    option.WithAccountID("My Account ID"),
  )
  response, err := client.Rubrics.Archive(context.TODO(), "rubric_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.ID)
}
{
  "id": "id",
  "deleted": true,
  "object": "rubric"
}
Returns Examples
{
  "id": "id",
  "deleted": true,
  "object": "rubric"
}