๐ŸงฉReporting API

For more details, please refer to the Reporting feature.

๐Ÿ“ฐpageReporting

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

๐Ÿ”—pageAccess Token

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

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 Session History Feature.

Headers

NameTypeDescription

user-token*

String

Generated Access Token

Request Body

NameTypeDescription

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.

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

Default: wait_event_type

sub_group

String

The grouping dimension, namely wait_event is consistently calculated.

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

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

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

Headers

NameTypeDescription

user-token*

String

Generated Access Token

Request Body

NameTypeDescription

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

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

Headers

NameTypeDescription

user-token*

String

Generated Access Token

Request Body

NameTypeDescription

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

Create an Instance report in PDF format. For more details, refer to Cluster & System Metrics Feature.

Headers

NameTypeDescription

user-token*

String

Generated Access Token

Request Body

NameTypeDescription

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

Create an Server report in PDF format. For more details, refer to Cluster & System Metrics Feature.

Headers

NameTypeDescription

user-token*

String

Generated Access Token

Request Body

NameTypeDescription

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

NameTypeDescription

user-token*

String

Generated Access Token

Request Body

NameTypeDescription

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

NameTypeDescription

user-token*

String

Generated Access Token

Request Body

NameTypeDescription

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

NameTypeDescription

user-token*

String

Generated Access Token

Request Body

NameTypeDescription

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

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.

Last updated