---
title: "Get a Document Template"
method: GET
path: "/api/v1/entities/workspaces/{workspaceId}/documentTemplates/{objectId}"
tags: ["Publisher Documents"]
---

# Get a Document Template

`GET /api/v1/entities/workspaces/{workspaceId}/documentTemplates/{objectId}`

## Request

- Base URL: `https://www.gooddata.ai`
- URL: `https://www.gooddata.ai/api/v1/entities/workspaces/{workspaceId}/documentTemplates/{objectId}`
- Auth: none declared

## Path parameters

- `workspaceId` string, required
- `objectId` string, required

## Query parameters

- `filter` string
- `include` string[]
- `metaInclude` string[]: Included meta objects

## Headers

- `X-GDC-VALIDATE-RELATIONS` boolean

## Response `200`

Request successfully processed

- JsonApiPublisherDocumentTemplateOutDocument
  - `data` JsonApiPublisherDocumentTemplateOut, required: JSON:API representation of documentTemplate entity.
    - `attributes` object, required
      - `areRelationsValid` boolean
      - `content` object, required: Content of the document template, validated on write. Missing page and section ids, and the `localIdentifier` of an attribute or date filter, are generated. An invalid value is a 400 whose `path` names the first invalid key, such as `content.pages[0].layout.type`. Maximum supported length is 250000 characters.
        - `attributeFilterConfigs` PublisherDocumentAttributeFilterConfig[]
          - `displayAsLabel` PublisherDocumentObjRef: A flat object reference.
            - `identifier` string, required
            - `type` 'insight' | 'displayForm' | 'dataSet' | 'measure' | 'attribute', required: sdk-model object type.
          - `localIdentifier` string, required
          - `mode` 'readonly' | 'hidden' | 'active'
          - `selectionType` 'list' | 'text' | 'listOrText'
        - `defaults` PublisherDocumentDefaults: Document-wide defaults.
          - `pageSize` 'widescreen': Page size of a page that sets none.
          - `period` union: The period the document covers, absolute or relative to today.
            - object: A period between two dates.
              - …
            - object: A period counted in granularity units from the current one, which is 0.
              - …
          - `takeaway` PublisherDocumentTakeawayDefaults: Takeaway settings every takeaway widget of the document uses.
            - `generation` PublisherDocumentTakeawayGeneration: How the copilot writes a takeaway.
              - …
        - `filters` PublisherDocumentFilter[]: Document filters, at most one per attribute display form or date dataset.
          - union: A filter in the dashboard filter grammar, wrapped in an object keyed by its kind.
            - object: Filters an attribute display form by a list of elements.
              - …
            - object: Filters an attribute display form by arbitrary values.
              - …
            - object: Filters an attribute display form by a text pattern.
              - …
            - object: Filters a date dataset. A document filter always names its `dataSet`.
              - …
            - object: Filters by the value of a measure.
              - …
        - `formatLocale` string: Locale for formatting dates in variables, charts and tables.
        - `locale` string: Locale of the text the product writes, such as `de-DE`.
        - `pages` PublisherDocumentPage[]: The document's pages, when it has no sections.
          - `filters` PublisherDocumentFilter[]: Page filters; stored, not applied.
            - union: A filter in the dashboard filter grammar, wrapped in an object keyed by its kind.
              - …
          - `id` string: Unique within the document. Required in the declarative layout. A REST write can omit it. The server then generates it.
          - `kind` 'cover' | 'section' | 'content': Editor hint.
          - `layout` union, required: A layout node: a row or column container, or a widget. The shape is selected by `type`.
            - object: Lays its children out left to right.
              - …
            - object: Lays its children out top to bottom.
              - …
            - object: The page's title, at most one per page.
              - …
            - object: A heading below the page title.
              - …
            - object: A block of markdown text.
              - …
            - object: An image from the theme or an https URL.
              - …
            - object: A saved visualization.
              - …
            - object: A generated takeaway, stored as markdown.
              - …
          - `notes` string: Speaker notes in markdown, never drawn.
          - `pageSize` 'widescreen'
          - `style` PublisherDocumentPageStyle: Style of a page; containers inherit its gap and text keys. Lengths are in canvas px.
            - `backgroundColor` string
            - `backgroundFit` 'cover' | 'contain' | 'fill' | 'tile'
            - `backgroundHorizontalAlign` 'left' | 'center' | 'right'
            - `backgroundImage` string
            - `backgroundImageOpacity` number, double
            - `backgroundOffset` number, double
            - `backgroundOffsetBottom` number, double
            - `backgroundOffsetLeft` number, double
            - `backgroundOffsetRight` number, double
            - `backgroundOffsetTop` number, double
            - `backgroundOpacity` number, double
            - `backgroundVerticalAlign` 'top' | 'center' | 'bottom'
            - `fontSize` number, double
            - `fontStyle` 'normal' | 'italic'
            - `fontWeight` number, double
            - `gap` union: A length, or `{theme.spacing.gap.<compact|normal|spacious>}`.
              - …
            - `horizontalAlign` 'left' | 'center' | 'right' | 'justify'
            - `letterSpacing` number, double
            - `lineHeight` number, double
            - `padding` union: A length, or `{theme.spacing.padding.<compact|normal|spacious>}`.
              - …
            - `paddingBottom` union: A length, or `{theme.spacing.padding.<compact|normal|spacious>}`.
              - …
            - `paddingLeft` union: A length, or `{theme.spacing.padding.<compact|normal|spacious>}`.
              - …
            - `paddingRight` union: A length, or `{theme.spacing.padding.<compact|normal|spacious>}`.
              - …
            - `paddingTop` union: A length, or `{theme.spacing.padding.<compact|normal|spacious>}`.
              - …
            - `textColor` string
            - `textOverflow` 'shrink' | 'clip' | 'ellipsis'
            - `textStyle` 'title' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'largeText' | 'normalText' | 'smallText'
            - `textTransform` 'none' | 'uppercase' | 'lowercase' | 'capitalize'
            - `verticalAlign` 'top' | 'center' | 'bottom'
          - `visible` boolean: `false` keeps the page out of the viewer, exports and page numbering. Default `true`.
        - `sections` PublisherDocumentSection[]: Groups of pages, when the document has no top-level pages.
          - `description` string
          - `id` string: Unique within the document. Required in the declarative layout. A REST write can omit it. The server then generates it.
          - `pages` PublisherDocumentPage[], required
            - `filters` PublisherDocumentFilter[]: Page filters; stored, not applied.
              - …
            - `id` string: Unique within the document. Required in the declarative layout. A REST write can omit it. The server then generates it.
            - `kind` 'cover' | 'section' | 'content': Editor hint.
            - `layout` union, required: A layout node: a row or column container, or a widget. The shape is selected by `type`.
              - …
            - `notes` string: Speaker notes in markdown, never drawn.
            - `pageSize` 'widescreen'
            - `style` PublisherDocumentPageStyle: Style of a page; containers inherit its gap and text keys. Lengths are in canvas px.
              - …
            - `visible` boolean: `false` keeps the page out of the viewer, exports and page numbering. Default `true`.
          - `title` string
        - `style` PublisherDocumentAreaStyle: Style of the area behind the pages. Lengths are in canvas px.
          - `backgroundColor` string
          - `backgroundFit` 'cover' | 'contain' | 'fill' | 'tile'
          - `backgroundHorizontalAlign` 'left' | 'center' | 'right'
          - `backgroundImage` string
          - `backgroundImageOpacity` number, double
          - `backgroundOffset` number, double
          - `backgroundOffsetBottom` number, double
          - `backgroundOffsetLeft` number, double
          - `backgroundOffsetRight` number, double
          - `backgroundOffsetTop` number, double
          - `backgroundOpacity` number, double
          - `backgroundVerticalAlign` 'top' | 'center' | 'bottom'
          - `gap` union: A length, or `{theme.spacing.gap.<compact|normal|spacious>}`.
            - number, double
            - string
      - `createdAt` string, date-time, nullable: Time of the entity creation.
      - `description` string
      - `modifiedAt` string, date-time, nullable: Time of the last entity modification.
      - `tags` string[]
      - `title` string, required
      - `version` string, required: Version of the content format.
    - `id` string, required: API identifier of an object
    - `meta` object
      - `origin` object
        - `originId` string, required: defines id of the workspace where the entity comes from
        - `originType` 'NATIVE' | 'PARENT', required: defines type of the origin of the entity
    - `relationships` object
      - `createdBy` object
        - `data` JsonApiUserIdentifierToOneLinkage, required: The \"type\" and \"id\" to non-empty members.
          - `id` string, required
          - `type` 'userIdentifier', required
      - `modifiedBy` object
        - `data` JsonApiUserIdentifierToOneLinkage, required: The \"type\" and \"id\" to non-empty members.
          - `id` string, required
          - `type` 'userIdentifier', required
    - `type` 'documentTemplate', required: Object type
  - `included` JsonApiUserIdentifierOutWithLinks[]: Included resources
    - `attributes` object
      - `email` string
      - `firstname` string
      - `lastname` string
    - `id` string, required: API identifier of an object
    - `type` 'userIdentifier', required: Object type
    - `links` ObjectLinks
      - `self` string, uri, required: A string containing the link's URL.
  - `links` ObjectLinks
    - `self` string, uri, required: A string containing the link's URL.
  - `meta` object
    - `restricted` RestrictedObject[]: References withheld from `included` because the caller may not view them. Their `relationships` entries are kept, so a client can render a placeholder instead of treating the reference as missing. Empty when the caller may view every reference in the payload; absent entirely when no object-level permissions apply to the request.
      - `id` string, required: Object identifier, unique within one workspace hierarchy.
      - `type` 'analyticalDashboard' | 'attribute' | 'attributeHierarchy' | 'computedAttribute' | 'fact' | 'label' | 'metric' | 'userDataFilter' | 'visualizationObject', required: JSON:API type of the restricted object. Matches the `type` of its entry in the resource's `relationships`.

---

[API](https://skmtc.dev/gooddata/apis/gooddata-cn-oapi-all-api.md) - [All operations](https://skmtc.dev/gooddata/apis/gooddata-cn-oapi-all-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gooddata/apis/gooddata-cn-oapi-all-api/revisions/c728ef303bfb?raw)
