Skip to main content

AdminDataSource

Defined in: js-api/src/dapi.ts:508

Constructors​

Constructor​

new AdminDataSource(dart): AdminDataSource

Defined in: js-api/src/dapi.ts:511

Parameters​

ParameterType
dartany

Returns​

AdminDataSource

Properties​

PropertyTypeDefined in
dartanyjs-api/src/dapi.ts:509

Methods​

getGrowthMetrics()​

getGrowthMetrics(options?): Promise<GrowthMetrics>

Defined in: js-api/src/dapi.ts:549

How the platform's data grows: per database table and category (events by source, entities by type, ...), per storage location and nature, per disk and per garbage collector key, the value now, its change over 1, 7 and 30 days, a daily trend, what the garbage collector deleted and has pending, and the metric alerts that cover it. The server samples them on a schedule; a fresh server answers no rows until its first collection. Needs the ViewTelemetry permission: without it, rejects with an Error whose status is 403; a bad area or days rejects with status 400. An alert's problemId and alertStatus also need ManageAlerts, else they are null. Sample: https://public.datagrok.ai/js/samples/dapi/admin

Parameters​

ParameterType
options?GrowthMetricsOptions

Returns​

Promise<GrowthMetrics>


getMetrics()​

getMetrics(options?): Promise<ServerMetrics>

Defined in: js-api/src/dapi.ts:524

Server metrics for a time window: HTTP request latency per route, the errors, the function-call queue, and database statistics. Needs the ViewTelemetry permission: without it, rejects with an Error whose status is 403. Sample: https://public.datagrok.ai/js/samples/dapi/admin

Parameters​

ParameterType
options?ServerMetricsOptions

Returns​

Promise<ServerMetrics>


getProblem()​

getProblem(id): Promise<Problem | null>

Defined in: js-api/src/dapi.ts:561

A problem the platform detected and its current alert, by id or kind:key; null when there is none. Needs the ManageAlerts permission: without it, rejects with an Error whose status is 403. Sample: https://public.datagrok.ai/js/samples/dapi/problems

Parameters​

ParameterType
idstring

Returns​

Promise<Problem | null>


getReportEmail()​

getReportEmail(): Promise<string>

Defined in: js-api/src/dapi.ts:594

Returns the configured report email address from admin settings. Used as the default recipient for error reports and admin notifications.

Returns​

Promise<string>


getServiceInfos()​

getServiceInfos(): Promise<ServiceInfo[]>

Defined in: js-api/src/dapi.ts:517

Returns information about the services. Sample: https://public.datagrok.ai/js/samples/dapi/admin

Returns​

Promise<ServiceInfo[]>


pushMessage()​

pushMessage(messageType, message, sessionIds): Promise<any>

Defined in: js-api/src/dapi.ts:624

Sends a message to the specified browser client See also ServerMessageTypes

Parameters​

ParameterType
messageTypestring
messageobject
sessionIdsstring[]

Returns​

Promise<any>


sendEmail()​

sendEmail(email): Promise<void>

Defined in: js-api/src/dapi.ts:601

Sends email

Parameters​

ParameterTypeDescription
emailEmailmessage that will be sent using configured SMTP service

Returns​

Promise<void>