Get Report Failed - Shared report via API

Hi,

I’m looking to create a shared report via the API. All is looking OK in testing, the report is being created but when I try and open it, it reports an error ‘Get report Failed’

I’ve created the report manually with the same parameters (project and Start-end times) and this works OK.

I’m not sure on how to troubleshoot this with any more information. Here’s the JSON for creating the report

{
  "filter": {
    "projects": {
      "contains": "CONTAINS",
      "ids": ["12349665f202ee63efd123455a"]
    },
    "users": {
      "contains": "CONTAINS",
      "ids": []
    },
    "dateFormat": "YYYY-MM-DD",
    "dateRangeStart": "2023-11-15T23:59:59.999Z",
    "dateRangeEnd": "2023-12-07T23:59:59.999Z",
    "timeZone": "Europe/London",
    "detailedFilter": {
      "options": {
        "totals": "CALCULATE"
      }
    },
    "exportType": "PDF"
  },
  "isPublic": false,
  "name": "TEST 3 Project Time Report",
  "type": "DETAILED"
}

Hi Jason,

Removing the “exportType” parameter would allow you to create the shared report.

,
    "exportType": "PDF"

Here’s an edit of your call:

{
  "filter": {
    "projects": {
      "contains": "CONTAINS",
      "ids": ["12349665f202ee63efd123455a"]
    },
    "users": {
      "contains": "CONTAINS",
      "ids": []
    },
    "dateFormat": "YYYY-MM-DD",
    "dateRangeStart": "2023-11-15T23:59:59.999Z",
    "dateRangeEnd": "2023-12-07T23:59:59.999Z",
    "timeZone": "Europe/London",
    "detailedFilter": {
      "options": {
        "totals": "CALCULATE"
      }
    }
  },
  "isPublic": false,
  "name": "TEST 3 Project Time Report",
  "type": "DETAILED"
}

Cheers!

1 Like

Yep! that did it. Thanks’ so much for your help :pray: