For the complete documentation index, see llms.txt. This page is also available as Markdown.

Report schedule

Particular report can be delivered to user's mailbox regularly.

Contains report schedule object description and API calls to interact with it.

schedule_entry object:

{
  "id": 1,
  "enabled": true,
  "parameters": {
    "period": "1m",
    "schedule": {
      "type": "weekdays",
      "weekdays": [1, 2, 3, 4, 5]
    },
    "report": {
      "trackers": [1],
      "title": "Title",
      "time_filter": {
        "from": "00:00:00",
        "to": "23:59:59",
        "weekdays": [1, 2, 3, 4, 5, 6, 7]
      },
      "geocoder": "yandex",
      "plugin": {
        "plugin_id": 4,
        "show_idle_duration": false
      },
      "include_places_in_address": true,
      "include_zones_in_address": true
    },
    "emails": ["email@example.ru"],
    "email_format": "pdf",
    "email_zip": false,
    "sending_time": "12:00:00"
  },
  "fire_time": "2014-09-05 00:00:00",
  "last_result": {
    "success": true,
    "id": 1
  }
}
  • id - int. Schedule id, ignored on create.

  • enabled - boolean. true if the scheduled report enabled.

  • report - object. Report parameters, same as in report/tracker/generate. Includes the optional include_places_in_address and include_zones_in_address flags (both boolean, default true) that toggle whether place (POI) and geofence (zone) names are prepended to addresses in the generated report.

  • period - string. Report period, "Xm" | "w" | "d" | "y".

  • emails - optional string array. List of emails.

  • email_format - enum. Can be "pdf" | "xls".

  • sending_time - optional string. Local time for sending reports, default "00:00:00", hourly granularity.

  • fire_time - optional string. Last schedule fire time, ignored on create/update.

  • last_result object with last report creation result.

    • id - int. An ID of generated report.

API actions

API path: /report/schedule.

create

Creates a new report schedule entry.

required sub-user rights: reports.

Parameters

name
description
type

schedule

Schedule object without fields "id", "fire_time", "last_result".

JSON object

Example

cURL

Response

  • id - int. An ID of the created schedule entry.

Errors

  • 217 - List contains nonexistent entities - if one or more of tracker IDs belong to nonexistent tracker (or to a tracker belonging to different user).

  • 222 - Plugin not found - if specified report plugin not found.

  • 236 - Feature unavailable due to.

delete

Deletes report schedule with the specified ID.

required sub-user rights: reports.

Parameters

name
description
type

schedule_id

ID of the report schedule to delete.

int

Examples

Response

Errors

  • 201 - Not found in the database - if there is no schedule with specified ID.

list

Get all report schedules belonging to user.

required sub-user rights: reports.

Parameters

Only API key hash.

Examples

Response

Errors

General types only.

update

Update existing report schedule.

required sub-user rights: reports.

Parameters

name
description
type

schedule

Schedule object without fields "fire_time", "last_result".

JSON object

Example

cURL

Response

Errors

  • 217 - List contains nonexistent entities - if one or more of tracker IDs belong to nonexistent tracker (or to a tracker belonging to different user).

  • 222 - Plugin not found - if specified report plugin not found.

  • 236 - Feature unavailable due to tariff restrictions - if device's tariff does not allow usage of reports.

Last updated

Was this helpful?