---
title: "Get a template's XML from the public template library"
type: reference
method: GET
path: /rest-api/template-catalog/xml.do
tag: "Templates"
---

# Get a template's XML from the public template library

`GET https://YOUR-NETWORK-DOMAIN/rest-api/template-catalog/xml.do`

Answers one library template's XML - the file the console's template Import takes - without installing it, so it can be handed to someone or imported elsewhere. The copy is checked against the library's catalog first. Requires the Templates create permission and the Templates view permission on all templates (the library reports what the whole network holds).

## Query params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `entryId` | string | yes | `catfish/catfish/mobile-catfish` | The library template's id, as the library list gives it |

## Responses

- `200` — success true, entryId, name, uniqueId, buildVersion, placementType, templateType and xml (the template XML as text)
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — No Templates create permission, or Templates view is not granted on all templates
- `404` — No such template in the library
- `503` — The template library is not set up on this network, could not be read, or its copy does not match its catalog

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/template-catalog/xml.do?entryId=catfish%2Fcatfish%2Fmobile-catfish' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

Source: https://epom.com/ad-server/docs/api/templates/get-template-catalog-xml