Config API Version 2 Scheduled Reports Config
Introduction
Scheduled reports config is a config for reports which are sent via emails
Scheduled Report Properties
These are the properties that can be accessed using the API.
- description (string) - user defined description
- reportName (string) - user-friendly report name
- reportApp (string) - report app, currently only “portal1”, would be extended in future
- reportSource (string) - This should contain the relative URL path and query string (no domain), e.g. /reports/v2/metrics/channels?igrp=NNN&…
- frequencyType (string) - One of available frequency types i.e. Daily, Weekly or Monthly
- runDay (int) - Day when report should be run. For Weekly that is 1 to 7 (Sun-Sat), for Monthly that is 1 to 28, for Daily should be 0 or omitted completely
- runHour (int) - Hour to run, should be from 0 to 23
- recipients (string) - Comma-separated list of emails, which should receive report
URL Path Params
- IGRP SPECIFIER (int) - Installation ID.
- CONFIG SPECIFIER (int) - Scheduled Report Config ID.
List Scheduled Reports
Request:
GET /config/v2/igrps/{IGRP SPECIFIER}/scheduledReports
Response:
List of scheduled reports
HTTP 200 - OK
{"reportConfigId":"1","description":"123","reportApp":"portal1","reportSource":"\/123\/123","frequencyType":"Daily","runDay":"0","runHour":"12","igrp":"1","recipients":"bill@mail.com,mail@bill.com"}
{"reportConfigId":"3","description":"123","reportApp":"portal1","reportSource":"\/123\/123","frequencyType":"Monthly","runDay":"25","runHour":"12","igrp":"1","recipients":"bill@mail.com,mail@bill.com"}
Create Scheduled Report
Request:
POST /config/v2/igrps/{IGRP SPECIFIER}/scheduledReports
POST Params
- description (string) - user defined description
- reportName (string) - user-friendly report name
- reportApp (string) - user-friendly report name
- reportSource (string) - This should contain the relative URL path and query string (no domain), e.g. /reports/v2/metrics/channels?igrp=NNN&…
- frequencyType (string) - One of available frequency types i.e. Daily, Weekly or Monthly
- runDay (int) - Day when report should be run. For Weekly that is 1 to 7 (Sun-Sat), for Monthly that is 1 to 28, for Daily should be 0 or omitted completely
- runHour (int) - Hour to run, should be from 0 to 23
- recipients (string) - Comma-separated list of emails, which should receive report
Response:
ID of created instance
HTTP 201 - CREATED
{"id":"1"}
Update Scheduled Report
Request:
POST /config/v2/igrps/{IGRP SPECIFIER}/scheduledReports/{CONFIG SPECIFIER}
POST Params
All params are optional
- description (string) - user defined description
- reportName (string) - user-friendly report name
- reportApp (string) - user-friendly report name
- reportSource (string) - This should contain the relative URL path and query string (no domain), e.g. /reports/v2/metrics/channels?igrp=NNN&…
- frequencyType (string) - One of available frequency types i.e. Daily, Weekly or Monthly
- runDay (int) - Day when report should be run. For Weekly that is 1 to 7 (Sun-Sat), for Monthly that is 1 to 28, for Daily should be 0 or omitted completely
- runHour (int) - Hour to run, should be from 0 to 23
- recipients (string) - Comma-separated list of emails, which should receive report
Response:
HTTP 204 - NO CONTENT
Read Scheduled Report
Request:
GET /config/v2/igrps/{IGRP SPECIFIER}/scheduledReports/{CONFIG SPECIFIER}
Response:
Scheduled Report
HTTP 200 - OK
{"reportConfigId":"3","description":"123","reportApp":"portal1","reportSource":"\/123\/123","frequencyType":"Monthly","runDay":"25","runHour":"12","igrp":"1","recipients":"bill@mail.com,mail@bill.com"}
Delete Scheduled Report
Request:
DELETE /config/v2/igrps/{IGRP SPECIFIER}/scheduledReports/{CONFIG SPECIFIER}
Response:
HTTP 204 - NO CONTENT