---
title: "Starts report creation"
method: POST
path: "/reports/v4"
tags: ["Reports"]
---

# Starts report creation

`POST /reports/v4`

Starts a report creation.

The request body contains a rule ID, and the report start and end time.
The report will be created based on the event data generated by the rule and devices associated to it.

The supported rule types are:
* dwelling
* detention
* utilization

> Note that both the report start and end timestamps must be earlier than the current time, 
> and no newly ingested data will be automatically added to the report after its creation.

The created report ID will be provided in the response.

The generated report is available for one week, after which it will expire 
and will need to be recreated.
If there is an already existing report matching the request parameters, its `reportId`
will be returned in the response and no new report will be generated.

## Request body

- object
  - `end` string, date-time, required — End date of the report period. The end date should be greater than the start date.
  - `ruleId` string, uuid, required — Rule ID of a dwelling or detention rule.
  - `start` string, date-time, required — Start date and time of the report period. When getting reports per interval, this timestamp defines the start of the interval day, week or month. For example, to make the report week start on Monday midnight 1st March 2021 in timezone UTC+1:00, set the `start` parameter to be `2021-02-28T23:00:00.000Z` (GMT). Now when getting interval reports, the first week would contain data between `2021-02-28T23:00:00.000Z` and `2021-03-07T23:00:00.000Z` (GMT).

## Response `200`

OK

The report already exists or a new report creation has been started successfully.
Use the `Gets reports` endpoint to check the report creation status and to query for actual reports.

- object
  - `reportId` string, required — Report ID

## Other responses

- `202` — Accepted The report creation job has been started successfully. Use the `Gets reports` endpoint to check the report creation status and to query for actual reports.
- `400` — Bad request The request object is in an incorrect format or has values that are invalid or out of range. If available, further error details are provided in the response body.
- `401` — Unauthorized The request did not provide correct authentication details
- `403` — Forbidden The account does not have the correct privileges
- `404` — Not Found The specified resource was not found

---

[API](https://skmtc.net/here/apis/tracking.md) · [All operations](https://skmtc.net/here/apis/tracking/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/here/tracking/revisions/efa162f7023c/schema)
