Skip to content

Create Evaluation Group

client.EvaluationGroups.New(ctx, body) (*EvaluationGroup, error)
POST/v5/evaluation-groups

Create a new evaluation group bundling one or more existing evaluations.

The request must list at least one evaluation ID, and duplicate IDs are rejected. Every listed evaluation is validated for existence and account access before the group is created; an unknown or inaccessible evaluation ID fails the whole request with a 400 rather than creating a partial group. The named evaluations are added as group members in the same transaction, and any supplied row_identifiers (an evaluation_id-to-column-name mapping used for cross-dataset joins) are persisted alongside them, ignoring entries for evaluation IDs not in the group. The returned group includes its members enriched with each evaluation’s name, tags, and creation time. Unlike the PUT and PATCH update endpoints, creation does not trigger any dashboard-widget recomputation.

ParametersExpand Collapse
body EvaluationGroupNewParams
EvaluationIDs param.Field[[]string]

List of evaluation IDs to include in the group

Name param.Field[string]

Name of the evaluation group

maxLength128
Description param.Field[string]Optional

Optional description

Metadata param.Field[map[string, any]]Optional

Optional metadata key-value pairs

RowIdentifiers param.Field[map[string, string]]Optional

Optional mapping of evaluation_id to column name for cross-dataset joins

Tags param.Field[[]string]Optional

The tags associated with the entity

ReturnsExpand Collapse
type EvaluationGroup struct{…}

Response model for evaluation group

ID string

Unique identifier of the evaluation group

AccountID string

Account that owns this evaluation group

CreatedAt Time

When the group was created

formatdate-time
Name string

Name of the evaluation group

Tags []string

The tags associated with the entity

DeletedAt TimeOptional

When the group was soft-deleted

formatdate-time
Description stringOptional

Optional description

Members []EvaluationGroupMemberOptional

Evaluation members in this group. Returned by default on GET by id; on list endpoints, populated only with the ‘members’ view.

ID string

Unique identifier of the member record

CreatedAt Time

When this member was added to the group

formatdate-time
EvaluationGroupID string

ID of the evaluation group

EvaluationID string

ID of the evaluation

DeletedAt TimeOptional

When this membership was soft-deleted (if applicable)

formatdate-time
EvaluationCreatedAt TimeOptional

When the evaluation was created

formatdate-time
EvaluationName stringOptional

Name of the evaluation

EvaluationTags []stringOptional

Tags of the evaluation

Object EvaluationGroupMemberObjectOptional
Metadata map[string, any]Optional

Optional metadata key-value pairs

Object EvaluationGroupObjectOptional
RowIdentifiers []EvaluationGroupRowIdentifierOptional

Row identifier mappings. Populated with ‘row_identifiers’ view.

ColumnName string

Name of the column used as row identifier

EvaluationID string

ID of the evaluation

Object EvaluationGroupRowIdentifierObjectOptional

Create Evaluation Group

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"),
  )
  evaluationGroup, err := client.EvaluationGroups.New(context.TODO(), sgpdev.EvaluationGroupNewParams{
    EvaluationIDs: []string{"string"},
    Name: "name",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", evaluationGroup.ID)
}
{
  "id": "id",
  "account_id": "account_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "name": "name",
  "tags": [
    "string"
  ],
  "deleted_at": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "members": [
    {
      "id": "id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "evaluation_group_id": "evaluation_group_id",
      "evaluation_id": "evaluation_id",
      "deleted_at": "2019-12-27T18:11:19.117Z",
      "evaluation_created_at": "2019-12-27T18:11:19.117Z",
      "evaluation_name": "evaluation_name",
      "evaluation_tags": [
        "string"
      ],
      "object": "evaluation_group.member"
    }
  ],
  "metadata": {
    "foo": "bar"
  },
  "object": "evaluation_group",
  "row_identifiers": [
    {
      "column_name": "column_name",
      "evaluation_id": "evaluation_id",
      "object": "evaluation_group.row_identifier"
    }
  ]
}
Returns Examples
{
  "id": "id",
  "account_id": "account_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "name": "name",
  "tags": [
    "string"
  ],
  "deleted_at": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "members": [
    {
      "id": "id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "evaluation_group_id": "evaluation_group_id",
      "evaluation_id": "evaluation_id",
      "deleted_at": "2019-12-27T18:11:19.117Z",
      "evaluation_created_at": "2019-12-27T18:11:19.117Z",
      "evaluation_name": "evaluation_name",
      "evaluation_tags": [
        "string"
      ],
      "object": "evaluation_group.member"
    }
  ],
  "metadata": {
    "foo": "bar"
  },
  "object": "evaluation_group",
  "row_identifiers": [
    {
      "column_name": "column_name",
      "evaluation_id": "evaluation_id",
      "object": "evaluation_group.row_identifier"
    }
  ]
}