Read Endpoints
Note that access to the Comet REST endpoints require the {'Authorization': ${COMET_API_KEY}}
header. You can find your API key in your account settings or by navigating to https://www.comet.com/api/my/settings/.
Get User Workspaces¶
Get a user's workspaces.
Example Response
{
"workspaceNames": [
"team name",
"another team name"
]
}
Get Projects¶
Get a workspace's projects.
Example Response
{
"projects": [
{
"projectId": "aProjectId",
"projectName": "Project Name",
"ownerUserName": "Owner User Name",
"projectDescription": "Project Description",
"workspaceName": "Name of the team for team_id above",
"isPublic": "[boolean, true if this is a public project]",
"numberOfExperiments": "[integer, number of experiments in this project]",
"lastUpdated": "[long, last time this project was updated in the DB]"
}
]
}
Get Projects by Query¶
Get a page of projects by query variables
Example Response
{
"rows": [
{
"projectId": "owner-NA",
"userName": "owner",
"projectName": "project-name",
"projectDesc": "Project Description",
"generalProject": true,
"totalRowCount": "205",
"filteredRowCount": "205",
"experimentCount": 772,
"imagePath": "https://s3.amazonaws.com/comet.ml/4.png",
"isPublic": false,
"teamId": "owner-default",
"created_at": 1536971527000,
"lastUpdated": 1643135859918,
"lastUpdatedByUser": 1614970814926,
"isStarterProject": false,
"teamName": "owner",
"isInProjectTeam": false,
"owner": true,
"canEdit": true
}
],
"filteredRowCount": 205,
"totalRowCount": 205
}
Get Registry Models¶
Get a workspace's registry models.
Example Response
{
"registryModels": [
{
"registryModelId": "someRegistryModelId",
"modelName": "someModelName",
"description": "someDescription",
"isPublic": "[Boolean]",
"createdAt": "[long, when this model was created in the DB]",
"lastUpdated": "[long, last time this model was updated in the DB]",
"userName": "someUserName",
"latestVersion": {
"registryModelItemId": "someRegistryModelItemId",
"experimentModel": {
"experimentModelId": "someExperimentModelId",
"experimentModelName": "someExperimentModelName",
"experimentKey": "someExperimentKey"
},
"version": "someVersion",
"comment": "someComment",
"stages": [
"production",
"staging"
],
"userName": "someUserName",
"createdAt": "[long, when this model item was created in the DB]",
"lastUpdated": "[long, last time this model item was updated in the DB]",
"metadata": [
"metadata from first asset",
"metadata from second asset"
]
}
}
]
}
Get Registry Model Count¶
Get a count of a workspace's registry models.
Example Response
{
"registryModelCount": 7
}
Get Registry Model Details¶
Get a registry model's details.
Example Response
{
"registryModelId": "someRegistryModelId",
"modelName": "someModelName",
"description": "someDescription",
"isPublic": "[Boolean]",
"createdAt": "[long, when this model was created in the DB]",
"lastUpdated": "[long, last time this model was updated in the DB]",
"userName": "someUserName",
"versions": [
{
"registryModelItemId": "someRegistryModelItemId",
"experimentModel": {
"experimentModelId": "someExperimentModelId",
"experimentModelName": "someExperimentModelName",
"experimentKey": "someExperimentKey"
},
"version": "someVersion",
"comment": "someComment",
"stages": [
"production",
"staging"
],
"userName": "someUserName",
"createdAt": "[long, when this model item was created in the DB]",
"lastUpdated": "[long, last time this model item was updated in the DB]",
"assets": [
{
"fileName": "someFileName",
"fileSize": "[Long, file size]",
"runContext": "someRunContext",
"step": "[Integer, step asset was logged during]",
"link": "link to download asset file",
"createdAt": "[Long, timestamp asset was created in DB]",
"dir": "someDirectory",
"canView": "[Boolean, whether the asset is viewable as an image]",
"audio": "[Boolean, whether the asset is an audio file]",
"histogram": "[Boolean, whether the asset is a histogram file]",
"image": "[Boolean, whether the asset was stored as an image]",
"type": "the type of asset",
"metadata": "Metadata associated with the asset",
"assetId": "someAssetId"
}
]
}
]
}
Get Latest Registry Model Version¶
Get the latest version for a registry model. Optionally it is possible to return latest version that matches a stage or major and minor versions
Example Response
{
"registryModelId": "someRegistryModelId",
"modelName": "someModelName",
"description": "someDescription",
"isPublic": "[Boolean]",
"createdAt": "[long, when this model was created in the DB]",
"lastUpdated": "[long, last time this model was updated in the DB]",
"userName": "someUserName",
"versions": [
{
"registryModelItemId": "someRegistryModelItemId",
"experimentModel": {
"experimentModelId": "someExperimentModelId",
"experimentModelName": "someExperimentModelName",
"experimentKey": "someExperimentKey"
},
"version": "someVersion",
"comment": "someComment",
"stages": [
"production",
"staging"
],
"userName": "someUserName",
"createdAt": "[long, when this model item was created in the DB]",
"lastUpdated": "[long, last time this model item was updated in the DB]",
"assets": [
{
"fileName": "someFileName",
"fileSize": "[Long, file size]",
"runContext": "someRunContext",
"step": "[Integer, step asset was logged during]",
"link": "link to download asset file",
"createdAt": "[Long, timestamp asset was created in DB]",
"dir": "someDirectory",
"canView": "[Boolean, whether the asset is viewable as an image]",
"audio": "[Boolean, whether the asset is an audio file]",
"histogram": "[Boolean, whether the asset is a histogram file]",
"image": "[Boolean, whether the asset was stored as an image]",
"type": "the type of asset",
"metadata": "Metadata associated with the asset",
"assetId": "someAssetId"
}
]
}
]
}
Get Registry Model Notes¶
Get a registry model's notes.
Example Response
{
"notes": "Potentially very long notes string"
}
Download Registry Model Version¶
Download a zip file of a registry model version.
Example Response
"[Raw stream of zip file as octet-stream]"
Get Project¶
Get details on a project.
Example Response
{
"projectId": "aProjectId",
"projectName": "Project Name",
"ownerUserName": "Owner User Name",
"projectDescription": "Project Description",
"workspaceName": "Name of the team for team_id above",
"isPublic": "[boolean, true if this is a public project]",
"numberOfExperiments": "[integer, number of experiments in this project]",
"lastUpdated": "[long, last time this project was updated in the DB]"
}
Get Project Columns¶
Get a project's columns. These are the items that can be queried.
Example Response
{
"columns": [
{
"name": "Column Name",
"id": "unique-column-id",
"type": "one of: double, string, datetime, boolean, or timenumber",
"source": "one of: metrics, params, log_other, metadata, tag, or env_details"
}
]
}
Apply Project Query¶
Apply a query to a project.
Example Request
{
"projectId": "someProjectId",
"projectName": "someProjectName",
"workspaceName": "someWorkspaceName",
"predicates": "Json Predicates for search here, example below",
"archived": "[boolean: if true search for archived experiments. Optional]"
}
Example Response
{
"experimentKeys": [
"KEY",
"anotherExperimentKey"
],
"experimentsInProject": "[int count of experiments in project, including all those filtered out. If archived was true this is the archived experiment count]"
}
[
{
"source": "metrics",
"query": {
"condition": "AND",
"rules": [
{
"id": "columnNameA",
"field": "columnNameA",
"type": "double",
"input": "text",
"operator": "greater",
"value": 1
}
],
"valid": true
}
}
]
Get Project Notes¶
Get a project's notes.
Example Response
{
"notes": "someProjectNotes"
}
Get Project Share Links¶
Get a Project's share links
Example Response
{
"shareCodes": [
"37645346359823"
]
}
Get Multi Metric Chart¶
Get multi-metric chart data.
Example Request
{
"targetedExperiments": [
"KEY",
"anotherExperimentKey"
],
"metrics": [
"someMetricName",
"anotherMetricName"
],
"params": [
"someParameterName",
"anotherParameterName"
],
"independentMetrics": "[Boolean, whether the metrics should be fetched individually or as a correlated whole (only return values for steps for which you have values for every requested metric name)]",
"fetchFull": "[Boolean, whether to fetch all values (up to 15,000) or a sampled subset (about 500 points)]"
}
Example Response
{
"experiments": {
"KEY": {
"experimentKey": "KEY",
"steps": [
1,
2,
3
],
"metrics": [
{
"metricName": "someMetricName",
"values": [
1.2,
1.3,
1.4
],
"steps": [
1,
2,
3
],
"timestamps": [
"[Long, list of timestamps of metric values]"
],
"durations": [
"[Long, time between each value and the previous value, 0 for the first]"
]
}
],
"params": {
"someParam": "8675309",
"anotherParam": "whatever value you want"
}
}
},
"empty": "[Boolean, whether any metrics were returned]"
}
Get Experiments¶
Get a project's experiments.
Example Response
{
"experiments": [
{
"experimentKey": "SomeExperimentKey",
"experimentName": "SomeExperimentName",
"optimizationId": "optimization run associated with this experiment, if any",
"durationMillis": "[long, How long the experiment ran for]",
"startTimeMillis": "[long, As recorded by the backend, when this experiment started]",
"endTimeMillis": "[long, As recorded by the backend, when this experiment ended]"
}
]
}
Get Experiment Metadata¶
Get an experiment's metadata.
Example Response
{
"experimentKey": "KEY",
"experimentName": "someExperimentName",
"optimizationId": "someOptimizationId",
"projectId": "someProjectId",
"projectName": "someProjectName",
"workspaceName": "someWorkspaceName",
"durationMillis": "someDurationMillis",
"startTimeMillis": "someStartTimeMillis",
"endTimeMillis": "someEndTimeMillis"
}
Get Experiment Git Metadata¶
Get the git metadata of an experiment.
Example Response
{
"user": "gitUser",
"root": "gitRoot",
"branch": "gitBranch",
"parent": "gitParent",
"origin": "gitOrigin"
}
Get Experiment Git Patch¶
Get the git patch of an experiment.
Example Response
"[Raw stream of git patch as octet-stream]"
Get Experiment HTML¶
Get an experiment's HTML.
Example Response
{
"html": "HTML for Experiment"
}
Get Experiment Code¶
Get an experiment's source code.
Example Response
{
"code": "Code for Experiment"
}
Get Experiment Output¶
Get an experiment's standard output and error.
Example Response
{
"output": "stdout and stderr output for Experiment, with '\n' delimiters"
}
Get Experiment Graph¶
Get an experiment's model graph.
Example Response
{
"graph": "Graph for Experiment"
}
Get Experiment Cloud Details¶
Get an experiment's cloud details.
Example Response
{
"experimentKey": null,
"provider": null,
"metadata": null
}
Get All Metrics For Name¶
Get all metric values for a metric name.
Example Response
{
"metrics": [
{
"metricName": "someMetricName",
"metricValue": "someMetricValue",
"epoch": "[long, epoch this metric is from]",
"timestamp": "[long, time this metric was recorded]",
"step": "[long, step this metric is from]",
"runContext": "someRunContext",
"offset": "[Long, offset that this metric was sent as]"
}
]
}
Get Metrics Summary¶
Get an experiment's metrics summary.
Example Response
{
"values": [
{
"name": "someName",
"valueMax": "max value",
"valueMin": "min value",
"valueCurrent": "last value",
"timestampMax": "[long, time max value was recorded]",
"timestampMin": "[long, time min value was recorded]",
"timestampCurrent": "[long, time last value was recorded]",
"runContextMax": "run context of max value",
"runContextMin": "run context of min value",
"runContextCurrent": "run context of last value",
"stepMax": "[long, step max value is from]",
"stepMin": "[long, step min value is from]",
"stepCurrent": "[long, step current value is from]"
}
]
}
Get Parameters¶
Get an experiment's parameters summary.
Example Response
{
"values": [
{
"name": "someName",
"valueMax": "max value",
"valueMin": "min value",
"valueCurrent": "last value",
"timestampMax": "[long, time max value was recorded]",
"timestampMin": "[long, time min value was recorded]",
"timestampCurrent": "[long, time last value was recorded]",
"runContextMax": "run context of max value",
"runContextMin": "run context of min value",
"runContextCurrent": "run context of last value",
"stepMax": "[long, step max value is from]",
"stepMin": "[long, step min value is from]",
"stepCurrent": "[long, step current value is from]"
}
]
}
Get Others¶
Get an experiment's others (logged with log-other
) summary.
Example Response
{
"values": [
{
"name": "someName",
"valueMax": "max value",
"valueMin": "min value",
"valueCurrent": "last value",
"timestampMax": "[long, time max value was recorded]",
"timestampMin": "[long, time min value was recorded]",
"timestampCurrent": "[long, time last value was recorded]",
"runContextMax": "run context of max value",
"runContextMin": "run context of min value",
"runContextCurrent": "run context of last value",
"stepMax": "[long, step max value is from]",
"stepMin": "[long, step min value is from]",
"stepCurrent": "[long, step current value is from]"
}
]
}
Get Tags¶
Get an experiment's tags.
Example Response
{
"tags": [
"a tag",
"another tag"
]
}
Get System Details¶
Get an experiment's system details.
Example Response
{
"experimentKey": "KEY",
"user": "system username",
"pythonVersion": "python version",
"pythonVersionVerbose": "python version with verbose flag",
"pid": "[Integer, pid]",
"osType": "os experiment ran on",
"os": "os with version info",
"ip": "ip address",
"hostname": "hostname",
"gpuStaticInfoList": [
{
"gpuIndex": "[Integer, index]",
"name": "name",
"uuid": "someUniqueId",
"totalMemory": "[Integer, total memory used???]",
"powerLimit": "[Integer, max power used????]"
}
],
"logAdditionalSystemInfoList": [
{
"key": "someKey",
"value": "someValue"
}
],
"systemMetricNames": [
"name",
"anotherName"
],
"maxTotalMemory": "[double, max memory used]",
"networkInterfaceIps": [
"ip",
"anotherIp"
],
"command": [
"myScript.py",
"-arg",
"theArgument"
],
"executable": "/usr/local/bin/python",
"osPackages": [
"package",
"anotherPackage"
],
"installedPackages": [
"package",
"anotherPackage"
]
}
Get Asset List¶
Get an experiment's asset list.
Example Response
{
"assets": [
{
"fileName": "someFileName",
"fileSize": "[Long, file size]",
"runContext": "someRunContext",
"step": "[Integer, step asset was logged during]",
"link": "link to download asset file",
"createdAt": "[Long, timestamp asset was created in DB]",
"dir": "someDirectory",
"canView": "[Boolean, whether the asset is viewable as an image]",
"audio": "[Boolean, whether the asset is an audio file]",
"histogram": "[Boolean, whether the asset is a histogram file]",
"image": "[Boolean, whether the asset was stored as an image]",
"type": "the type of asset",
"metadata": "Metadata associated with the asset",
"assetId": "someAssetId",
"remote": false,
"tags": []
}
]
}
all
, unknown
, audio
, video
, image
, histogram3d
, histogram_combined_3d
, confusion-matrix
Get Asset Details¶
Get the asset details. This is the same information returned by experiment/asset/list but for a single assitId
Example Response
{
"fileName": "someFileName",
"fileSize": "[Long, file size]",
"runContext": "someRunContext",
"step": "[Integer, step asset was logged during]",
"link": "link to download asset file",
"createdAt": "[Long, timestamp asset was created in DB]",
"dir": "someDirectory",
"canView": "[Boolean, whether the asset is viewable as an image]",
"audio": "[Boolean, whether the asset is an audio file]",
"histogram": "[Boolean, whether the asset is a histogram file]",
"image": "[Boolean, whether the asset was stored as an image]",
"type": "the type of asset",
"metadata": "Metadata associated with the asset",
"assetId": "someAssetId",
"remote": false,
"tags": []
}
Get Asset¶
Get an asset.
Example Response
"[Raw binary stream of asset or JSON {'msg':'no patch for experiment','code':200,'data':null,'sdk_error_code':0}]"
Get Experiment Model List¶
Get the list of models created by a given experiment.
Example Response
{
"models": [
{
"experimentModelId": "someExperimentModelId",
"experimentKey": "KEY",
"modelName": "someExperimentModelName"
}
]
}
Get Experiment Model Asset List¶
Get the list of assets for a particular experiment model.
Example Response
{
"assets": [
{
"fileName": "someFileName",
"fileSize": "[Long, file size]",
"runContext": "someRunContext",
"step": "[Integer, step asset was logged during]",
"link": "link to download asset file",
"createdAt": "[Long, timestamp asset was created in DB]",
"dir": "someDirectory",
"canView": "[Boolean, whether the asset is viewable as an image]",
"audio": "[Boolean, whether the asset is an audio file]",
"histogram": "[Boolean, whether the asset is a histogram file]",
"image": "[Boolean, whether the asset was stored as an image]",
"type": "the type of asset",
"metadata": "Metadata associated with the asset",
"assetId": "someAssetId"
}
]
}
Download Experiment Model¶
Download a zip file of an experiment model.
Example Response
"[Raw stream of zip file as octet-stream]"
Download Artifact¶
Download an artifact
Example Response
"[Raw binary of asset]"
Get Store¶
Get an entire store.
Example Response
"{'store': '{key1: value1, ...}'}"
Get Account Details¶
Get account details from authenticated user's apiKey in header
Example Response
{
"userName": "USERNAME",
"defaultWorkspaceName": "WORKSPACE"
}
Get Panels in workspace¶
Get a list of metadata for all panels in workspace
Example Response
{
"codePanelTemplateRows": [
{
"templateId": "SzUYHmX7hnR7KrLzU1tBrHilq",
"owner": "owner",
"teamId": "owner-default",
"templateName": "Panel Name",
"queryBuilderId": "",
"scopeType": "PUBLIC",
"revisionId": 1596673911412,
"createdAt": 1584445331784
}
]
}
Get Panel JSON¶
Get the Panel JSON
Example Response
{
"templateId": "DyfpvKGZJvrtY1jjsYuMmLgz5",
"owner": "owner",
"teamId": "owner-default",
"templateName": "Panel Name",
"queryBuilderId": "",
"code": {
"code": "// JavaScript Code",
"css": "/** CSS **/",
"description": "Panel Description",
"html": "<div id=\"chart-mount\"></div>",
"defaultConfig": "\"\"",
"internalResources": [
{
"name": "Comet SDK",
"version": "latest",
"enabled": true
},
{
"name": "Plotly.js",
"version": "1.50.1",
"enabled": true
}
],
"userResources": [],
"pyCode": "## Python Code",
"type": "py",
"pyConfig": ""
},
"rank": {
"templateId": "DyfpvKGZJvrtY1jjsYuMmLgz5",
"voteCount": 0,
"userVoteType": "NOVOTE"
},
"scopeType": "PRIVATE",
"revisionId": 1642709054245,
"createdAt": 1642709054465,
"thumbnailName": "template-thumbnail-DyfpvKGZJvrtY1jjsYuMmLgz5",
"editable": true
}
Download Panel as Zipfile¶
Download the contents of a Panel as zipfile contents.
Example Response
"[Raw binary stream of compress panel JSON]"
Get Dashboard Template List¶
Get a list of dashboard template JSON objects
Example Response
{
"dashboardTemplates": [
{
"templateId": "owner-unsaved-035669d7f91a4ac7a3058fba0c7264b0",
"templateName": "Template Name",
"projectId": "035669d7f91a4ac7a3058fba0c7AAA",
"projectName": "Project Name",
"createdBy": "owner"
}
]
}
Download Dashboard¶
Download a dashboard template
Example Response
{
"project_id": "ff9f723aa70f4fb6a2e6f3d23f6fe848",
"template_name": "ARP",
"template_id": "ipPl7zaLAX9aNa9bwoCaY6HBi",
"experimentQueryState": "{\"filters\":[],\"activeSegment\":{}}",
"dashboardChartState": "{\"downsample_size\":1000,\"entire_row_charts\":false, ...}",
"reactGridTableState": "{\"selection\":[],\"pageSize\":25,\"pageNumber\":0, ...}",
"v2": {
"reactGridTableState": "{\"selection\":[],\"pageSize\":25, ...}",
"toggles": {
"DASHBOARD_TOGGLE": {
"isVisible": true,
"toggleId": "DASHBOARD_TOGGLE"
},
"EXPERIMENT_TABLE_TOGGLE": {
"isVisible": true,
"toggleId": "EXPERIMENT_TABLE_TOGGLE"
}
}
},
"source": "",
"current": false,
"unsaved_view": false,
"created_by": "owner",
"project_default": false,
"pinnedExperiments": [],
"codePanelTemplateIds": [],
"isAutoRefreshEnabled": true
}
Get an Optimizer's Best Experiment¶
Get an optimizer's best experiment so far.
Example Response
{
"experimentKey": "5e6dbb408c694d1cb6e7ca4edc80b921",
"metricValue": 0.010686935856938362,
"experimentCount": 12
}
Get Webhook Configuration¶
Get the configuration for a webhook. The webhook notifies about any change in the Stage status of a specific registered model, or of any registered model in a specific workspace.
Example Response
{
"workspaceName": "some-workspace",
"modelName": "some-model",
"webhookUrls": [
{
"url": "https://{customer-webhook-url-a}",
"header": {
"Authorization": "secret_token",
"Other": "other_info"
}
}
]
}