reportTask

Version 2024-04-01

Overview

Get report task request. Returns the status of a report given the taskId.

Response

Return type ReportRequest

Arguments

ArgumentDescription
taskId (ID required)

Specifies the identifier to retrieve a report task.

Examples


Report Task

Request

query ReportTask {
  reportTask(taskId: "USER_EVENTS:23272b65-efac-412d-a8aa-ce8ef41bb448") {
    status
    requestTime
    lastUpdatedTime
    reportType
    taskId
  }
}

Response

{
  "data": {
    "reportTask": {
      "status": "STARTED",
      "requestTime": "2024-07-21T22:24:33.436Z",
      "lastUpdatedTime": "2024-07-21T22:24:33.692Z",
      "reportType": "USER_EVENTS",
      "taskId": "USER_EVENTS:23272b65-efac-412d-a8aa-ce8ef41bb448"
    }
  }
}

Task Id Does Not Exist

Request

query ReportTask {
  reportTask(taskId: "invalid-task-id") {
    status
    requestTime
    lastUpdatedTime
    reportType
    taskId
  }
}

Response

{
  "errors": [
    {
      "message": "Querying for an invalid or expired taskId",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": ["reportTask"],
      "extensions": {
        "classification": {
          "type": "ResourceNotFoundError",
          "errorType": "ResourceNotFoundException",
          "errorCode": 404
        }
      }
    }
  ],
  "data": {
    "reportTask": null
  }
}