v1

latestOpenAPI 3.0.32026-08-061874701.5 MB
reports

Create report

Creates a new report from scratch in the specified destination, using the provided scope, columns and report definition.

post/reports

Request body

namestring required

Report name.

isSummaryReportboolean

It is true if the report is a sheet summary; otherwise it is a row report.

Example request

{
  "name": "Report name",
  "destination": {
    "destinationId": 5678,
    "destinationType": "folder"
  },
  "columns": [
    {
      "title": "Primary column",
      "type": "TEXT_NUMBER",
      "primary": true,
      "index": 0
    },
    {
      "title": "Sheet name",
      "type": "TEXT_NUMBER",
      "sheetNameColumn": true,
      "index": 1
    },
    {
      "title": "Created at",
      "type": "DATETIME",
      "systemColumnType": "CREATED_DATE",
      "index": 2
    },
    {
      "title": "Selected item",
      "type": "PICKLIST",
      "index": 3
    }
  ],
  "scope": [
    {
      "assetType": "sheet",
      "assetId": 1234
    }
  ],
  "reportDefinition": {
    "filters": {
      "operator": "AND",
      "criteria": [
        {
          "column": {
            "type": "DATETIME",
            "systemColumnType": "CREATED_DATE"
          },
          "operator": "GREATER_THAN",
          "values": [
            {
              "objectType": "DATE",
              "value": "2022-08-27"
            }
          ]
        }
      ]
    },
    "groupingCriteria": [
      {
        "column": {
          "title": "Selected item",
          "type": "PICKLIST"
        },
        "sortingDirection": "ASCENDING",
        "isExpanded": true
      }
    ],
    "summarizingCriteria": [
      {
        "column": {
          "type": "TEXT_NUMBER",
          "sheetNameColumn": true
        },
        "aggregationType": "COUNT"
      }
    ],
    "sortingCriteria": [
      {
        "column": {
          "type": "DATETIME",
          "systemColumnType": "CREATED_DATE"
        },
        "sortingDirection": "ASCENDING"
      }
    ]
  },
  "isSummaryReport": false
}

Response

Returns Result object containing a Report object corresponding to the newly created report.

message'PARTIAL_SUCCESS' | 'SUCCESS'

Message that indicates the outcome of the request. (One of SUCCESS or PARTIAL_SUCCESS.)

resultCode0 | 3
  • '0' Success
  • '3' Partial Success of Bulk Operation

Example response

{
  "message": "SUCCESS",
  "result": {
    "id": 987654321,
    "name": "Q2 Earnings",
    "permalink": "https://app.smartsheet.com/reports/c8gJxw87cXpRCvCC5PPw6jFhFRrf5r8PxCrxvW21",
    "columns": [
      {
        "type": "PICKLIST",
        "systemColumnType": "CREATED_BY",
        "autoNumberFormat": {
          "fill": "",
          "prefix": "",
          "startingNumber": 1,
          "suffix": ""
        }
      }
    ]
  }
}