🧩Workload API
The Workload API provides you with the option to download comprehensive metrics in either JSON or CSV format.
Last updated
The Workload API provides you with the option to download comprehensive metrics in either JSON or CSV format.
Last updated
To use the Workload API, it's necessary to generate an access 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
.
POST
https://<<platform-server>>/ds-api/activity/session-history
For more details, refer to Session History Feature.
user-token*
String
Generated Access Token
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
}
output
json or csv format
Default: json
Response
POST
https://<<platform-server>>/ds-api/activity/queries-summary
Present an overview of global metrics summarizing all executed queries group by database.
user-token*
String
Generated Access Token
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
}
output
json or csv format
Default: json
Response
POST
https://<<platform-server>>/ds-api/activity/top-queries
For more details, refer to Top Queries Feature.
user-token*
String
Generated Access Token
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
}
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
output
String
json or csv format
Default: json
Response
POST
https://<<platform-server>>/ds-api/activity/query
Export execution metrics based on a query identifier.
user-token*
String
Generated Access Token
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
}
query_md5_id*
String
Query internal identifier computed by Datasentinel and displayed on the user interface.
Response
POST
https://<<platform-server>>/ds-api/activity/pg-instance-infos
user-token*
String
Generated Access Token
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
}
output
json or csv format
Default: json
Response
POST
https://<<platform-server>>/ds-api/activity/pg-instance
Overall activity or minute-by-minute detailed activity of one or more clusters, encompassing cache activity, IO operation statistics, transaction metrics, and more.
user-token*
String
Generated Access Token
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
}
output
json or csv format
Default: json
compute
String
There are 2 potential values:
summary: Provides an overview of the overall activity for each PostgreSQL instance. details: Offers minute-by-minute detailed activity for each PostgreSQL instance.
Default: details
Response
POST
https://<<platform-server>>/ds-api/activity/pg-background
Overall background activity or minute-by-minute detailed background activity of one or more clusters
user-token*
String
Generated Access Token
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
}
output
json or csv format
Default: json
compute
String
There are 2 potential values:
summary: Provides an overview of the overall activity for each PostgreSQL instance. details: Offers minute-by-minute detailed activity for each PostgreSQL instance.
Default: details
Response
POST
https://<<platform-server>>/ds-api/activity/data-size
user-token*
String
Generated Access Token
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
}
output
json or csv format
Default: json
compute
String
There are 2 potential values:
summary: Provides an overview of the overall activity for each PostgreSQL instance. details: Offers minute-by-minute detailed activity for each PostgreSQL instance.
Default: details
Response
POST
https://<<platform-server>>/ds-api/activity/tables
For more details, refer to Top Tables Feature.
user-token*
String
Generated Access Token
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
}
by
String
The grouping dimension.
Default: heap_blks_hit
The available options for the grouping dimension are:
heap_blks_hit
heap_blks_read
idx_blks_hit
idx_blks_read
idx_scan
n_tup_del
n_tup_hot_upd
n_tup_ins
idx_tup_fetch
n_tup_upd
relid
relkind
relpages
reltuples
seq_scan
seq_tup_read
size
tidx_blks_hit
tidx_blks_read
toast_blks_hit
toast_blks_read
vacuum_count
autovacuum_count
analyze_count
autoanalyze_count
limit
Number
Restrict the count of displayed lines within the report.
Default: 20
output
String
json or csv format
Default: json
Response
POST
https://<<platform-server>>/ds-api/activity/indexes
For more details, refer to Top Tables Feature.
user-token*
String
Generated Access Token
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
}
by
String
The grouping dimension.
Default: idx_blks_hit
The available options for the grouping dimension are:
idx_blks_hit
idx_blks_read
idx_scan
idx_tup_fetch
idx_tup_read
relpages
size
limit
Number
Restrict the count of displayed lines within the report.
Default: 20
output
String
json or csv format
Default: json
Response
POST
https://<<platform-server>>/ds-api/activity/server
Overall activity or minute-by-minute detailed server activity
user-token*
String
Generated Access Token
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
}
output
json or csv format
Default: json
compute
String
There are 2 potential values:
summary: Provides an overview of the overall activity for each PostgreSQL instance. details: Offers minute-by-minute detailed activity for each PostgreSQL instance.
Default: details
Response