Reports

Post Report Template

post/api/v1/entities/workspaces/{workspaceId}/reportTemplates

Request

  • Base URL
    https://www.gooddata.ai
  • Auth
    none declared

Path parameters

workspaceIdstring required

Query parameters

includestring[]

Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter "ALL" is present, all possible includes are used (include=ALL).

WARNING: Individual include types (collection, relationship or ALL) cannot be combined together.

metaIncludestring[]

Included meta objects

Include Meta objects.

Request body

Example request

{
  "data": {
    "attributes": {
      "content": {
        "pages": [
          {
            "format": "widescreen",
            "kind": "cover",
            "layout": {
              "children": [
                {
                  "slotId": "cover_coverTitle",
                  "type": "slotRef",
                  "weight": 2
                },
                {
                  "slotId": "cover_coverSubtitle",
                  "type": "slotRef",
                  "weight": 1
                },
                {
                  "children": [
                    {
                      "slotId": "cover_footerLogo",
                      "type": "slotRef",
                      "weight": 1
                    },
                    {
                      "slotId": "cover_footerPageNumber",
                      "type": "slotRef",
                      "weight": 8
                    }
                  ],
                  "direction": "row",
                  "type": "section",
                  "weight": 1
                }
              ],
              "direction": "column",
              "type": "section"
            },
            "localIdentifier": "cover",
            "slots": [
              {
                "localIdentifier": "cover_coverTitle",
                "source": {
                  "content": "{reportName}",
                  "type": "static"
                },
                "style": {
                  "type": "h1"
                },
                "type": "heading"
              },
              {
                "localIdentifier": "cover_coverSubtitle",
                "source": {
                  "content": "{regionName} · {periodStart} – {periodEnd}",
                  "type": "static"
                },
                "style": {
                  "type": "h3"
                },
                "type": "heading"
              },
              {
                "altText": "Logo",
                "fit": "contain",
                "localIdentifier": "cover_footerLogo",
                "source": {
                  "type": "url",
                  "url": "{logo}"
                },
                "style": {
                  "horizontalAlign": "start",
                  "verticalAlign": "end"
                },
                "type": "image"
              },
              {
                "localIdentifier": "cover_footerPageNumber",
                "source": {
                  "content": "{currentPageNumber} / {totalPages}",
                  "type": "static"
                },
                "style": {
                  "horizontalAlign": "end",
                  "type": "largeText",
                  "verticalAlign": "end"
                },
                "type": "paragraph"
              }
            ]
          },
          {
            "format": "widescreen",
            "kind": "content",
            "layout": {
              "children": [
                {
                  "slotId": "overview_pageTitle",
                  "type": "slotRef",
                  "weight": 2
                },
                {
                  "children": [
                    {
                      "children": [
                        {
                          "slotId": "overview_widget1",
                          "type": "slotRef"
                        },
                        {
                          "slotId": "overview_widget2",
                          "type": "slotRef"
                        }
                      ],
                      "direction": "row",
                      "type": "section",
                      "weight": 2
                    },
                    {
                      "slotId": "overview_summary",
                      "type": "slotRef",
                      "weight": 1
                    }
                  ],
                  "direction": "row",
                  "type": "section",
                  "weight": 9
                },
                {
                  "children": [
                    {
                      "slotId": "overview_footerLogo",
                      "type": "slotRef",
                      "weight": 1
                    },
                    {
                      "slotId": "overview_footerPageNumber",
                      "type": "slotRef",
                      "weight": 8
                    }
                  ],
                  "direction": "row",
                  "type": "section",
                  "weight": 1
                }
              ],
              "direction": "column",
              "type": "section"
            },
            "localIdentifier": "overview",
            "slots": [
              {
                "localIdentifier": "overview_pageTitle",
                "source": {
                  "content": "Sales overview",
                  "type": "static"
                },
                "style": {
                  "type": "h1"
                },
                "type": "heading"
              },
              {
                "dateDataSet": {
                  "identifier": "date",
                  "type": "dataSet"
                },
                "insight": {
                  "identifier": "revenue_by_month",
                  "type": "insight"
                },
                "localIdentifier": "overview_widget1",
                "showTitle": true,
                "type": "visualization"
              },
              {
                "dateDataSet": {
                  "identifier": "date",
                  "type": "dataSet"
                },
                "insight": {
                  "identifier": "orders_by_region",
                  "type": "insight"
                },
                "localIdentifier": "overview_widget2",
                "showTitle": true,
                "type": "visualization"
              },
              {
                "localIdentifier": "overview_summary",
                "placeholder": {
                  "hint": "Add a summary"
                },
                "style": {
                  "type": "normalText"
                },
                "type": "paragraph"
              },
              {
                "altText": "Logo",
                "fit": "contain",
                "localIdentifier": "overview_footerLogo",
                "source": {
                  "type": "url",
                  "url": "{logo}"
                },
                "style": {
                  "horizontalAlign": "start",
                  "verticalAlign": "end"
                },
                "type": "image"
              },
              {
                "localIdentifier": "overview_footerPageNumber",
                "source": {
                  "content": "{currentPageNumber} / {totalPages}",
                  "type": "static"
                },
                "style": {
                  "horizontalAlign": "end",
                  "type": "largeText",
                  "verticalAlign": "end"
                },
                "type": "paragraph"
              }
            ]
          }
        ],
        "variables": [
          {
            "defaultValue": "All regions",
            "description": "Region the report is prepared for",
            "name": "regionName",
            "title": "Region"
          }
        ],
        "version": "1"
      }
    },
    "id": "id1",
    "type": "reportTemplate"
  }
}

Response

Request successfully processed

Example response

{
  "data": {
    "attributes": {
      "content": {
        "pages": [
          {
            "format": "widescreen",
            "kind": "cover",
            "layout": {
              "children": [
                {
                  "slotId": "cover_coverTitle",
                  "type": "slotRef",
                  "weight": 2
                },
                {
                  "slotId": "cover_coverSubtitle",
                  "type": "slotRef",
                  "weight": 1
                },
                {
                  "children": [
                    {
                      "slotId": "cover_footerLogo",
                      "type": "slotRef",
                      "weight": 1
                    },
                    {
                      "slotId": "cover_footerPageNumber",
                      "type": "slotRef",
                      "weight": 8
                    }
                  ],
                  "direction": "row",
                  "type": "section",
                  "weight": 1
                }
              ],
              "direction": "column",
              "type": "section"
            },
            "localIdentifier": "cover",
            "slots": [
              {
                "localIdentifier": "cover_coverTitle",
                "source": {
                  "content": "{reportName}",
                  "type": "static"
                },
                "style": {
                  "type": "h1"
                },
                "type": "heading"
              },
              {
                "localIdentifier": "cover_coverSubtitle",
                "source": {
                  "content": "{regionName} · {periodStart} – {periodEnd}",
                  "type": "static"
                },
                "style": {
                  "type": "h3"
                },
                "type": "heading"
              },
              {
                "altText": "Logo",
                "fit": "contain",
                "localIdentifier": "cover_footerLogo",
                "source": {
                  "type": "url",
                  "url": "{logo}"
                },
                "style": {
                  "horizontalAlign": "start",
                  "verticalAlign": "end"
                },
                "type": "image"
              },
              {
                "localIdentifier": "cover_footerPageNumber",
                "source": {
                  "content": "{currentPageNumber} / {totalPages}",
                  "type": "static"
                },
                "style": {
                  "horizontalAlign": "end",
                  "type": "largeText",
                  "verticalAlign": "end"
                },
                "type": "paragraph"
              }
            ]
          },
          {
            "format": "widescreen",
            "kind": "content",
            "layout": {
              "children": [
                {
                  "slotId": "overview_pageTitle",
                  "type": "slotRef",
                  "weight": 2
                },
                {
                  "children": [
                    {
                      "children": [
                        {
                          "slotId": "overview_widget1",
                          "type": "slotRef"
                        },
                        {
                          "slotId": "overview_widget2",
                          "type": "slotRef"
                        }
                      ],
                      "direction": "row",
                      "type": "section",
                      "weight": 2
                    },
                    {
                      "slotId": "overview_summary",
                      "type": "slotRef",
                      "weight": 1
                    }
                  ],
                  "direction": "row",
                  "type": "section",
                  "weight": 9
                },
                {
                  "children": [
                    {
                      "slotId": "overview_footerLogo",
                      "type": "slotRef",
                      "weight": 1
                    },
                    {
                      "slotId": "overview_footerPageNumber",
                      "type": "slotRef",
                      "weight": 8
                    }
                  ],
                  "direction": "row",
                  "type": "section",
                  "weight": 1
                }
              ],
              "direction": "column",
              "type": "section"
            },
            "localIdentifier": "overview",
            "slots": [
              {
                "localIdentifier": "overview_pageTitle",
                "source": {
                  "content": "Sales overview",
                  "type": "static"
                },
                "style": {
                  "type": "h1"
                },
                "type": "heading"
              },
              {
                "dateDataSet": {
                  "identifier": "date",
                  "type": "dataSet"
                },
                "insight": {
                  "identifier": "revenue_by_month",
                  "type": "insight"
                },
                "localIdentifier": "overview_widget1",
                "showTitle": true,
                "type": "visualization"
              },
              {
                "dateDataSet": {
                  "identifier": "date",
                  "type": "dataSet"
                },
                "insight": {
                  "identifier": "orders_by_region",
                  "type": "insight"
                },
                "localIdentifier": "overview_widget2",
                "showTitle": true,
                "type": "visualization"
              },
              {
                "localIdentifier": "overview_summary",
                "placeholder": {
                  "hint": "Add a summary"
                },
                "style": {
                  "type": "normalText"
                },
                "type": "paragraph"
              },
              {
                "altText": "Logo",
                "fit": "contain",
                "localIdentifier": "overview_footerLogo",
                "source": {
                  "type": "url",
                  "url": "{logo}"
                },
                "style": {
                  "horizontalAlign": "start",
                  "verticalAlign": "end"
                },
                "type": "image"
              },
              {
                "localIdentifier": "overview_footerPageNumber",
                "source": {
                  "content": "{currentPageNumber} / {totalPages}",
                  "type": "static"
                },
                "style": {
                  "horizontalAlign": "end",
                  "type": "largeText",
                  "verticalAlign": "end"
                },
                "type": "paragraph"
              }
            ]
          }
        ],
        "variables": [
          {
            "defaultValue": "All regions",
            "description": "Region the report is prepared for",
            "name": "regionName",
            "title": "Region"
          }
        ],
        "version": "1"
      },
      "createdAt": "2023-07-20 12:30",
      "modifiedAt": "2023-07-20 12:30"
    },
    "id": "id1",
    "type": "reportTemplate"
  },
  "included": [
    {
      "id": "id1",
      "type": "userIdentifier"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.