# List template nodes

> operationId: `listTemplateNodes`


## Request

Lists the nodes of a template. The items[].id field is the stable ID used for editing. A parentId of null means the root. The path field is a JSON Pointer relative to the workflow; do not use path or an array index instead of nodeId for edits. The node field includes its blocks, and the list also lists the child nodes separately. Before you make changes, read the template details to get the ETag. If the version has changed, locate the nodes again.

- **Prerequisites**: You have identified a template that you can read.
- **Authentication**: Same as the rest of the Local API; see [Authentication](/api-reference/getting-started/authentication). Resources belong to the current account/team data scope.
- **Side effects**: None. This call doesn't write business data.
- **Completion signal**: A 200 returns the node list in depth-first order and the templateVersion.
- **Retries**: Read-only calls can be retried. On 429 or 503, back off as indicated by Retry-After.


### Endpoint

```http
GET /api/rpa/browser/v1/templates/{templateId}/nodes
```

Local API: `http://127.0.0.1:<port>/api/rpa/browser/v1/templates/{templateId}/nodes`. Use the port configured in the client.

### Headers

| Parameter | Type | Required | Description and constraints |
|  --- | --- | --- | --- |
| `Authorization` | string | When Local API authentication is enabled | See [Authentication](/api-reference/getting-started/authentication). |


### Path parameters

| Parameter | Type | Required | Description and constraints |
|  --- | --- | --- | --- |
| `templateId` | string | Yes | Target template ID (the cloud ID of the template under Custom Templates in the desktop client, as a numeric string). Min length 1; max length 128. |


### Query parameters

None.

### Request body

No request body.

### Request example

This is a documentation example; it was not sent to a live client. Set `RPA_BASE_URL` as described in [API conventions](/browser-rpa/api/common). Resource variables, the catalog revision, and ETags come from actual responses.

```bash
curl -i -X GET "${RPA_BASE_URL}/templates/${RPA_TEMPLATE_ID}/nodes"
```

## Response

### 200

A 200 returns the node list in depth-first order and the templateVersion.

Body: `application/json`. The top-level `data` uses the model below. For `meta`, see [Metadata](/browser-rpa/api/data-types#metadata).

| Field | Type | Required | Description and constraints |
|  --- | --- | --- | --- |
| `items` | array<object> | Yes | Array of items on the current page or in the current resource. |
| `templateVersion` | integer | Yes | Template version at the time this node tree was queried. Minimum 1. |


**`items[]` fields**

| Field | Type | Required | Description and constraints |
|  --- | --- | --- | --- |
| `items[].id` | string | Yes | Unique ID of the resource or node. Take it from a previous response; don't guess it. Min length 1; max length 128. |
| `items[].parentId` | string or null | Yes | ID of the target parent container; null means the root. |
| `items[].path` | string | Yes | JSON Pointer relative to the workflow root, such as /nodes/1. It is not the issue.path of a request body. |
| `items[].node` | [Workflow structure](/browser-rpa/api/workflow) / [JSON Schema](/browser-rpa/local-api#local-machine-readable-contract) | Yes | Complete node object, including any blocks that need to be kept. |


### Response example

All IDs, timestamps, hashes, and run results are sample data. They don't indicate that the sample was executed.

```json
{
  "data": {
    "items": [
      {
        "id": "start",
        "parentId": null,
        "path": "/nodes/0",
        "node": {
          "id": "start",
          "type": "start"
        }
      },
      {
        "id": "visit",
        "parentId": null,
        "path": "/nodes/1",
        "node": {
          "id": "visit",
          "type": "browser_gotoUrl",
          "data": {
            "browserAction": "gotoUrl",
            "browserUi": {
              "inputs": {
                "url": "${targetUrl}",
                "postWaitMs": 500
              }
            }
          }
        }
      },
      {
        "id": "url_result",
        "parentId": null,
        "path": "/nodes/2",
        "node": {
          "id": "url_result",
          "type": "browser_getUrl",
          "data": {
            "browserAction": "getUrl",
            "browserUi": {
              "inputs": {
                "type": "href"
              }
            }
          }
        }
      },
      {
        "id": "end",
        "parentId": null,
        "path": "/nodes/3",
        "node": {
          "id": "end",
          "type": "end",
          "data": {
            "inputsValues": {
              "status": {
                "type": "constant",
                "content": "success"
              },
              "message": {
                "type": "ref",
                "content": [
                  "url_result",
                  "data",
                  "value"
                ]
              }
            }
          }
        }
      }
    ],
    "templateVersion": 1
  },
  "meta": {
    "requestId": "7d498f20-7bab-4e59-9b05-88daf51230e9",
    "catalogRevision": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  }
}
```

### Error responses

For common 400/401/403/404/429/5xx errors and failure fields, see [Errors and recovery](/browser-rpa/api/common#errors-and-recovery). Error response example (403):

```json
{
  "error": {
    "code": "RPA_PERMISSION_DENIED",
    "message": "The request Host or Origin is not allowed, or the current identity can't access the target environment",
    "retryable": false,
    "issues": [],
    "details": null
  },
  "meta": {
    "requestId": "7d498f20-7bab-4e59-9b05-88daf51230e9",
    "catalogRevision": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  }
}
```

## Related

[Local API reference](/browser-rpa/local-api) · [API conventions](/browser-rpa/api/common) · [Data models](/browser-rpa/api/data-types) · [Workflow structure](/browser-rpa/api/workflow) · [Quickstart](/browser-rpa/quickstart)