Skip to content

Get a rubric

client.rubrics.retrieve(stringrubricID, RequestOptionsoptions?): RubricResponse { id, created_at, created_by, 7 more }
GET/v5/rubrics/{rubric_id}

Retrieve a single rubric with the full detail of its current criteria.

Returns the latest version of the rubric along with all of its current (latest-version) criteria in full — not the slim title/weight summary returned by the list endpoint. Archived rubrics remain retrievable through this endpoint even though they are hidden from the list endpoint.

ParametersExpand Collapse
rubricID: string
ReturnsExpand Collapse
RubricResponse { id, created_at, created_by, 7 more }
id: string
created_at: string
formatdate-time
created_by: Identity { id, type, object }

The identity that created the entity.

id: string
type: "user" | "service_account"
One of the following:
"user"
"service_account"
object?: "identity"
tags: Array<string> | null

The tags associated with the entity

title: string
version: number
archived_at?: string
formatdate-time
criteria?: Array<RubricCriteriaResponse { id, created_at, rubric_id, 5 more } | RubricCriteriaSummaryResponse { title, weight } >

Full criteria on get, summary (title + weight) on list

One of the following:
RubricCriteriaResponse { id, created_at, rubric_id, 5 more }
id: string
created_at: string
formatdate-time
rubric_id: string
title: string
version: number
annotations?: Record<string, unknown>
object?: "rubric_criteria"
weight?: number
RubricCriteriaSummaryResponse { title, weight }

Slim criteria projection for list endpoints (title + weight only).

title: string
weight?: number
object?: "rubric"
updated_at?: string
formatdate-time

Get a rubric

import SGPClient from 'scale-gp';

const client = new SGPClient({
  accountID: 'My Account ID',
  apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});

const rubricResponse = await client.rubrics.retrieve('rubric_id');

console.log(rubricResponse.id);
{
  "id": "id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "created_by": {
    "id": "id",
    "type": "user",
    "object": "identity"
  },
  "tags": [
    "string"
  ],
  "title": "title",
  "version": 0,
  "archived_at": "2019-12-27T18:11:19.117Z",
  "criteria": [
    {
      "id": "id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "rubric_id": "rubric_id",
      "title": "title",
      "version": 0,
      "annotations": {
        "foo": "bar"
      },
      "object": "rubric_criteria",
      "weight": 0
    }
  ],
  "object": "rubric",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
Returns Examples
{
  "id": "id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "created_by": {
    "id": "id",
    "type": "user",
    "object": "identity"
  },
  "tags": [
    "string"
  ],
  "title": "title",
  "version": 0,
  "archived_at": "2019-12-27T18:11:19.117Z",
  "criteria": [
    {
      "id": "id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "rubric_id": "rubric_id",
      "title": "title",
      "version": 0,
      "annotations": {
        "foo": "bar"
      },
      "object": "rubric_criteria",
      "weight": 0
    }
  ],
  "object": "rubric",
  "updated_at": "2019-12-27T18:11:19.117Z"
}