# Get analysis group

> GET https://api.nabrah.ai/api/ext/analysis/{analysis_group_id}

Group: Analysis groups. Page: https://www.nabrah.ai/en/docs/api-reference/analysis-groups/get-analysis-group

Returns the full definition of a single analysis group identified by `analysis_group_id`, including all of its `data_collections` (each with name, type, description, and constraints). Use this to inspect a group before updating it or to verify exactly what data is extracted/evaluated after a call.

## Where analysis_group_id comes from

- **Discovering the ID**: List groups with GET /api/ext/analysis, or use the `id` returned by POST /api/ext/analysis.

## Response shape

Returns a full AnalysisGroupResponse.

- **Data collections**: Each entry in `data_collections` includes its own `id` and the parent `analysis_group_id`, plus the `name`, `type`, `description`, and `constraints` that drive extraction/evaluation. Fields: `name`, `id`, `project_id`, `created_at`, `updated_at`, `data_collections`.

## Authorization

- `X-API-Key` (string, header, required): your workspace API key.

## Path parameters

- `analysis_group_id` (string, required): UUID of the analysis group to retrieve. Get this from GET /api/ext/analysis or from the create response (POST /api/ext/analysis).

## Response

### 200 Successful Response

Content type: `application/json`

```json
{
  "name": "string",
  "id": "00000000-0000-4000-8000-000000000000",
  "project_id": "00000000-0000-4000-8000-000000000000",
  "created_at": "2026-01-15T12:00:00.000Z",
  "updated_at": "2026-01-15T12:00:00.000Z",
  "data_collections": [
    {
      "name": "string",
      "type": "string",
      "id": "00000000-0000-4000-8000-000000000000",
      "analysis_group_id": "00000000-0000-4000-8000-000000000000",
      "description": "string",
      "constraints": {}
    }
  ]
}
```

### 422 Validation Error

Content type: `application/json`

```json
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}
```

## Request examples

### cURL

```bash
curl --request GET \
  --url 'https://api.nabrah.ai/api/ext/analysis/<analysis_group_id>' \
  --header 'X-API-Key: <your-api-key>'
```

### Python

```python
import requests

url = "https://api.nabrah.ai/api/ext/analysis/<analysis_group_id>"
headers = {"X-API-Key": "<your-api-key>"}

response = requests.get(url, headers=headers)
response.raise_for_status()
print(response.json())
```

### JavaScript

```javascript
const response = await fetch("https://api.nabrah.ai/api/ext/analysis/<analysis_group_id>", {
  method: "GET",
  headers: { "X-API-Key": "<your-api-key>" },
});

const data = await response.json();
console.log(data);
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.nabrah.ai/api/ext/analysis/<analysis_group_id>", nil)
	req.Header.Set("X-API-Key", "<your-api-key>")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	out, _ := io.ReadAll(res.Body)
	fmt.Println(string(out))
}
```
