Reference·Java · nl.bimbase.bimworks.client.apisJava

SuperAdminApi

CLASS in nl.bimbase.bimworks.client.apis.

API catalogue · nl.bimbase.bimworks.client.apis · CLASS

Java#
public class SuperAdminApi

Super-admin API calls: server health, the API latency and network usage stores, reindexing, the email queue, and JFR recordings. Every call requires a client authenticated as a SUPER_ADMIN account (username/password); API tokens and auth tokens are refused by the server.

Inheritance and interfaces#

Members#

Member Kind Description
SuperAdminApi(BimWorksClient) CONSTRUCTOR
getMemoryInfo() METHOD Heap/non-heap usage plus the allocator's own dumps (fields, dump, stats, kv).
getThreadInfo() METHOD threadCount, peakThreadCount, totalStartedThreadCount.
health() METHOD {database: }.
getStorageOverview() METHOD This node's storage: tiers, volumes, copies waiting, alert levels, last Trim (docs/storage-page-redesign.md §8.1).
listUploads() METHOD The newest uploads (versions and errors) across the server.
getNetworkUsage(ObjectNode) METHOD Network usage rows. Keys (all optional): from, to (ISO-8601), slice (MINUTE|HOUR|DAY), username, token_name, point, detail, node, direction…
getApiLatency(ObjectNode) METHOD API latency rows. Keys (all optional): from, to, slice (MINUTE|FIVE_MINUTES|HOUR|DAY|TOTAL), names (csv), classes (csv), outcomes (csv), `latency…
listApiLatencyEndpoints(Instant, Instant) METHOD Every endpoint seen in the range, most called first: {endpoints:[{name, layer, clazz, count, last_seen, state}]}.
getApiLatencyNode(Instant, Instant, SuperAdminApi.Slice, boolean) METHOD The per-interval saturation rows (in-flight, pending, CPU, checkins/reindex running…).
getApiLatencyDisk(Instant, Instant, SuperAdminApi.Slice, boolean) METHOD This node's disk usage per slice and filesystem (size, least/newest usable space, the storage backends' own bytes), plus the catalog of watched storage locat…
getApiLatencyActivity(Instant, Instant, SuperAdminApi.Slice) METHOD Checkin / reindex / restart intervals in the range (the timeline's activity bands).
getApiLatencyAnomalies(Instant, Instant) METHOD
getApiLatencyStatus() METHOD Configuration, counters and store size of the latency tracker.
getReindexingStatus() METHOD Snapshot of the reindex queue: counts, pending, running, history, open submissions.
submitReindex(ObjectNode, long, TimeUnit) METHOD Submit reindex work. Keys: scope (ALL|SELECTION), version_uuids, types, cutoff_version, tag, delete_after_reindex, dry_run, wait (streams pro…
controlReindexing(String, UUID) METHOD continue, continue_without_interrupted, drop_interrupted, pause, cancel_job, requeue_job, clear.
listEmails() METHOD The 200 newest rows of the email queue, bodies truncated (see #getEmail).
listenToEmails(SuperAdminApi.EmailListener) METHOD Keep the email queue view open: the snapshot goes to the listener as inserted rows (newest first), then every queue transition as it happens. Close the ret…
getEmail(UUID) METHOD The full email record including untruncated bodies.
listAccountsAndInvites(boolean) METHOD Every account and open invite on the server.
listAllApiTokens() METHOD
listModelCheckSets() METHOD
gc() METHOD Trigger a full GC on the server.
createLoginLink(String, Duration) METHOD Mint a one-time login link for an account (server setting security.login_links_enabled, off by default): opening the returned url in a browser logs it in…
startJfrRecording(String, String, long, Duration) METHOD Start a JFR recording on the server JVM (docs/multi-user-load-test-design.md §10.3).
getJfrStatus() METHOD Every recording the server JVM knows about, including ones started from the command line.
stopJfrRecording(long, boolean) METHOD Stop a recording started with #startJfrRecording and download it. The caller closes the stream; the server deletes its copy once the stream is consumed unles…
startPerformanceBenchmark() METHOD Starts the performance benchmark on the node that receives the call (docs/performance-score-plan.md §6.3). Answers the job at once; follow it with #getPerfor…
getPerformanceBenchmark(String) METHOD The node's benchmark: job (the running one, else the newest since the server started; with id that one, with its log), current_score and suite.
listPerformanceBenchmarks(int) METHOD The node's stored benchmark runs, newest first, at most limit
getPerformanceBenchmarkRun(String) METHOD One stored benchmark run with its detail
cancelPerformanceBenchmark(String) METHOD Asks the running benchmark to stop; cancelled is false when it was not running

SuperAdminApi(BimWorksClient)#

Parameters#

Name Type Description
bimWorksClient BimWorksClient

getMemoryInfo()#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode getMemoryInfo() throws nl.bimbase.bimworks.client.BimWorksException

Heap/non-heap usage plus the allocator's own dumps (fields, dump, stats, kv).

getThreadInfo()#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode getThreadInfo() throws nl.bimbase.bimworks.client.BimWorksException

threadCount, peakThreadCount, totalStartedThreadCount.

health()#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode health() throws nl.bimbase.bimworks.client.BimWorksException

{database: <connection status>}.

getStorageOverview()#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode getStorageOverview() throws nl.bimbase.bimworks.client.BimWorksException

This node's storage: tiers, volumes, copies waiting, alert levels, last Trim (docs/storage-page-redesign.md §8.1).

listUploads()#

Java#
public com.fasterxml.jackson.databind.node.ArrayNode listUploads() throws nl.bimbase.bimworks.client.BimWorksException

The newest uploads (versions and errors) across the server.

getNetworkUsage(ObjectNode)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode getNetworkUsage(com.fasterxml.jackson.databind.node.ObjectNode parameters) throws nl.bimbase.bimworks.client.BimWorksException

Network usage rows. Keys (all optional): from, to (ISO-8601), slice (MINUTE|HOUR|DAY), username, token_name, point, detail, node, direction (SENT|RECEIVED), exclude_points (csv), group_by (csv of username,token_name,point,direction,detail,node,time).

Parameters#

Name Type Description
parameters com.fasterxml.jackson.databind.node.ObjectNode

Returns#

{rows, totals, slice, from, to, truncated?}

getApiLatency(ObjectNode)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode getApiLatency(com.fasterxml.jackson.databind.node.ObjectNode parameters) throws nl.bimbase.bimworks.client.BimWorksException

API latency rows. Keys (all optional): from, to, slice (MINUTE|FIVE_MINUTES|HOUR|DAY|TOTAL), names (csv), classes (csv), outcomes (csv), latency_outcomes (csv), group_by (csv of name,outcome,time), percentiles (csv), bound (UPPER|MID), include_live, with_histogram, with_baseline.

Parameters#

Name Type Description
parameters com.fasterxml.jackson.databind.node.ObjectNode

Returns#

{rows, totals, slice, from, to, bound, live, store_available, enabled}

listApiLatencyEndpoints(Instant, Instant)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode listApiLatencyEndpoints(java.time.Instant from, java.time.Instant to) throws nl.bimbase.bimworks.client.BimWorksException

Every endpoint seen in the range, most called first: {endpoints:[{name, layer, clazz, count, last_seen, state}]}.

Parameters#

Name Type Description
from java.time.Instant
to java.time.Instant

getApiLatencyNode(Instant, Instant, SuperAdminApi.Slice, boolean)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode getApiLatencyNode(java.time.Instant from, java.time.Instant to, nl.bimbase.bimworks.client.apis.SuperAdminApi.Slice slice, boolean includeLive) throws nl.bimbase.bimworks.client.BimWorksException

The per-interval saturation rows (in-flight, pending, CPU, checkins/reindex running…).

Parameters#

Name Type Description
from java.time.Instant
to java.time.Instant
slice SuperAdminApi.Slice
includeLive boolean

getApiLatencyDisk(Instant, Instant, SuperAdminApi.Slice, boolean)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode getApiLatencyDisk(java.time.Instant from, java.time.Instant to, nl.bimbase.bimworks.client.apis.SuperAdminApi.Slice slice, boolean includeLive) throws nl.bimbase.bimworks.client.BimWorksException

This node's disk usage per slice and filesystem (size, least/newest usable space, the storage backends' own bytes), plus the catalog of watched storage locations.

Parameters#

Name Type Description
from java.time.Instant
to java.time.Instant
slice SuperAdminApi.Slice
includeLive boolean

Returns#

{rows:[{time, fs, total, usable_min, usable_last, used, storage, backends}], locations, enabled, sample_seconds, live}

getApiLatencyActivity(Instant, Instant, SuperAdminApi.Slice)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode getApiLatencyActivity(java.time.Instant from, java.time.Instant to, nl.bimbase.bimworks.client.apis.SuperAdminApi.Slice slice) throws nl.bimbase.bimworks.client.BimWorksException

Checkin / reindex / restart intervals in the range (the timeline's activity bands).

Parameters#

Name Type Description
from java.time.Instant
to java.time.Instant
slice SuperAdminApi.Slice

getApiLatencyAnomalies(Instant, Instant)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode getApiLatencyAnomalies(java.time.Instant from, java.time.Instant to) throws nl.bimbase.bimworks.client.BimWorksException

Parameters#

Name Type Description
from java.time.Instant
to java.time.Instant

getApiLatencyStatus()#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode getApiLatencyStatus() throws nl.bimbase.bimworks.client.BimWorksException

Configuration, counters and store size of the latency tracker.

getReindexingStatus()#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode getReindexingStatus() throws nl.bimbase.bimworks.client.BimWorksException

Snapshot of the reindex queue: counts, pending, running, history, open submissions.

submitReindex(ObjectNode, long, TimeUnit)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode submitReindex(com.fasterxml.jackson.databind.node.ObjectNode parameters, long timeOut, java.util.concurrent.TimeUnit timeUnit) throws nl.bimbase.bimworks.client.BimWorksException

Submit reindex work. Keys: scope (ALL|SELECTION), version_uuids, types, cutoff_version, tag, delete_after_reindex, dry_run, wait (streams progress and returns when the jobs are done).

Parameters#

Name Type Description
parameters com.fasterxml.jackson.databind.node.ObjectNode
timeOut long
timeUnit java.util.concurrent.TimeUnit

controlReindexing(String, UUID)#

Java#
public void controlReindexing(java.lang.String action, java.util.UUID jobUuid) throws nl.bimbase.bimworks.client.BimWorksException

continue, continue_without_interrupted, drop_interrupted, pause, cancel_job, requeue_job, clear.

Parameters#

Name Type Description
action java.lang.String
jobUuid java.util.UUID

listEmails()#

Java#
public com.fasterxml.jackson.databind.node.ArrayNode listEmails() throws nl.bimbase.bimworks.client.BimWorksException

The 200 newest rows of the email queue, bodies truncated (see #getEmail).

listenToEmails(SuperAdminApi.EmailListener)#

Java#
public java.lang.AutoCloseable listenToEmails(nl.bimbase.bimworks.client.apis.SuperAdminApi.EmailListener listener) throws nl.bimbase.bimworks.client.BimWorksException

Keep the email queue view open: the snapshot goes to the listener as inserted rows (newest first), then every queue transition as it happens. Close the returned handle to stop listening; the server side ends with the session or the next ListEmails call.

Parameters#

Name Type Description
listener SuperAdminApi.EmailListener

getEmail(UUID)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode getEmail(java.util.UUID uuid) throws nl.bimbase.bimworks.client.BimWorksException

The full email record including untruncated bodies.

Parameters#

Name Type Description
uuid java.util.UUID

listAccountsAndInvites(boolean)#

Java#
public com.fasterxml.jackson.databind.node.ArrayNode listAccountsAndInvites(boolean showDeleted) throws nl.bimbase.bimworks.client.BimWorksException

Every account and open invite on the server.

Parameters#

Name Type Description
showDeleted boolean

listAllApiTokens()#

Java#
public com.fasterxml.jackson.databind.JsonNode listAllApiTokens() throws nl.bimbase.bimworks.client.BimWorksException

listModelCheckSets()#

Java#
public com.fasterxml.jackson.databind.JsonNode listModelCheckSets() throws nl.bimbase.bimworks.client.BimWorksException

gc()#

Java#
public void gc() throws nl.bimbase.bimworks.client.BimWorksException

Trigger a full GC on the server.

Java#
public com.fasterxml.jackson.databind.node.ObjectNode createLoginLink(java.lang.String username, java.time.Duration validity) throws nl.bimbase.bimworks.client.BimWorksException

Mint a one-time login link for an account (server setting security.login_links_enabled, off by default): opening the returned url in a browser logs it in as that account, once, within the validity.

Parameters#

Name Type Description
username java.lang.String the account; null for the caller's own
validity java.time.Duration how long the link stays usable; null for the server's default, capped by the server's maximum

Returns#

{url, username, expires_at, validity_seconds}

startJfrRecording(String, String, long, Duration)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode startJfrRecording(java.lang.String name, java.lang.String settings, long maxSizeBytes, java.time.Duration maxAge) throws nl.bimbase.bimworks.client.BimWorksException

Start a JFR recording on the server JVM (docs/multi-user-load-test-design.md §10.3).

Parameters#

Name Type Description
name java.lang.String
settings java.lang.String the JFR configuration name, profile or default
maxSizeBytes long disk cap of the recording, 0 for unlimited
maxAge java.time.Duration how far back the recording keeps events, null for unlimited

Returns#

{id, name, started, settings}

getJfrStatus()#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode getJfrStatus() throws nl.bimbase.bimworks.client.BimWorksException

Every recording the server JVM knows about, including ones started from the command line.

stopJfrRecording(long, boolean)#

Java#
public java.io.InputStream stopJfrRecording(long id, boolean keepOnServer) throws nl.bimbase.bimworks.client.BimWorksException

Stop a recording started with #startJfrRecording and download it. The caller closes the stream; the server deletes its copy once the stream is consumed unless keepOnServer.

Parameters#

Name Type Description
id long
keepOnServer boolean

startPerformanceBenchmark()#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode startPerformanceBenchmark() throws nl.bimbase.bimworks.client.BimWorksException

Starts the performance benchmark on the node that receives the call (docs/performance-score-plan.md §6.3). Answers the job at once; follow it with #getPerformanceBenchmark. Refused while the node is busy or when its demo set does not fit the benchmark suite.

getPerformanceBenchmark(String)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode getPerformanceBenchmark(java.lang.String id) throws nl.bimbase.bimworks.client.BimWorksException

The node's benchmark: job (the running one, else the newest since the server started; with id that one, with its log), current_score and suite.

Parameters#

Name Type Description
id java.lang.String a job id, or null

listPerformanceBenchmarks(int)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode listPerformanceBenchmarks(int limit) throws nl.bimbase.bimworks.client.BimWorksException

The node's stored benchmark runs, newest first, at most limit

Parameters#

Name Type Description
limit int

getPerformanceBenchmarkRun(String)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode getPerformanceBenchmarkRun(java.lang.String id) throws nl.bimbase.bimworks.client.BimWorksException

One stored benchmark run with its detail

Parameters#

Name Type Description
id java.lang.String

cancelPerformanceBenchmark(String)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode cancelPerformanceBenchmark(java.lang.String id) throws nl.bimbase.bimworks.client.BimWorksException

Asks the running benchmark to stop; cancelled is false when it was not running

Parameters#

Name Type Description
id java.lang.String

Inherited members#

  • java.lang.Object#equals(java.lang.Object)
  • java.lang.Object#toString()
  • java.lang.Object#wait(long)
  • java.lang.Object#wait(long,int)
  • java.lang.Object#wait()
  • java.lang.Object#finalize()
  • java.lang.Object#getClass()
  • java.lang.Object#hashCode()
  • java.lang.Object#clone()
  • java.lang.Object#notify()
  • java.lang.Object#notifyAll()
  • getBimWorksClient()