# Evaluation Groups

## Create Evaluation Group

`client.evaluationGroups.create(EvaluationGroupCreateParamsbody, RequestOptionsoptions?): EvaluationGroup`

**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.

### Parameters

- `body: EvaluationGroupCreateParams`

  - `evaluation_ids: Array<string>`

    List of evaluation IDs to include in the group

  - `name: string`

    Name of the evaluation group

  - `description?: string`

    Optional description

  - `metadata?: Record<string, unknown>`

    Optional metadata key-value pairs

  - `row_identifiers?: Record<string, string>`

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

  - `tags?: Array<string>`

    The tags associated with the entity

### Returns

- `EvaluationGroup`

  Response model for evaluation group

  - `id: string`

    Unique identifier of the evaluation group

  - `account_id: string`

    Account that owns this evaluation group

  - `created_at: string`

    When the group was created

  - `name: string`

    Name of the evaluation group

  - `tags: Array<string> | null`

    The tags associated with the entity

  - `deleted_at?: string`

    When the group was soft-deleted

  - `description?: string`

    Optional description

  - `members?: Array<EvaluationGroupMember>`

    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

    - `created_at: string`

      When this member was added to the group

    - `evaluation_group_id: string`

      ID of the evaluation group

    - `evaluation_id: string`

      ID of the evaluation

    - `deleted_at?: string`

      When this membership was soft-deleted (if applicable)

    - `evaluation_created_at?: string`

      When the evaluation was created

    - `evaluation_name?: string`

      Name of the evaluation

    - `evaluation_tags?: Array<string>`

      Tags of the evaluation

    - `object?: "evaluation_group.member"`

      - `"evaluation_group.member"`

  - `metadata?: Record<string, unknown>`

    Optional metadata key-value pairs

  - `object?: "evaluation_group"`

    - `"evaluation_group"`

  - `row_identifiers?: Array<EvaluationGroupRowIdentifier>`

    Row identifier mappings. Populated with 'row_identifiers' view.

    - `column_name: string`

      Name of the column used as row identifier

    - `evaluation_id: string`

      ID of the evaluation

    - `object?: "evaluation_group.row_identifier"`

      - `"evaluation_group.row_identifier"`

### Example

```typescript
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 evaluationGroup = await client.evaluationGroups.create({
  evaluation_ids: ['string'],
  name: 'name',
});

console.log(evaluationGroup.id);
```

#### Response

```json
{
  "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"
    }
  ]
}
```

## List Evaluation Groups

`client.evaluationGroups.list(EvaluationGroupListParamsquery?, RequestOptionsoptions?): CursorPage<EvaluationGroup>`

**get** `/v5/evaluation-groups`

List the calling account's evaluation groups with optional filters.

Results are paginated and scoped to the authenticated account. The optional filters
combine with AND semantics: name does a case-insensitive partial (substring) match on
the group name, tags returns only groups whose tag list contains all of the supplied
tags, and evaluation_id returns only groups that have the given evaluation as an
active member. By default archived (soft-deleted) groups are excluded; set
include_deleted to include them. The views parameter optionally expands each group
with its members and/or row_identifiers, and returned members are enriched with each
evaluation's name, tags, and creation time.

### Parameters

- `query: EvaluationGroupListParams`

  - `ending_before?: string`

  - `evaluation_id?: string`

    Filter to groups containing this evaluation ID

  - `include_deleted?: boolean`

  - `limit?: number`

  - `name?: string`

  - `sort_by?: string`

  - `sort_order?: SortOrder`

    - `"asc"`

    - `"desc"`

  - `starting_after?: string`

  - `tags?: Array<string>`

  - `views?: Array<EvaluationGroupViews>`

    Optional relationships to include: 'members', 'row_identifiers'

    - `"members"`

    - `"row_identifiers"`

### Returns

- `EvaluationGroup`

  Response model for evaluation group

  - `id: string`

    Unique identifier of the evaluation group

  - `account_id: string`

    Account that owns this evaluation group

  - `created_at: string`

    When the group was created

  - `name: string`

    Name of the evaluation group

  - `tags: Array<string> | null`

    The tags associated with the entity

  - `deleted_at?: string`

    When the group was soft-deleted

  - `description?: string`

    Optional description

  - `members?: Array<EvaluationGroupMember>`

    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

    - `created_at: string`

      When this member was added to the group

    - `evaluation_group_id: string`

      ID of the evaluation group

    - `evaluation_id: string`

      ID of the evaluation

    - `deleted_at?: string`

      When this membership was soft-deleted (if applicable)

    - `evaluation_created_at?: string`

      When the evaluation was created

    - `evaluation_name?: string`

      Name of the evaluation

    - `evaluation_tags?: Array<string>`

      Tags of the evaluation

    - `object?: "evaluation_group.member"`

      - `"evaluation_group.member"`

  - `metadata?: Record<string, unknown>`

    Optional metadata key-value pairs

  - `object?: "evaluation_group"`

    - `"evaluation_group"`

  - `row_identifiers?: Array<EvaluationGroupRowIdentifier>`

    Row identifier mappings. Populated with 'row_identifiers' view.

    - `column_name: string`

      Name of the column used as row identifier

    - `evaluation_id: string`

      ID of the evaluation

    - `object?: "evaluation_group.row_identifier"`

      - `"evaluation_group.row_identifier"`

### Example

```typescript
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
});

// Automatically fetches more pages as needed.
for await (const evaluationGroup of client.evaluationGroups.list()) {
  console.log(evaluationGroup.id);
}
```

#### Response

```json
{
  "has_more": true,
  "items": [
    {
      "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"
        }
      ]
    }
  ],
  "total": 0,
  "limit": 0,
  "object": "list"
}
```

## Get Evaluation Group

`client.evaluationGroups.retrieve(stringgroupID, EvaluationGroupRetrieveParamsquery?, RequestOptionsoptions?): EvaluationGroup`

**get** `/v5/evaluation-groups/{group_id}`

Fetch a single evaluation group by its ID.

By default only non-archived groups are returned; set include_deleted to also resolve
a soft-deleted group, whose response includes its soft-deleted member rows.

`members` is always returned, so a client can confirm membership without passing a
view, and `views` adds further expansions on top (e.g. views=row_identifiers). The
full member set is returned with no cap, and each member is enriched with its
evaluation's name, tags, and creation time where that evaluation is readable from
this account; those fields are null otherwise. Use the schema endpoint instead when
you need the per-evaluation column schemas of the group's members.

### Parameters

- `groupID: string`

- `query: EvaluationGroupRetrieveParams`

  - `include_deleted?: boolean`

  - `views?: Array<EvaluationGroupViews>`

    Additional relationships to include; 'members' is always returned

    - `"members"`

    - `"row_identifiers"`

### Returns

- `EvaluationGroup`

  Response model for evaluation group

  - `id: string`

    Unique identifier of the evaluation group

  - `account_id: string`

    Account that owns this evaluation group

  - `created_at: string`

    When the group was created

  - `name: string`

    Name of the evaluation group

  - `tags: Array<string> | null`

    The tags associated with the entity

  - `deleted_at?: string`

    When the group was soft-deleted

  - `description?: string`

    Optional description

  - `members?: Array<EvaluationGroupMember>`

    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

    - `created_at: string`

      When this member was added to the group

    - `evaluation_group_id: string`

      ID of the evaluation group

    - `evaluation_id: string`

      ID of the evaluation

    - `deleted_at?: string`

      When this membership was soft-deleted (if applicable)

    - `evaluation_created_at?: string`

      When the evaluation was created

    - `evaluation_name?: string`

      Name of the evaluation

    - `evaluation_tags?: Array<string>`

      Tags of the evaluation

    - `object?: "evaluation_group.member"`

      - `"evaluation_group.member"`

  - `metadata?: Record<string, unknown>`

    Optional metadata key-value pairs

  - `object?: "evaluation_group"`

    - `"evaluation_group"`

  - `row_identifiers?: Array<EvaluationGroupRowIdentifier>`

    Row identifier mappings. Populated with 'row_identifiers' view.

    - `column_name: string`

      Name of the column used as row identifier

    - `evaluation_id: string`

      ID of the evaluation

    - `object?: "evaluation_group.row_identifier"`

      - `"evaluation_group.row_identifier"`

### Example

```typescript
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 evaluationGroup = await client.evaluationGroups.retrieve('group_id');

console.log(evaluationGroup.id);
```

#### Response

```json
{
  "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"
    }
  ]
}
```

## Patch Evaluation Group

`client.evaluationGroups.update(stringgroupID, EvaluationGroupUpdateParamsbody, RequestOptionsoptions?): EvaluationGroup`

**patch** `/v5/evaluation-groups/{group_id}`

Partially update an evaluation group's attributes.

Only the fields present in the request are changed; unset fields are left untouched.
Unlike the PUT endpoint, metadata is merged into the existing metadata key-by-key
rather than replaced wholesale, and group membership (evaluation_ids) cannot be
changed here -- use PUT to replace members. At least one field must be supplied or the
request fails with a 400. Supplying row_identifiers replaces the group's entire row
identifier set (an evaluation_id-to-column-name mapping for cross-dataset joins);
passing an empty mapping clears it.

### Parameters

- `groupID: string`

- `body: EvaluationGroupUpdateParams`

  - `description?: string`

    Optional description

  - `metadata?: Record<string, unknown>`

    Optional metadata key-value pairs

  - `name?: string`

    Name of the evaluation group

  - `row_identifiers?: Record<string, string>`

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

  - `tags?: Array<string>`

    The tags associated with the entity

### Returns

- `EvaluationGroup`

  Response model for evaluation group

  - `id: string`

    Unique identifier of the evaluation group

  - `account_id: string`

    Account that owns this evaluation group

  - `created_at: string`

    When the group was created

  - `name: string`

    Name of the evaluation group

  - `tags: Array<string> | null`

    The tags associated with the entity

  - `deleted_at?: string`

    When the group was soft-deleted

  - `description?: string`

    Optional description

  - `members?: Array<EvaluationGroupMember>`

    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

    - `created_at: string`

      When this member was added to the group

    - `evaluation_group_id: string`

      ID of the evaluation group

    - `evaluation_id: string`

      ID of the evaluation

    - `deleted_at?: string`

      When this membership was soft-deleted (if applicable)

    - `evaluation_created_at?: string`

      When the evaluation was created

    - `evaluation_name?: string`

      Name of the evaluation

    - `evaluation_tags?: Array<string>`

      Tags of the evaluation

    - `object?: "evaluation_group.member"`

      - `"evaluation_group.member"`

  - `metadata?: Record<string, unknown>`

    Optional metadata key-value pairs

  - `object?: "evaluation_group"`

    - `"evaluation_group"`

  - `row_identifiers?: Array<EvaluationGroupRowIdentifier>`

    Row identifier mappings. Populated with 'row_identifiers' view.

    - `column_name: string`

      Name of the column used as row identifier

    - `evaluation_id: string`

      ID of the evaluation

    - `object?: "evaluation_group.row_identifier"`

      - `"evaluation_group.row_identifier"`

### Example

```typescript
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 evaluationGroup = await client.evaluationGroups.update('group_id');

console.log(evaluationGroup.id);
```

#### Response

```json
{
  "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"
    }
  ]
}
```

## Update Evaluation Group

`client.evaluationGroups.replace(stringgroupID, EvaluationGroupReplaceParamsbody, RequestOptionsoptions?): EvaluationGroup`

**put** `/v5/evaluation-groups/{group_id}`

Replace an evaluation group's attributes and, optionally, its membership.

This is a full replacement of the group's attributes: every attribute field (name,
description, tags, metadata) is written from the request, so omitting an optional
field clears it rather than leaving it unchanged. Use PATCH instead to update only
selected fields and to merge (rather than overwrite) metadata. Membership is replaced
only when evaluation_ids is supplied: the resulting members become exactly that set
(added/removed by diff against the current members), it must contain at least one ID
with no duplicates, and every ID is validated for existence and account access or the
request fails with a 400. When membership actually changes, a best-effort Temporal
workflow is started to recompute the group's dashboard widgets; this is fire-and-forget
and its failure does not fail the request. Removing members hard-deletes the
corresponding chart columns and any charts left with no columns.

### Parameters

- `groupID: string`

- `body: EvaluationGroupReplaceParams`

  - `description?: string`

    Optional description

  - `evaluation_ids?: Array<string>`

    Complete list of evaluation IDs to include in group (replaces existing members)

  - `metadata?: Record<string, unknown>`

    Optional metadata key-value pairs

  - `name?: string`

    Name of the evaluation group

  - `row_identifiers?: Record<string, string>`

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

  - `tags?: Array<string>`

    The tags associated with the entity

### Returns

- `EvaluationGroup`

  Response model for evaluation group

  - `id: string`

    Unique identifier of the evaluation group

  - `account_id: string`

    Account that owns this evaluation group

  - `created_at: string`

    When the group was created

  - `name: string`

    Name of the evaluation group

  - `tags: Array<string> | null`

    The tags associated with the entity

  - `deleted_at?: string`

    When the group was soft-deleted

  - `description?: string`

    Optional description

  - `members?: Array<EvaluationGroupMember>`

    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

    - `created_at: string`

      When this member was added to the group

    - `evaluation_group_id: string`

      ID of the evaluation group

    - `evaluation_id: string`

      ID of the evaluation

    - `deleted_at?: string`

      When this membership was soft-deleted (if applicable)

    - `evaluation_created_at?: string`

      When the evaluation was created

    - `evaluation_name?: string`

      Name of the evaluation

    - `evaluation_tags?: Array<string>`

      Tags of the evaluation

    - `object?: "evaluation_group.member"`

      - `"evaluation_group.member"`

  - `metadata?: Record<string, unknown>`

    Optional metadata key-value pairs

  - `object?: "evaluation_group"`

    - `"evaluation_group"`

  - `row_identifiers?: Array<EvaluationGroupRowIdentifier>`

    Row identifier mappings. Populated with 'row_identifiers' view.

    - `column_name: string`

      Name of the column used as row identifier

    - `evaluation_id: string`

      ID of the evaluation

    - `object?: "evaluation_group.row_identifier"`

      - `"evaluation_group.row_identifier"`

### Example

```typescript
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 evaluationGroup = await client.evaluationGroups.replace('group_id');

console.log(evaluationGroup.id);
```

#### Response

```json
{
  "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"
    }
  ]
}
```

## Archive Evaluation Group

`client.evaluationGroups.archive(stringgroupID, RequestOptionsoptions?): EvaluationGroup`

**delete** `/v5/evaluation-groups/{group_id}`

Archive (soft-delete) an evaluation group and its dependent records.

This is a soft delete: the group is marked deleted rather than removed, so it no
longer appears in default list/get results but can still be fetched with the
include-deleted flags. The same delete timestamp cascades as a soft delete to the
group's members, row identifiers, and its dashboard charts and their chart columns;
the member evaluations themselves are not affected. The archived group is returned in
the response.

### Parameters

- `groupID: string`

### Returns

- `EvaluationGroup`

  Response model for evaluation group

  - `id: string`

    Unique identifier of the evaluation group

  - `account_id: string`

    Account that owns this evaluation group

  - `created_at: string`

    When the group was created

  - `name: string`

    Name of the evaluation group

  - `tags: Array<string> | null`

    The tags associated with the entity

  - `deleted_at?: string`

    When the group was soft-deleted

  - `description?: string`

    Optional description

  - `members?: Array<EvaluationGroupMember>`

    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

    - `created_at: string`

      When this member was added to the group

    - `evaluation_group_id: string`

      ID of the evaluation group

    - `evaluation_id: string`

      ID of the evaluation

    - `deleted_at?: string`

      When this membership was soft-deleted (if applicable)

    - `evaluation_created_at?: string`

      When the evaluation was created

    - `evaluation_name?: string`

      Name of the evaluation

    - `evaluation_tags?: Array<string>`

      Tags of the evaluation

    - `object?: "evaluation_group.member"`

      - `"evaluation_group.member"`

  - `metadata?: Record<string, unknown>`

    Optional metadata key-value pairs

  - `object?: "evaluation_group"`

    - `"evaluation_group"`

  - `row_identifiers?: Array<EvaluationGroupRowIdentifier>`

    Row identifier mappings. Populated with 'row_identifiers' view.

    - `column_name: string`

      Name of the column used as row identifier

    - `evaluation_id: string`

      ID of the evaluation

    - `object?: "evaluation_group.row_identifier"`

      - `"evaluation_group.row_identifier"`

### Example

```typescript
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 evaluationGroup = await client.evaluationGroups.archive('group_id');

console.log(evaluationGroup.id);
```

#### Response

```json
{
  "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"
    }
  ]
}
```

## Get Evaluation Group Schema

`client.evaluationGroups.retrieveSchema(stringgroupID, EvaluationGroupRetrieveSchemaParamsquery?, RequestOptionsoptions?): EvaluationGroupRetrieveSchemaResponse`

**get** `/v5/evaluation-groups/{group_id}/schema`

Return a separate column schema for each active member evaluation of the group.

Rather than a single merged schema, the response holds one schema entry per active
member evaluation (each with its field list, total item count, and sampling info),
which lets a caller filter columns down to a chosen subset of the group's evaluations.
Schemas are computed from the member evaluations' items; include_archived controls
whether archived items are counted in that analysis. A group with no active members
returns an empty schema list. This differs from the plain get endpoint, which returns
group metadata and members but not their column schemas.

### Parameters

- `groupID: string`

- `query: EvaluationGroupRetrieveSchemaParams`

  - `include_archived?: boolean`

    Include archived items in schema analysis

### Returns

- `EvaluationGroupRetrieveSchemaResponse`

  Per-evaluation schemas for all members of an evaluation group

  - `evaluation_group_id: string`

    The ID of the evaluation group

  - `evaluation_schemas: Array<EvaluationSchemaResponse>`

    Schema for each member evaluation in the group, one entry per active evaluation

    - `evaluation_id: string`

      The ID of the evaluation

    - `fields: Array<Field>`

      List of all discovered fields, ordered alphabetically by field_name

      - `data_type: string`

        JSON type: 'string', 'number', 'boolean', 'object', 'array', or 'null'

      - `field_name: string`

        The flattened JSON key path (e.g., 'metadata.category')

      - `item_count: number`

        Number of evaluation items containing this field

      - `source: "data" | "task_result_cache"`

        The source of the field: 'data' or 'task_result_cache'

        - `"data"`

        - `"task_result_cache"`

      - `object?: "field_schema"`

        - `"field_schema"`

    - `total_items: number`

      Total number of evaluation items

    - `is_sampled?: boolean`

      Whether schema was computed from a sample of items (for large evaluations)

    - `object?: "evaluation_schema"`

      - `"evaluation_schema"`

    - `sample_size?: number`

      Number of items sampled for schema inference, if applicable

  - `object?: "evaluation_group_schema"`

    - `"evaluation_group_schema"`

### Example

```typescript
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 response = await client.evaluationGroups.retrieveSchema('group_id');

console.log(response.evaluation_group_id);
```

#### Response

```json
{
  "evaluation_group_id": "evaluation_group_id",
  "evaluation_schemas": [
    {
      "evaluation_id": "evaluation_id",
      "fields": [
        {
          "data_type": "data_type",
          "field_name": "field_name",
          "item_count": 0,
          "source": "data",
          "object": "field_schema"
        }
      ],
      "total_items": 0,
      "is_sampled": true,
      "object": "evaluation_schema",
      "sample_size": 0
    }
  ],
  "object": "evaluation_group_schema"
}
```

## Domain Types

### Evaluation Group

- `EvaluationGroup`

  Response model for evaluation group

  - `id: string`

    Unique identifier of the evaluation group

  - `account_id: string`

    Account that owns this evaluation group

  - `created_at: string`

    When the group was created

  - `name: string`

    Name of the evaluation group

  - `tags: Array<string> | null`

    The tags associated with the entity

  - `deleted_at?: string`

    When the group was soft-deleted

  - `description?: string`

    Optional description

  - `members?: Array<EvaluationGroupMember>`

    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

    - `created_at: string`

      When this member was added to the group

    - `evaluation_group_id: string`

      ID of the evaluation group

    - `evaluation_id: string`

      ID of the evaluation

    - `deleted_at?: string`

      When this membership was soft-deleted (if applicable)

    - `evaluation_created_at?: string`

      When the evaluation was created

    - `evaluation_name?: string`

      Name of the evaluation

    - `evaluation_tags?: Array<string>`

      Tags of the evaluation

    - `object?: "evaluation_group.member"`

      - `"evaluation_group.member"`

  - `metadata?: Record<string, unknown>`

    Optional metadata key-value pairs

  - `object?: "evaluation_group"`

    - `"evaluation_group"`

  - `row_identifiers?: Array<EvaluationGroupRowIdentifier>`

    Row identifier mappings. Populated with 'row_identifiers' view.

    - `column_name: string`

      Name of the column used as row identifier

    - `evaluation_id: string`

      ID of the evaluation

    - `object?: "evaluation_group.row_identifier"`

      - `"evaluation_group.row_identifier"`

### Evaluation Group Member

- `EvaluationGroupMember`

  Response model for evaluation group member

  - `id: string`

    Unique identifier of the member record

  - `created_at: string`

    When this member was added to the group

  - `evaluation_group_id: string`

    ID of the evaluation group

  - `evaluation_id: string`

    ID of the evaluation

  - `deleted_at?: string`

    When this membership was soft-deleted (if applicable)

  - `evaluation_created_at?: string`

    When the evaluation was created

  - `evaluation_name?: string`

    Name of the evaluation

  - `evaluation_tags?: Array<string>`

    Tags of the evaluation

  - `object?: "evaluation_group.member"`

    - `"evaluation_group.member"`

### Evaluation Group Row Identifier

- `EvaluationGroupRowIdentifier`

  Response model for evaluation group row identifier

  - `column_name: string`

    Name of the column used as row identifier

  - `evaluation_id: string`

    ID of the evaluation

  - `object?: "evaluation_group.row_identifier"`

    - `"evaluation_group.row_identifier"`

### Evaluation Group Views

- `EvaluationGroupViews = "members" | "row_identifiers"`

  Views for evaluation group responses

  - `"members"`

  - `"row_identifiers"`

### Evaluation Group Retrieve Schema Response

- `EvaluationGroupRetrieveSchemaResponse`

  Per-evaluation schemas for all members of an evaluation group

  - `evaluation_group_id: string`

    The ID of the evaluation group

  - `evaluation_schemas: Array<EvaluationSchemaResponse>`

    Schema for each member evaluation in the group, one entry per active evaluation

    - `evaluation_id: string`

      The ID of the evaluation

    - `fields: Array<Field>`

      List of all discovered fields, ordered alphabetically by field_name

      - `data_type: string`

        JSON type: 'string', 'number', 'boolean', 'object', 'array', or 'null'

      - `field_name: string`

        The flattened JSON key path (e.g., 'metadata.category')

      - `item_count: number`

        Number of evaluation items containing this field

      - `source: "data" | "task_result_cache"`

        The source of the field: 'data' or 'task_result_cache'

        - `"data"`

        - `"task_result_cache"`

      - `object?: "field_schema"`

        - `"field_schema"`

    - `total_items: number`

      Total number of evaluation items

    - `is_sampled?: boolean`

      Whether schema was computed from a sample of items (for large evaluations)

    - `object?: "evaluation_schema"`

      - `"evaluation_schema"`

    - `sample_size?: number`

      Number of items sampled for schema inference, if applicable

  - `object?: "evaluation_group_schema"`

    - `"evaluation_group_schema"`
