# Evaluation Groups

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

### Parameters

- `body EvaluationGroupNewParams`

  - `EvaluationIDs param.Field[[]string]`

    List of evaluation IDs to include in the group

  - `Name param.Field[string]`

    Name of the evaluation group

  - `Description param.Field[string]`

    Optional description

  - `Metadata param.Field[map[string, any]]`

    Optional metadata key-value pairs

  - `RowIdentifiers param.Field[map[string, string]]`

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

  - `Tags param.Field[[]string]`

    The tags associated with the entity

### Returns

- `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

  - `Name string`

    Name of the evaluation group

  - `Tags []string`

    The tags associated with the entity

  - `DeletedAt Time`

    When the group was soft-deleted

  - `Description string`

    Optional description

  - `Members []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

    - `CreatedAt Time`

      When this member was added to the group

    - `EvaluationGroupID string`

      ID of the evaluation group

    - `EvaluationID string`

      ID of the evaluation

    - `DeletedAt Time`

      When this membership was soft-deleted (if applicable)

    - `EvaluationCreatedAt Time`

      When the evaluation was created

    - `EvaluationName string`

      Name of the evaluation

    - `EvaluationTags []string`

      Tags of the evaluation

    - `Object EvaluationGroupMemberObject`

      - `const EvaluationGroupMemberObjectEvaluationGroupMember EvaluationGroupMemberObject = "evaluation_group.member"`

  - `Metadata map[string, any]`

    Optional metadata key-value pairs

  - `Object EvaluationGroupObject`

    - `const EvaluationGroupObjectEvaluationGroup EvaluationGroupObject = "evaluation_group"`

  - `RowIdentifiers []EvaluationGroupRowIdentifier`

    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 EvaluationGroupRowIdentifierObject`

      - `const EvaluationGroupRowIdentifierObjectEvaluationGroupRowIdentifier EvaluationGroupRowIdentifierObject = "evaluation_group.row_identifier"`

### Example

```go
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)
}
```

#### 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(ctx, query) (*CursorPage[EvaluationGroup], error)`

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

  - `EndingBefore param.Field[string]`

  - `EvaluationID param.Field[string]`

    Filter to groups containing this evaluation ID

  - `IncludeDeleted param.Field[bool]`

  - `Limit param.Field[int64]`

  - `Name param.Field[string]`

  - `SortBy param.Field[string]`

  - `SortOrder param.Field[SortOrder]`

  - `StartingAfter param.Field[string]`

  - `Tags param.Field[[]string]`

  - `Views param.Field[[]EvaluationGroupViews]`

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

    - `const EvaluationGroupViewsMembers EvaluationGroupViews = "members"`

    - `const EvaluationGroupViewsRowIdentifiers EvaluationGroupViews = "row_identifiers"`

### Returns

- `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

  - `Name string`

    Name of the evaluation group

  - `Tags []string`

    The tags associated with the entity

  - `DeletedAt Time`

    When the group was soft-deleted

  - `Description string`

    Optional description

  - `Members []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

    - `CreatedAt Time`

      When this member was added to the group

    - `EvaluationGroupID string`

      ID of the evaluation group

    - `EvaluationID string`

      ID of the evaluation

    - `DeletedAt Time`

      When this membership was soft-deleted (if applicable)

    - `EvaluationCreatedAt Time`

      When the evaluation was created

    - `EvaluationName string`

      Name of the evaluation

    - `EvaluationTags []string`

      Tags of the evaluation

    - `Object EvaluationGroupMemberObject`

      - `const EvaluationGroupMemberObjectEvaluationGroupMember EvaluationGroupMemberObject = "evaluation_group.member"`

  - `Metadata map[string, any]`

    Optional metadata key-value pairs

  - `Object EvaluationGroupObject`

    - `const EvaluationGroupObjectEvaluationGroup EvaluationGroupObject = "evaluation_group"`

  - `RowIdentifiers []EvaluationGroupRowIdentifier`

    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 EvaluationGroupRowIdentifierObject`

      - `const EvaluationGroupRowIdentifierObjectEvaluationGroupRowIdentifier EvaluationGroupRowIdentifierObject = "evaluation_group.row_identifier"`

### Example

```go
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"),
  )
  page, err := client.EvaluationGroups.List(context.TODO(), sgpdev.EvaluationGroupListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### 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.Get(ctx, groupID, query) (*EvaluationGroup, error)`

**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 EvaluationGroupGetParams`

  - `IncludeDeleted param.Field[bool]`

  - `Views param.Field[[]EvaluationGroupViews]`

    Additional relationships to include; 'members' is always returned

    - `const EvaluationGroupViewsMembers EvaluationGroupViews = "members"`

    - `const EvaluationGroupViewsRowIdentifiers EvaluationGroupViews = "row_identifiers"`

### Returns

- `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

  - `Name string`

    Name of the evaluation group

  - `Tags []string`

    The tags associated with the entity

  - `DeletedAt Time`

    When the group was soft-deleted

  - `Description string`

    Optional description

  - `Members []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

    - `CreatedAt Time`

      When this member was added to the group

    - `EvaluationGroupID string`

      ID of the evaluation group

    - `EvaluationID string`

      ID of the evaluation

    - `DeletedAt Time`

      When this membership was soft-deleted (if applicable)

    - `EvaluationCreatedAt Time`

      When the evaluation was created

    - `EvaluationName string`

      Name of the evaluation

    - `EvaluationTags []string`

      Tags of the evaluation

    - `Object EvaluationGroupMemberObject`

      - `const EvaluationGroupMemberObjectEvaluationGroupMember EvaluationGroupMemberObject = "evaluation_group.member"`

  - `Metadata map[string, any]`

    Optional metadata key-value pairs

  - `Object EvaluationGroupObject`

    - `const EvaluationGroupObjectEvaluationGroup EvaluationGroupObject = "evaluation_group"`

  - `RowIdentifiers []EvaluationGroupRowIdentifier`

    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 EvaluationGroupRowIdentifierObject`

      - `const EvaluationGroupRowIdentifierObjectEvaluationGroupRowIdentifier EvaluationGroupRowIdentifierObject = "evaluation_group.row_identifier"`

### Example

```go
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.Get(
    context.TODO(),
    "group_id",
    sgpdev.EvaluationGroupGetParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, groupID, body) (*EvaluationGroup, error)`

**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 param.Field[string]`

    Optional description

  - `Metadata param.Field[map[string, any]]`

    Optional metadata key-value pairs

  - `Name param.Field[string]`

    Name of the evaluation group

  - `RowIdentifiers param.Field[map[string, string]]`

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

  - `Tags param.Field[[]string]`

    The tags associated with the entity

### Returns

- `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

  - `Name string`

    Name of the evaluation group

  - `Tags []string`

    The tags associated with the entity

  - `DeletedAt Time`

    When the group was soft-deleted

  - `Description string`

    Optional description

  - `Members []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

    - `CreatedAt Time`

      When this member was added to the group

    - `EvaluationGroupID string`

      ID of the evaluation group

    - `EvaluationID string`

      ID of the evaluation

    - `DeletedAt Time`

      When this membership was soft-deleted (if applicable)

    - `EvaluationCreatedAt Time`

      When the evaluation was created

    - `EvaluationName string`

      Name of the evaluation

    - `EvaluationTags []string`

      Tags of the evaluation

    - `Object EvaluationGroupMemberObject`

      - `const EvaluationGroupMemberObjectEvaluationGroupMember EvaluationGroupMemberObject = "evaluation_group.member"`

  - `Metadata map[string, any]`

    Optional metadata key-value pairs

  - `Object EvaluationGroupObject`

    - `const EvaluationGroupObjectEvaluationGroup EvaluationGroupObject = "evaluation_group"`

  - `RowIdentifiers []EvaluationGroupRowIdentifier`

    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 EvaluationGroupRowIdentifierObject`

      - `const EvaluationGroupRowIdentifierObjectEvaluationGroupRowIdentifier EvaluationGroupRowIdentifierObject = "evaluation_group.row_identifier"`

### Example

```go
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.Update(
    context.TODO(),
    "group_id",
    sgpdev.EvaluationGroupUpdateParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, groupID, body) (*EvaluationGroup, error)`

**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 param.Field[string]`

    Optional description

  - `EvaluationIDs param.Field[[]string]`

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

  - `Metadata param.Field[map[string, any]]`

    Optional metadata key-value pairs

  - `Name param.Field[string]`

    Name of the evaluation group

  - `RowIdentifiers param.Field[map[string, string]]`

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

  - `Tags param.Field[[]string]`

    The tags associated with the entity

### Returns

- `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

  - `Name string`

    Name of the evaluation group

  - `Tags []string`

    The tags associated with the entity

  - `DeletedAt Time`

    When the group was soft-deleted

  - `Description string`

    Optional description

  - `Members []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

    - `CreatedAt Time`

      When this member was added to the group

    - `EvaluationGroupID string`

      ID of the evaluation group

    - `EvaluationID string`

      ID of the evaluation

    - `DeletedAt Time`

      When this membership was soft-deleted (if applicable)

    - `EvaluationCreatedAt Time`

      When the evaluation was created

    - `EvaluationName string`

      Name of the evaluation

    - `EvaluationTags []string`

      Tags of the evaluation

    - `Object EvaluationGroupMemberObject`

      - `const EvaluationGroupMemberObjectEvaluationGroupMember EvaluationGroupMemberObject = "evaluation_group.member"`

  - `Metadata map[string, any]`

    Optional metadata key-value pairs

  - `Object EvaluationGroupObject`

    - `const EvaluationGroupObjectEvaluationGroup EvaluationGroupObject = "evaluation_group"`

  - `RowIdentifiers []EvaluationGroupRowIdentifier`

    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 EvaluationGroupRowIdentifierObject`

      - `const EvaluationGroupRowIdentifierObjectEvaluationGroupRowIdentifier EvaluationGroupRowIdentifierObject = "evaluation_group.row_identifier"`

### Example

```go
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.Replace(
    context.TODO(),
    "group_id",
    sgpdev.EvaluationGroupReplaceParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, groupID) (*EvaluationGroup, error)`

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

- `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

  - `Name string`

    Name of the evaluation group

  - `Tags []string`

    The tags associated with the entity

  - `DeletedAt Time`

    When the group was soft-deleted

  - `Description string`

    Optional description

  - `Members []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

    - `CreatedAt Time`

      When this member was added to the group

    - `EvaluationGroupID string`

      ID of the evaluation group

    - `EvaluationID string`

      ID of the evaluation

    - `DeletedAt Time`

      When this membership was soft-deleted (if applicable)

    - `EvaluationCreatedAt Time`

      When the evaluation was created

    - `EvaluationName string`

      Name of the evaluation

    - `EvaluationTags []string`

      Tags of the evaluation

    - `Object EvaluationGroupMemberObject`

      - `const EvaluationGroupMemberObjectEvaluationGroupMember EvaluationGroupMemberObject = "evaluation_group.member"`

  - `Metadata map[string, any]`

    Optional metadata key-value pairs

  - `Object EvaluationGroupObject`

    - `const EvaluationGroupObjectEvaluationGroup EvaluationGroupObject = "evaluation_group"`

  - `RowIdentifiers []EvaluationGroupRowIdentifier`

    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 EvaluationGroupRowIdentifierObject`

      - `const EvaluationGroupRowIdentifierObjectEvaluationGroupRowIdentifier EvaluationGroupRowIdentifierObject = "evaluation_group.row_identifier"`

### Example

```go
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.Archive(context.TODO(), "group_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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.GetSchema(ctx, groupID, query) (*EvaluationGroupGetSchemaResponse, error)`

**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 EvaluationGroupGetSchemaParams`

  - `IncludeArchived param.Field[bool]`

    Include archived items in schema analysis

### Returns

- `type EvaluationGroupGetSchemaResponse struct{…}`

  Per-evaluation schemas for all members of an evaluation group

  - `EvaluationGroupID string`

    The ID of the evaluation group

  - `EvaluationSchemas []EvaluationSchemaResponse`

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

    - `EvaluationID string`

      The ID of the evaluation

    - `Fields []EvaluationSchemaResponseField`

      List of all discovered fields, ordered alphabetically by field_name

      - `DataType string`

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

      - `FieldName string`

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

      - `ItemCount int64`

        Number of evaluation items containing this field

      - `Source string`

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

        - `const EvaluationSchemaResponseFieldSourceData EvaluationSchemaResponseFieldSource = "data"`

        - `const EvaluationSchemaResponseFieldSourceTaskResultCache EvaluationSchemaResponseFieldSource = "task_result_cache"`

      - `Object string`

        - `const EvaluationSchemaResponseFieldObjectFieldSchema EvaluationSchemaResponseFieldObject = "field_schema"`

    - `TotalItems int64`

      Total number of evaluation items

    - `IsSampled bool`

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

    - `Object EvaluationSchemaResponseObject`

      - `const EvaluationSchemaResponseObjectEvaluationSchema EvaluationSchemaResponseObject = "evaluation_schema"`

    - `SampleSize int64`

      Number of items sampled for schema inference, if applicable

  - `Object EvaluationGroupGetSchemaResponseObject`

    - `const EvaluationGroupGetSchemaResponseObjectEvaluationGroupSchema EvaluationGroupGetSchemaResponseObject = "evaluation_group_schema"`

### Example

```go
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.EvaluationGroups.GetSchema(
    context.TODO(),
    "group_id",
    sgpdev.EvaluationGroupGetSchemaParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.EvaluationGroupID)
}
```

#### 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

- `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

  - `Name string`

    Name of the evaluation group

  - `Tags []string`

    The tags associated with the entity

  - `DeletedAt Time`

    When the group was soft-deleted

  - `Description string`

    Optional description

  - `Members []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

    - `CreatedAt Time`

      When this member was added to the group

    - `EvaluationGroupID string`

      ID of the evaluation group

    - `EvaluationID string`

      ID of the evaluation

    - `DeletedAt Time`

      When this membership was soft-deleted (if applicable)

    - `EvaluationCreatedAt Time`

      When the evaluation was created

    - `EvaluationName string`

      Name of the evaluation

    - `EvaluationTags []string`

      Tags of the evaluation

    - `Object EvaluationGroupMemberObject`

      - `const EvaluationGroupMemberObjectEvaluationGroupMember EvaluationGroupMemberObject = "evaluation_group.member"`

  - `Metadata map[string, any]`

    Optional metadata key-value pairs

  - `Object EvaluationGroupObject`

    - `const EvaluationGroupObjectEvaluationGroup EvaluationGroupObject = "evaluation_group"`

  - `RowIdentifiers []EvaluationGroupRowIdentifier`

    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 EvaluationGroupRowIdentifierObject`

      - `const EvaluationGroupRowIdentifierObjectEvaluationGroupRowIdentifier EvaluationGroupRowIdentifierObject = "evaluation_group.row_identifier"`

### Evaluation Group Member

- `type EvaluationGroupMember struct{…}`

  Response model for evaluation group member

  - `ID string`

    Unique identifier of the member record

  - `CreatedAt Time`

    When this member was added to the group

  - `EvaluationGroupID string`

    ID of the evaluation group

  - `EvaluationID string`

    ID of the evaluation

  - `DeletedAt Time`

    When this membership was soft-deleted (if applicable)

  - `EvaluationCreatedAt Time`

    When the evaluation was created

  - `EvaluationName string`

    Name of the evaluation

  - `EvaluationTags []string`

    Tags of the evaluation

  - `Object EvaluationGroupMemberObject`

    - `const EvaluationGroupMemberObjectEvaluationGroupMember EvaluationGroupMemberObject = "evaluation_group.member"`

### Evaluation Group Row Identifier

- `type EvaluationGroupRowIdentifier struct{…}`

  Response model for evaluation group row identifier

  - `ColumnName string`

    Name of the column used as row identifier

  - `EvaluationID string`

    ID of the evaluation

  - `Object EvaluationGroupRowIdentifierObject`

    - `const EvaluationGroupRowIdentifierObjectEvaluationGroupRowIdentifier EvaluationGroupRowIdentifierObject = "evaluation_group.row_identifier"`

### Evaluation Group Views

- `type EvaluationGroupViews string`

  Views for evaluation group responses

  - `const EvaluationGroupViewsMembers EvaluationGroupViews = "members"`

  - `const EvaluationGroupViewsRowIdentifiers EvaluationGroupViews = "row_identifiers"`
