## 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"
}
```
