---
title: "Download SAML SP metadata XML for a site"
method: GET
path: "/api/v1/dotauth/saml/metadata/{hostId}"
tags: ["dotAuth"]
---

# Download SAML SP metadata XML for a site

`GET /api/v1/dotauth/saml/metadata/{hostId}`

## Request

- Base URL: `https://docs.anzworldline-solutions.com.au`
- URL: `https://docs.anzworldline-solutions.com.au/api/v1/dotauth/saml/metadata/{hostId}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/docs/api/v1/dotauth/saml/metadata/:hostId/get.ts> (a function with typed inputs; its response is checked against the schema)

Generates SAML Service Provider metadata XML for the given site. For inherited configs the certificate comes from the SYSTEM_HOST row, but the entity ID and ACS URL use the target site's hostname so the IdP can distinguish per-site requests.

## Path parameters

- `hostId` string, required

## Response `200`

SP metadata XML

## Other responses

- `401`: Authentication required
- `404`: No SAML configuration found for this site
- `500`: Internal server error

## Changes

- **2026-10-30** `4fd8e917d458`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/changes/api/v1/dotauth/saml/metadata/:hostId/get.md)

---

[API](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api.md) - [All operations](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/revisions/4fd8e917d458?raw)
