How can we help?

Searching:

0 results found

Reports/[id]/subscribe

POST /odata/Reports/[id]/subscribe

Description

Subscribes the specified Users(s) to automatically receive one or more periodic Axonize reports by email (as specified by the report id(s) in the request). The ID of a report is returned in the response to the Reports/Post and Reports/Get endpoints.

See the following for request and response details ‒

See Also

Request ‒ Reports/[id]/subscribe

Property Type Description Mandatory
id String This is the unique identifier automatically assigned by Axonize when a Report is created. This id is returned in the response of Reports/Post. Y
subscribers Array of Objects Subscribers contains an array of subscribers. Each subscriber contains the following –
subscribers/userId String An array of user Ids to subscribe to the specified report. UserIds are returned in the Users/Post response.
subscribers/cron String Specifies the schedule for sending this Report to the subscribed Users. This schedule is defined in Cron format, which is a standard for defining the timing and frequency of actions.
subscribers/timezone String The default timezone of the data.

https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

“timezone”:”Asia/Jerusalem”

subscribers/filetype String The format of the report to be sent. The default is PDF. CSV and XLSX (Excel) are also supported.

Example JSON Reports/[id]/subscribe Request

curl -X POST \

https://api.stg.axonize.com/odata/reports/5b682f64e5cdcf20a87788d8/subscribe/\

-H ‘Content-Type: application/json’ \

-H ‘Authorization: Token’ \

-H ‘appId: be517433-c4b8-4748-9258-1b1234567890’ \

-d ‘{“subscriber”:{“userId”:”59312b3cc9f8be1112345678″,”cron”:”27 14 * * *”,”fileType”:”pdf”}}’

Response ‒ Reports/[id]/subscribe

All the same properties in the request are returned in the response.

Example JSON Reports/[id]/subscribe Response

Status 200 – OK