Datasentinel Docs
Visit our websiteBlogRelease Notes
  • 👋Welcome
  • 🆓Free Trial
  • 📣Release Notes
  • Getting started
    • Architecture
    • Installation
      • 🌐Platform
      • 🕶️Agent
    • PostgreSQL clusters
      • 🔌Extensions
        • 🔌pg_stat_statements
        • 🔌pg_store_plans
        • 🔌system_stats
        • 🔌pg_buffercache
      • 🕶️Monitoring User
      • ➕Adding Connection
    • FAQs
      • ❓Platform FAQ
      • ❓Agent FAQ
  • Features
    • Key Features
      • 📊Session History
      • 📊Top Queries
      • 📂Top Tables
      • 🔓Lock Explorer
      • 📈Cluster & System Metrics
      • ⌚Live360
      • 📰Reporting
      • 🔔Alerting
        • Settings
        • Templates
        • Silences
        • Manager
    • Other Features
      • 📡Agentless Monitoring
      • 🛡️Role Based Access
      • 🔂Changed Parameters
    • Tips & Hints
      • 🖥️User Interface
      • 🏷️Tags
      • 🔀Metric Correlation
      • 👁️‍🗨️Consolidated View
      • ❗Graphical Annotations
      • ☁️Predefined Providers
      • ❓Wait Event Description
      • ®️Read Replicas
      • 👁️‍🗨️Agentless & System Metrics
      • ☑️Simplified pg_instance Display
  • implementation
    • Platform Usage
      • ⚙️Configuration
        • 🔑License
        • 📓LDAP
        • ✉️SMTP
        • 📋Audit
        • 👨‍🏭Users & Roles
      • 🧩API
        • 🔗Access Token
        • 🧩Connection API
        • 🧩Role API
        • 🧩User API
        • 🧩Reporting API
        • 🧩Workload API
        • 🧩Alerting API
      • 🛠️Tooling
    • Agent Usage
      • 📣Release Notes
      • ⌨️CLI
      • 🧩API
      • 🗃️Collection Level
      • 🔬Internals
    • Upgrade
      • 🔄Platform
      • 🔄Agent
    • Troubleshooting
      • 🩺Error message: “502 Bad Gateway”
      • 🩺The UI is not displaying any metrics for my new instance.
      • 🩺UI dashboard is encountering loading errors
      • 🩺InfluxDB
  • Support
    • How to Contact Us
  • GitHub Toolkit
Powered by GitBook
On this page
  • Reports
  • Session History
  • Top Queries
  • Top Tables
  • Instance
  • Server
  • Query Details
  • Data Size
  • Full Report
  • Email Reports
  1. implementation
  2. Platform Usage
  3. API

Reporting API

PreviousUser APINextWorkload API

Last updated 1 year ago

For more details, please refer to the Reporting feature.

To use the Reporting API, it's necessary to generate an access token.

A comprehensive toolkit, with practical usage examples, is accessible on .

This toolkit comes pre-installed as a default component within the on-premises platform, located at /datasentinel/soft/datasentinel_toolkit.

Reports

Session History

POST https://<<platform-server>>/ds-api/activity/session-history-report

Create a Session History report in PDF format. For more details, refer to .

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Request Body

Name
Type
Description

utc_time

Boolean

When set to false, the considered timezone will rely on the platform's timezone. Default: true

from*

Begin time Date format:

YYYY-MM-DD

YYYY-MM-DD HH:MI

YYYY-MM-DD HH:MI:SS

to*

String

End time Date format:

YYYY-MM-DD

YYYY-MM-DD HH:MI

YYYY-MM-DD HH:MI:SS

filters

Array

Array of Tags {

“tag” : Tag name,

“value”: Tag value

}

database

String

Enables the ability to focus on a specific database

Default: All

group

String

The grouping dimension, namely wait_event_type is consistently calculated.

Default: wait_event_type

sub_group

String

The grouping dimension, namely wait_event is consistently calculated.

limit

Number

Restrict the count of displayed lines within the report.

Default: 20

Response

Generate the report and deliver it through email if the option is specified.

Top Queries

POST https://<<platform-server>>/ds-api/activity/top-queries-report

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Request Body

Name
Type
Description

utc_time

Boolean

When set to false, the considered timezone will rely on the platform's timezone. Default: true

from*

Begin time Date format:

YYYY-MM-DD

YYYY-MM-DD HH:MI

YYYY-MM-DD HH:MI:SS

to*

String

End time Date format:

YYYY-MM-DD

YYYY-MM-DD HH:MI

YYYY-MM-DD HH:MI:SS

filters*

Array

Array of Tags {

“tag” : Tag name,

“value”: Tag value

}

database

String

Enables the ability to focus on a specific database

Default: All

by

String

The grouping dimension.

Default: total_time

The available options for the grouping dimension are:

calls

local_blks_dirtied

local_blks_hit

local_blks_read

local_blks_written

rows

shared_blks_dirtied shared_blks_hit

shared_blks_read shared_blks_written temp_blks_read temp_blks_written

total_time

blk_read_time

blk_write_time

wal_bytes

limit

Number

Restrict the count of displayed lines within the report.

Default: 20

Response

Generate the report and deliver it through email if the option is specified.

Top Tables

POST https://<<platform-server>>/ds-api/activity/table-report

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Request Body

Name
Type
Description

utc_time

Boolean

When set to false, the considered timezone will rely on the platform's timezone. Default: true

from*

Begin time Date format:

YYYY-MM-DD

YYYY-MM-DD HH:MI

YYYY-MM-DD HH:MI:SS

to*

String

End time Date format:

YYYY-MM-DD

YYYY-MM-DD HH:MI

YYYY-MM-DD HH:MI:SS

filters

Array

Array of Tags {

“tag” : Tag name,

“value”: Tag value

}

database

String

Enables the ability to focus on a specific database

Default: All

by

String

The table grouping dimension.

Default: heap_blks_read

The available options for the grouping dimension are:

heap_blks_hit

heap_blks_read

idx_blks_hit

idx_blks_read

idx_scan

idx_tup_fetch

limit

Number

Restrict the count of displayed lines within the report.

Default: 20

index_by

String

The index grouping dimension.

Default: idx_blks_read

The available options for the grouping dimension are:

idx_blks_hit

idx_blks_read

idx_scan

idx_tup_fetch

idx_tup_read

size

Response

Generate the report and deliver it through email if the option is specified.

Instance

POST https://<<platform-server>>/ds-api/activity/instance-report

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Request Body

Name
Type
Description

utc_time

Boolean

When set to false, the considered timezone will rely on the platform's timezone. Default: true

from*

Begin time Date format:

YYYY-MM-DD

YYYY-MM-DD HH:MI

YYYY-MM-DD HH:MI:SS

to*

String

End time Date format:

YYYY-MM-DD

YYYY-MM-DD HH:MI

YYYY-MM-DD HH:MI:SS

filters

Array

Array of Tags {

“tag” : Tag name,

“value”: Tag value

}

database

String

Enables the ability to focus on a specific database

Default: All

Response

Generate the report and deliver it through email if the option is specified.

Server

POST https://<<platform-server>>/ds-api/activity/server-report

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Request Body

Name
Type
Description

utc_time

Boolean

When set to false, the considered timezone will rely on the platform's timezone. Default: true

from*

Begin time Date format:

YYYY-MM-DD

YYYY-MM-DD HH:MI

YYYY-MM-DD HH:MI:SS

to*

String

End time Date format:

YYYY-MM-DD

YYYY-MM-DD HH:MI

YYYY-MM-DD HH:MI:SS

filters

Array

Array of Tags {

“tag” : Tag name,

“value”: Tag value

}

Response

Generate the report and deliver it through email if the option is specified.

Query Details

POST https://<<platform-server>>/ds-api/activity/query-report

Create an report based on a query identifier in PDF format.

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Request Body

Name
Type
Description

utc_time

Boolean

When set to false, the considered timezone will rely on the platform's timezone. Default: true

from*

Begin time Date format:

YYYY-MM-DD

YYYY-MM-DD HH:MI

YYYY-MM-DD HH:MI:SS

to*

String

End time Date format:

YYYY-MM-DD

YYYY-MM-DD HH:MI

YYYY-MM-DD HH:MI:SS

filters

Array

Array of Tags {

“tag” : Tag name,

“value”: Tag value

}

database

String

Enables the ability to focus on a specific database

Default: All

query_md5_id*

String

Query internal identifier computed by Datasentinel and displayed on the user interface.

Response

Generate the report and deliver it through email if the option is specified.

Data Size

POST https://<<platform-server>>/ds-api/activity/data-size-report

Produce a report of table and index sizes.

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Request Body

Name
Type
Description

utc_time

Boolean

When set to false, the considered timezone will rely on the platform's timezone. Default: true

from*

Begin time Date format:

YYYY-MM-DD

YYYY-MM-DD HH:MI

YYYY-MM-DD HH:MI:SS

to*

String

End time Date format:

YYYY-MM-DD

YYYY-MM-DD HH:MI

YYYY-MM-DD HH:MI:SS

filters

Array

Array of Tags {

“tag” : Tag name,

“value”: Tag value

}

database

String

Enables the ability to focus on a specific database

Default: All

Response

Generate the report and deliver it through email if the option is specified.

Full Report

POST https://<<platform-server>>/ds-api/activity/full-report

Generate a report that incorporates all the previously mentioned report sections.

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Request Body

Name
Type
Description

utc_time

Boolean

When set to false, the considered timezone will rely on the platform's timezone. Default: true

from*

Begin time Date format:

YYYY-MM-DD

YYYY-MM-DD HH:MI

YYYY-MM-DD HH:MI:SS

to*

String

End time Date format:

YYYY-MM-DD

YYYY-MM-DD HH:MI

YYYY-MM-DD HH:MI:SS

filters

Array

Array of Tags {

“tag” : Tag name,

“value”: Tag value

}

database

String

Enables the ability to focus on a specific database

Default: All

Response

Generate the report and deliver it through email if the option is specified.

Email Reports

To enable direct email transmission of reports, you should include the following parameters:

  • report_type: "email"

  • subject: [Optional] Default: "[Datasentinel] <<Report Type>> report"

    • The subject line for the email.

  • recipients: An array of email addresses.

    • You can specify multiple email addresses here.

You have the option to include an additional dimension (aka Tag). Refer to for more details

You have the option to include an additional dimension (aka Tag). Refer to for more details

Create a Top Queries report in PDF format. For more details, refer to .

Create a Top Tables report in PDF format. For more details, refer to .

Create an Instance report in PDF format. For more details, refer to .

Create an Server report in PDF format. For more details, refer to .

🧩
🧩
📰Reporting
🔗Access Token
GitHub
Session History Feature
Top Queries Feature
Top Tables Feature
Cluster & System Metrics Feature
Cluster & System Metrics Feature
Tags section
Tags section