domino logo
About DominoArchitecture
Kubernetes
Cluster RequirementsDomino on EKSDomino Kubernetes Version CompatibilityDomino on GKEDomino on AKSDomino on OpenShiftNVIDIA DGX in DominoDomino in Multi-Tenant Kubernetes ClusterEncryption in Transit
Installation
Installation ProcessConfiguration ReferenceInstaller Configuration ExamplesPrivate or Offline Installationfleetcommand-agent Release NotesInstall Script Downloads
Configuration
Central ConfigurationNotificationsChange The Default Project For New UsersProject Stage ConfigurationDomino Integration With Atlassian Jira
Compute
Manage Domino Compute ResourcesHardware Tier Best PracticesModel Resource QuotasPersistent Volume ManagementAdding a Node Pool to your Domino ClusterRemove a Node from Service
Keycloak Authentication Service
Operations
Domino Application LoggingDomino MonitoringSizing Infrastructure for Domino
Data Management
Data in DominoData Flow In DominoExternal Data VolumesDatasets AdministrationSubmit GDPR Requests
User Management
RolesView User InformationRun a User Activity ReportSchedule a User Activity Report
Environments
Environment Management Best PracticesCache Environment Images in EKS
Disaster Recovery
Control Center
Control Center OverviewExport Control Center Data with The API
Troubleshooting
domino logo
About Domino
Domino Data LabKnowledge BaseData Science BlogTraining
Admin Guide
>
Control Center
>
Export Control Center Data with The API

Export Control Center Data with The API

The Control Center interface in Domino provides several views about deployment usage, broken down by hardware tier, project, or user. However, if you want to do a more detailed, custom analysis, you can use the API to export Control Center data for examination with Domino’s data science features or external business intelligence applications.

The endpoint that serves this data is /v4/gateway/runs/getByBatchId.

See REST documentation on this endpoint, or continue reading for a detailed description plus examples.

API keys

Prerequisites

  • The API key for your account.

  • You must have an administrator account to access the full deployment’s Control Center data.

    1. Log in as an administrator, click your username, then click Account Settings.

      Screen Shot 2018 10 09 at 1.41.17 PM

    2. Under Account Settings, click API Key.

    3. Copy the key and store it carefully. You’ll need it to make requests to the API.

      Caution

Domino recommends repeating this process on 60-day intervals to maintain security best practices.

Use the data gateway endpoint

The following is a basic call to the data export endpoint, executed with curl:

curl --include -H "X-Domino-Api-Key: <your-api-key>" \
'https://<your-domino-url>/v4/gateway/runs/getByBatchId'

By default, the endpoint starts with the oldest available run data, beginning from January 1st, 2018. Older data isn’t available. The command also has a default limit of 1000 runs worth of data. As written, the preceding call returns data on the oldest 1000 runs available.

To try this example, enter your-api-key and your-domino-url in the previous command.

The standard JSON response object you receive has the following scheme:

{
  "runs": [
    {
      "batchId": string,
      "runId": string,
      "title": string,
      "command": string,
      "status": string,
      "runType": string,
      "userName": string,
      "userId": string,
      "projectOwnerName": string,
      "projectOwnerId": string,
      "projectName": string,
      "projectId": string,
      "runDurationSec": integer,
      "hardwareTier": string,
      "hardwareTierCostCurrency": string,
      "hardwareTierCostAmount": number,
      "queuedTime": date-time ,
      "startTime": date-time,
      "endTime": date-time,
      "totalCostCurrency": string,
      "totalCostAmount": number,
      "computeClusterDetails : {
        "computeClusterType": string,
        "masterHardwareTierId": string,
        "masterHardwareTierCostPerMinute": number,
        "workerCount": integer,
        "workerHardwareTierId": string,
        "workerHardwareTierCostPerMinute": number
      }
    }
 ],
  "nextBatchId": string
}

The Control Center gives each run recorded a batchId, which is an incrementing field that can be used as a cursor to fetch data in multiple batches. You can see in the previous response, after the array of runs objects, a nextBatchId parameter points to the next run to include. Use that ID as a query parameter in a subsequent request to get the next batch:

curl --include \
-H "X-Domino-Api-Key: <your-api-key>" \
'https://<your-domino-url>/v4/gateway/runs/getByBatchId?batchId=<your-batchId-here>'

You can also include a header with Accept: text/csv to request the data as CSV. On the Unix shell, you can write the response to a file with the > operator. This is a quick way to get data suitable for import into analysis tools:

curl --include \
-H "X-Domino-Api-Key: <your-api-key>" \
-H 'Accept: text/csv' \
'https://<your-domino-url>/v4/gateway/runs/getByBatchId' > your_file.csv

Get all workspaces

The following API call retrieves all workspaces.

GET /controlCenter/utilization/runsPerDay

Note
curl -X GET "<your-domino-url>/v4/controlCenter/utilization/runs?startDate=20220503&endDate=20220503" -H  "accept: application/json"
ParameterRequired?Description

projectId

N

startingUserId

N

organizationId

N

hardwareTierId

N

startDate

Y

Range must be in YYYYMMDD format

endDate

Y

Range must be in YYYYMMDD format

Domino Data LabKnowledge BaseData Science BlogTraining
Copyright © 2022 Domino Data Lab. All rights reserved.