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