# Query the details of the agent task template

Query the complete configuration of an agent task template.

```text
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/agent-task-templates/{template_id}
```

## Before you call this API

Configure the [regional API endpoint and authentication](https://omnifabric.cloudsigma.com/docs/developer/endpoints-and-authentication.html.md), and select the target workspace.

Obtain the template ID from the template list.

Set the operation-specific values used in the request:

- `$TEMPLATE_ID`: Template ID obtained from the template list.

## Request example

```bash
curl "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/agent-task-templates/$TEMPLATE_ID" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"
```

## Path parameters

| Parameters | Type | Is it required | Description |
| --- | --- | --- | --- |
| `workspace_id` | string | Yes | The target workspace ID. |
| `template_id` | string | Yes | The template ID to be queried. |

## Successful response

Returns `200` and template configuration on success.

```json
{
  "code": 0,
  "data": {"id": "template_01", "agent_id": "agent_01", "name": "摘要任务", "message_template": {}}
}
```

The response fields are as follows.

| Field | Type | Description |
| --- | --- | --- |
| `code` | integer | `0` on success. |
| `data.id` | string | Template ID. |
| `data.agent_id` | string | Associated agent ID. |
| `data.name` | string | Template name. |
| `data.message_template` | object | Task message template. |

## Error response

```json
{"code": 5, "message": "agent task template not found"}
```

### Common HTTP errors

```{list-table}
:header-rows: 1

* - HTTP status code
  - error code
  - Common causes
  - Recommended actions
* - `404`
  - `5`
  - The template does not exist or is not readable by the current identity.
  - Check template ID and workspace.
```

## Follow-up operations

When you need to modify the configuration, use `data.id` [Update agent task template](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/agents/task-templates/update-task-template.html.md).
