List Reports
This endpoint returns a listing of all reports
Query
GET /api/1.0/reports
| No parameters |
|---|
Response
| HTTP Status | Response |
|---|---|
| 200 OK | Output example: |
| 400 BAD_REQUEST |
|
| 401 UNAUTHORIZED |
|
| 403 FORBIDDEN |
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X GET http://localhost:9090/api/1.0/reports
View Reports
This endpoint returns report details for a given report id
Query
GET /api/1.0/reports/<objectId>
| Parameter | Comments |
|---|---|
| objectId | Report id to view Report |
Response
| HTTP Status | Response |
|---|---|
| 200 OK | Output example: |
| 400 BAD_REQUEST |
|
| 401 UNAUTHORIZED |
|
| 403 FORBIDDEN |
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X GET http://localhost:9090/api/1.0/reports/70
Create Report
Query
POST /api/1.0/reports/
| No parameters |
|---|
POST JSON payload:
Sample with "Run As" (reportAs field is id of other user), and with content filters (reportContentFilters field). |
Response
| HTTP Status | Response |
|---|---|
| 200 OK | Output created entity |
| 400 BAD REQUEST |
|
| 401 UNAUTHORIZED |
|
| 403 FORBIDDEN |
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X POST -d '{"startTime":null,"frequency":1,"frequencyType":"days","subject":"subj1","name":"rep2022-03-22-17-11","text":"<span>Email report</span><br><br>Knowi Team<br>support@knowi.com","from":null,"sendTo":"some@some.com","cc":null,"bcc":null,"dashIds":[111012],"datasets":"[]","reportAs":10222,"scheduleId":90,"reportContentFilters":"[{\"fieldName\":\"param1\",\"type\":\"java.lang.String\",\"values\":[\"val1\"],\"operator\":\"Equals\"},{\"fieldName\":\"param2\",\"type\":\"java.lang.String\",\"values\":[\"val2\"],\"operator\":\"Equals\"}]","webhooks":[],"slacks":[],"teams":[],"executionReport":null,"nlpQuery":null,"contextPath":null,"nlpDatasetId":null,"datasetReports":null,"reportContentFiltersArr":null,"dashboards":null,"testRun":false}' http://localhost:9090/api/1.0/reports
Edit Report
Query
PUT /api/1.0/reports
| No parameters |
|---|
PUT JSON payload:
Sample with "Run As" (reportAs field is id of other user), and with content filters (reportContentFilters field). |
Response
| HTTP Status | Response |
|---|---|
| 200 OK | Output edited entity |
| 400 BAD REQUEST |
|
| 401 UNAUTHORIZED |
|
| 403 FORBIDDEN |
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X PUT -d '{"emailReportId":68,"startTime":null,"frequency":1,"frequencyType":"days","subject":"subj1","name":"rep1","text":"<span>Email report</span><br><br>Knowi Team<br>support@knowi.com","from":null,"sendTo":"some@some.com","cc":null,"bcc":null,"dashIds":[111012],"datasets":"[]","reportAs":10222,"scheduleId":90,"reportContentFilters":"[{\"fieldName\":\"param1\",\"type\":\"java.lang.String\",\"values\":[\"val1\"],\"operator\":\"Equals\"},{\"fieldName\":\"param2\",\"type\":\"java.lang.String\",\"values\":[\"val2\"],\"operator\":\"Equals\"}]","webhooks":[],"slacks":[],"teams":[],"executionReport":null,"nlpQuery":null,"contextPath":null,"nlpDatasetId":null,"datasetReports":null,"reportContentFiltersArr":null,"dashboards":null,"testRun":false}' http://localhost:9090/api/1.0/reportsRun Report
Query
POST /api/1.0/reports/run
| No parameters |
|---|
POST JSON payload:
Sample with "Run As" (reportAs field is id of other user), and with content filters (reportContentFilters field). |
Response
| HTTP Status | Response |
|---|---|
| 200 OK | Output created entity |
| 400 BAD REQUEST |
|
| 401 UNAUTHORIZED |
|
| 403 FORBIDDEN |
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X POST -d '{"subject":"subj1","name":"rep2022-11-22-15-54","text":"<span>Email report</span><br><br>Knowi Team<br>support@knowi.com","from":null,"sendTo":"some@some.com","cc":null,"bcc":null,"dashIds":[111012],"datasets":"[]","reportAs":10222,"scheduleId":90,"reportContentFilters":"[{\"fieldName\":\"param1\",\"type\":\"java.lang.String\",\"values\":[\"val1\"],\"operator\":\"Equals\"},{\"fieldName\":\"param2\",\"type\":\"java.lang.String\",\"values\":[\"val2\"],\"operator\":\"Equals\"}]","webhooks":[],"slacks":[],"teams":[],"executionReport":null,"nlpQuery":null,"contextPath":null,"nlpDatasetId":null,"datasetReports":null,"reportContentFiltersArr":null,"dashboards":null}' http://localhost:9090/api/1.0/reports/runRun Saved Report
This endpoint runs an existing saved report using its configured settings, with optional overrides for email recipients, subject, message, and report content filters.
Query
POST /api/1.0/reports/<reportId>/run
| Parameter | Comments |
|---|---|
| reportId | ID of the saved report to execute |
POST JSON payload (all fields are optional):
| Parameter | Type | Comments |
|---|---|---|
| recipients | Array of strings | Override primary email recipients (sendTo). If not provided, uses saved report configuration. |
| cc | Array of strings | Override CC email recipients. If not provided, uses saved report configuration. |
| bcc | Array of strings | Override BCC email recipients. If not provided, uses saved report configuration. |
| subject | String | Override email subject. If not provided, uses saved report configuration. |
| message | String | Override email message body. If not provided, uses saved report configuration. |
| reportContentFilters | Array of Filter objects | Override report content filters to apply to dashboard widgets and datasets in the report. Each filter object contains: fieldName (string), type (string, e.g., "java.lang.String"), values (array of strings), and operator (string, e.g., "Equals", "In", "GreaterThan"). If not provided, uses saved report configuration. |
Example Payloads
Example 1 - Override recipients only:
{
"recipients": ["user1@example.com", "user2@example.com"]
}
Example 2 - Override recipients and subject:
{
"recipients": ["manager@example.com"],
"cc": ["team@example.com"],
"subject": "Monthly Sales Report - January 2024"
}
Example 3 - Full override:
{
"recipients": ["executive@example.com"],
"cc": ["director@example.com"],
"bcc": ["archive@example.com"],
"subject": "Q4 Executive Summary",
"message": "<span>Please find attached the Q4 executive summary report.</span><br><br>Best regards,<br>Analytics Team"
}
Example 4 - Override with report content filters:
{
"recipients": ["regional-manager@example.com"],
"subject": "Regional Sales Report - North Region",
"reportContentFilters": [
{
"fieldName": "region",
"type": "java.lang.String",
"values": ["North"],
"operator": "Equals"
},
{
"fieldName": "year",
"type": "java.lang.Integer",
"values": ["2024"],
"operator": "Equals"
}
]
}
Example 5 - Filters with multiple values using IN operator:
{
"recipients": ["multi-region@example.com"],
"reportContentFilters": [
{
"fieldName": "region",
"type": "java.lang.String",
"values": ["North", "South", "East"],
"operator": "In"
},
{
"fieldName": "revenue",
"type": "java.lang.Double",
"values": ["100000"],
"operator": "GreaterThan"
}
]
}
Response
| HTTP Status | Response |
|---|---|
| 200 OK | {
"executionStatus": "SUCCESS",
"executionDate": "2024-01-15T10:30:00Z",
"duration": 2543,
"details": [
{
"ok": true,
"message": "Email sent successfully to user1@example.com, user2@example.com"
}
]
}
|
| 400 BAD REQUEST | { "message": <Error details>, "documentation_url": <Documentation link> }
|
| 401 UNAUTHORIZED | { "message": <Error details>, "documentation_url": <Documentation link> }
|
| 403 FORBIDDEN | { "message": <Error details>, "documentation_url": <Documentation link> }
|
Example
Example with recipient override:
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" \
-H "Content-Type: application/json" \
-X POST \
-d '{"recipients":["user1@example.com","user2@example.com"],"subject":"Monthly Report - January"}' \
http://localhost:9090/api/1.0/reports/123/run
Example with no overrides (uses saved configuration):
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" \
-H "Content-Type: application/json" \
-X POST \
-d '{}' \
http://localhost:9090/api/1.0/reports/123/runPause Report
This endpoint pauses the scheduled delivery of a report of a given id. A paused report stays fully configured and shared, but the scheduler stops running it until it is resumed. Reports paused this way are returned with a status of 6 by the List Reports and View Reports endpoints; active reports have a status of 1.
The user tied to the bearer token needs the report:pause permission and access to the report.
Query
POST /api/1.0/reports/<objectId>/pause
| Parameter | Comments |
|---|---|
| objectId | Report id to pause |
No request body is required.
Response
| HTTP Status | Response |
|---|---|
| 200 OK | Output example: {
"message": "Report has been paused",
"documentation_url": "https://www.knowi.com/docs/managementAPI.html"
}
|
| 400 BAD REQUEST | { "message": <Error details>, "documentation_url": <Documentation link> }
|
| 401 UNAUTHORIZED | { "message": <Error details>, "documentation_url": <Documentation link> }
|
| 403 FORBIDDEN | { "message": <Error details>, "documentation_url": <Documentation link> }
|
Pausing a report that is already paused succeeds and leaves the report paused, so the call can safely be retried.
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" \ -H "Content-Type: application/json" \ -X POST \ http://localhost:9090/api/1.0/reports/68/pause
Resume Report
This endpoint resumes a paused report of a given id and returns it to its saved schedule. Missed runs are not backfilled, so the next delivery happens at the next scheduled time after the report is resumed.
The user tied to the bearer token needs the report:pause permission and access to the report.
Query
POST /api/1.0/reports/<objectId>/unpause
| Parameter | Comments |
|---|---|
| objectId | Report id to resume |
No request body is required.
Response
| HTTP Status | Response |
|---|---|
| 200 OK | Output example: {
"message": "Report has been un-paused",
"documentation_url": "https://www.knowi.com/docs/managementAPI.html"
}
|
| 400 BAD REQUEST | { "message": <Error details>, "documentation_url": <Documentation link> }
|
| 401 UNAUTHORIZED | { "message": <Error details>, "documentation_url": <Documentation link> }
|
| 403 FORBIDDEN | { "message": <Error details>, "documentation_url": <Documentation link> }
|
Resuming a report that is not paused succeeds and leaves the report active, so the call can safely be retried.
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" \ -H "Content-Type: application/json" \ -X POST \ http://localhost:9090/api/1.0/reports/68/unpause
Share the reports to users and groups
Query
PUT /reports/<objectId>/share
| Parameter | Comments |
|---|---|
| objectId | Report id to share |
POST JSON payload:
| Parameter | Comments |
|---|---|
| shareProperties | Share properties json array. Available fields:
|
Response
| HTTP Status | Response |
|---|---|
| 200 OK | No response body |
| 400 BAD_REQUEST |
Error details:
|
| 401 UNAUTHORIZED |
|
| 403 FORBIDDEN | |
| 415 UNSUPPORTED_MEDIA_TYPE | Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method. |
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X PUT -d "{\"shareProperties\" : [ { \"type\" : \"Users\", \"accessLevel\" : 1, \"name\" : \"some@some.com\", \"ssoUser\" : true } ] }" http://localhost:9090/api/1.0/reports/70/share
Delete Report
Query
DELETE /reports/<objectId>
| Parameter | Comments |
|---|---|
| objectId | Report id to delete |
Response
| HTTP Status | Response |
|---|---|
| 200 OK | No response body |
| 400 BAD REQUEST |
|
| 401 UNAUTHORIZED |
|
| 403 FORBIDDEN |
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X DELETE http://localhost:9090/api/1.0/reports/68