---
title: "Generate ad-hoc report"
method: POST
path: "/reports/{reportId}/files"
tags: ["reports"]
---

# Generate ad-hoc report

`POST /reports/{reportId}/files`

Use this endpoint to generate ad-hoc report.
NOTE: Report files are generated asynchronously. Ensure the report file status is: COMPLETED before fetching the data. To check the report file status use the GET /reports/{reportId}/files/recent endpoint.

## Path parameters

- `reportId` string, required

## Response `200`

Successful response.

- ApiReportFileResponse
  - `reportFileId` string
  - `reportId` string
  - `reportFileStatus` 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED'
  - `scheduleType` 'AD_HOC' | 'SCHEDULED'
  - `schedulingDate` string, date-time
  - `generationDate` string, date-time
  - `requestorId` string
  - `accessGroupId` string
  - `systemRoleId` string
  - `rowEntityTypeId` string
  - `rowEntityInstanceId` string
  - `columns` ApiColumnResponse[]
    - `entityTypeId` string
    - `entityInstanceId` string
    - `dataPointId` string
    - `dataPointInstanceId` string
    - `dataPointInstanceName` string
    - `dataPointName` string
    - `dataPointType` 'ID' | 'DATE' | 'NUMBER' | 'TEXT' | 'ENUM' | 'BOOLEAN' | 'DECIMAL'
  - `filters` ApiFilterResponse[]
    - `column` ApiColumnResponse
      - `entityTypeId` string
      - `entityInstanceId` string
      - `dataPointId` string
      - `dataPointInstanceId` string
      - `dataPointInstanceName` string
      - `dataPointName` string
      - `dataPointType` 'ID' | 'DATE' | 'NUMBER' | 'TEXT' | 'ENUM' | 'BOOLEAN' | 'DECIMAL'
    - `dateRange` ApiDateRange
      - `from` string, date-time
      - `to` string, date-time
    - `datePeriod` ApiDatePeriod
      - `period` integer, required
      - `unit` 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS', required
      - `fullPeriod` boolean
    - `rowValues` ApiRowValues
      - `noneValue` boolean
      - `values` string[], required
    - `booleanValue` ApiBooleanValue
      - `value` boolean
  - `errorReason` 'UNKNOWN' | 'MISSING_ACCESS_GROUP' | 'ACCESS_GROUP_MISMATCH' | 'MISSING_SYSTEM_ROLE' | 'SYSTEM_ROLE_MISMATCH' | 'REPORTING_AREA_RESTRICTED' | 'INCORRECT_ACCESS_CONFIGURATION' | 'MISSING_REPORT_CREATOR_EMPLOYEE' | 'MAX_REPORT_FILE_SIZE_EXCEEDED'
  - `details` ApiReportFileDetailsResponse
    - `size` integer
    - `numberOfRows` integer

## Other responses

- `400` — Returned when the report ID or the identity is invalid or the report is already pending generation.
- `401` — Returned when a request was not authenticated.
- `403` — Returned when a caller is not authorized to perform the request.
- `404` — Returned when there is no report with the given ID.
- `409` — Returned when the report was modified concurrently.

---

[API](https://skmtc.net/smartrecruiters/apis/apply-api.md) · [All operations](https://skmtc.net/smartrecruiters/apis/apply-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smartrecruiters/apply-api/revisions/449bdc2516c9/schema)
