Skip to content

Add a criterion to a rubric

rubrics.criteria.create(strrubric_id, CriterionCreateParams**kwargs) -> RubricCriteriaResponse
POST/v5/rubrics/{rubric_id}/criteria

Add a single criterion to an existing rubric.

Creates a new criterion at version 1 under the given rubric. Criteria are versioned independently of the rubric they belong to. The request is rejected if the target rubric is archived.

ParametersExpand Collapse
rubric_id: str
title: str

The Criteria text

minLength1
annotations: Optional[Dict[str, object]]

Free-form metadata for the Criteria

weight: Optional[float]

Weight multiplier for scoring

minimum0
ReturnsExpand Collapse
class RubricCriteriaResponse: …
id: str
created_at: datetime
formatdate-time
rubric_id: str
title: str
version: int
annotations: Optional[Dict[str, object]]
object: Optional[Literal["rubric_criteria"]]
weight: Optional[float]

Add a criterion to a rubric

import os
from scale_gp_beta import SGPClient

client = SGPClient(
    api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
)
rubric_criteria_response = client.rubrics.criteria.create(
    rubric_id="rubric_id",
    title="x",
)
print(rubric_criteria_response.id)
{
  "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
}
Returns Examples
{
  "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
}