Skip to content

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 Code

get /api/rest/v2/experiment/code?experimentKey=KEY

Get an experiment's source code

Example Response

200 application/json
{
  "code": "Code for Experiment"
}

Get Html

get /api/rest/v2/experiment/html?experimentKey=KEY

Get an experiment's HTML

Example Response

200 application/json
{
  "html": "Html for Experiment"
}

Download Artifact Version

get /api/rest/v2/artifacts/version/download?version=someVersion&experimentKey=KEY

Download a versioned artifact

Example Response

200
[Raw binary stream of file]

Download Experiment Model

get /api/rest/v2/experiment/model/download?experimentKey=KEY&modelName=myExperimentModelName

Download a zip file of an experiment model

Example Response

200 application/octet-stream
[Raw stream of zip file as octet-stream]

Download Registry Model Version

get /api/rest/v2/registry-model/item/download?workspaceName=aTeamName&modelName=someModelName

Download a zip file of a registry model version

Example Response

200 application/octet-stream
[Raw stream of zip file as octet-stream]

Get Account Details

get /api/rest/v2/account-details

Get account details from authenticated user's apiKey in header

Example Response

200 application/json
{
  "userName": "USERNAME",
  "defaultWorkspaceName": "WORKSPACE"
}

Get Experiments

get /api/rest/v2/experiments?projectId=someProjectId&projectName=pname&workspaceName=aTeamName

Get a project's experiments

Example Response

200 application/json
{
  "experiments": [
    {
      "experimentKey": "SomeExperimentKey",
      "experimentName": "SomeExperimentName",
      "optimizationId": "optimization run associated with this experiment, if any",
      "projectId": "someProjectId",
      "projectName": "someProjectName",
      "workspaceName": "someWorkspaceName"
    }
  ]
}

Get Projects

get /api/rest/v2/projects?workspaceName=aTeamName

Get a workspace's projects

Example Response

200 application/json
{
  "projects": [
    {
      "projectId": "aProjectId",
      "projectName": "Project Name",
      "ownerUserName": "Owner User Name",
      "projectDescription": "Project Description",
      "workspaceName": "Name of the team for team_id above"
    }
  ]
}

Get Output

get /api/rest/v2/experiment/output?experimentKey=KEY

Get an experiment's standard output and error

Example Response

200 application/json
{
  "output": "stdout and stderr output for Experiment, with '\\n' delimiters"
}

Get User Workspaces

get /api/rest/v2/workspaces

Get a user's workspaces

Example Response

200 application/json
{
  "workspaceNames": [
    "team name",
    "another team name"
  ]
}

Get Artifact Details

get /api/rest/v2/artifacts/get

Get an artifact's details

Example Response

200 application/json
{
  "tags": [
    "string"
  ],
  "versions": [
    {
      "alias": [
        "string"
      ],
      "tags": [
        "string"
      ]
    }
  ]
}

Get List of Artifact Files

get /api/rest/v2/artifacts/version/files?version=someVersion

Get a list of artifact file details

Example Response

200 application/json
{
  "files": [
    {}
  ]
}

Get Artifact List

get /api/rest/v2/artifacts/get-all?experimentKey=KEY

Get a list of all artifacts

Example Response

200 application/json
{
  "artifacts": [
    {
      "tags": [
        "string"
      ]
    }
  ]
}

Get Asset

get /api/rest/v2/experiment/asset/get-asset?experimentKey=KEY&assetId=someAssetId

Get an asset

Example Response

200
[Raw binary stream of asset or JSON {'msg':'no patch for experiment','code':200,'data':null,'sdk_error_code':0}]

Get Asset List

get /api/rest/v2/experiment/asset/list?experimentKey=KEY&type=all

Get an experiment's asset list

Example Response

200 application/json
{
  "assets": [
    {
      "fileName": "someFileName",
      "runContext": "someRunContext",
      "link": "link to download asset file",
      "dir": "someDirectory",
      "canView": false,
      "audio": false,
      "histogram": false,
      "image": false,
      "type": "the type of asset",
      "metadata": "Metadata associated with the asset",
      "assetId": "someAssetId",
      "tags": [
        "string"
      ]
    }
  ]
}

Get Experiment Metadata

get /api/rest/v2/experiment/metadata?experimentKey=KEY

Get an experiment's metadata

Example Response

200 application/json
{
  "experimentKey": "SomeExperimentKey",
  "experimentName": "SomeExperimentName",
  "optimizationId": "optimization run associated with this experiment, if any",
  "projectId": "someProjectId",
  "projectName": "someProjectName",
  "workspaceName": "someWorkspaceName"
}

Get Git Patch

get /api/rest/v2/experiment/git/patch?experimentKey=KEY

Get the git patch of an experiment

Example Response

200 application/octet-stream
[Raw stream of zip file as octet-stream]

Get Graph

get /api/rest/v2/experiment/graph?experimentKey=KEY

Get an experiment's model graph

Example Response

200 application/json
{
  "graph": "Graph for Experiment"
}

Get Store

get /api/rest/v2/viz-instance/store/get?projectId=PROJECT_ID&instanceId=INSTANCE_ID

Get an entire store

Example Response

200 application/json
{
  "store": "{key1: value1, ...}"
}

Get Others

get /api/rest/v2/experiment/log-other?experimentKey=KEY

Get an experiment's others (logged with log-other) summary

Example Response

200 application/json
{
  "values": [
    {
      "name": "someName",
      "valueMax": "max value",
      "valueMin": "min value",
      "valueCurrent": "last value",
      "runContextMax": "run context of max value",
      "runContextMin": "run context of min value",
      "runContextCurrent": "run context of last value"
    }
  ]
}

Get Metrics Summary

get /api/rest/v2/experiment/metrics/summary?experimentKey=KEY

Get an experiment's metrics summary

Example Response

200 application/json
{
  "values": [
    {
      "name": "someName",
      "valueMax": "max value",
      "valueMin": "min value",
      "valueCurrent": "last value",
      "runContextMax": "run context of max value",
      "runContextMin": "run context of min value",
      "runContextCurrent": "run context of last value"
    }
  ]
}

Get Experiment Model List

get /api/rest/v2/experiment/model?experimentKey=KEY&modelName=someModelName

Get the list of models created by a given experiment

Example Response

200 application/json
{
  "models": [
    {
      "experimentModelId": "someExperimentModelId",
      "experimentKey": "someExperimentKey",
      "modelName": "someExperimentModelName",
      "registryRecords": [
        {}
      ]
    }
  ]
}

Get Experiment Model Asset List

get /api/rest/v2/experiment/model/asset/list?experimentKey=KEY&modelName=someModelName

Get the list of assets for a particular experiment model

Example Response

200 application/json
{
  "assets": [
    {
      "fileName": "someFileName",
      "runContext": "someRunContext",
      "link": "link to download asset file",
      "dir": "someDirectory",
      "canView": false,
      "audio": false,
      "histogram": false,
      "image": false,
      "type": "the type of asset",
      "metadata": "Metadata associated with the asset",
      "assetId": "someAssetId",
      "tags": [
        "string"
      ]
    }
  ]
}

Apply Project Query

post /api/rest/v2/project/query

Apply a query to a project

Example Request

application/json
{
  "projectId": "someProjectId",
  "projectName": "someProjectName",
  "workspaceName": "someWorkspaceName",
  "predicates": "JsonNode",
  "archived": "[boolean: if true search for archived experiments.  Optional]"
}

Example Response

200 application/json
{
  "experimentKeys": [
    "KEY",
    "anotherExperimentKey"
  ]
}

Get Multi Metric Chart

post /api/rest/v2/experiments/multi-metric-chart

Get multi-metric chart data

Example Request

application/json
{
  "targetedExperiments": [
    "KEY",
    "anotherExperimentKey"
  ],
  "metrics": [
    "someMetricName",
    "anotherMetricName"
  ],
  "params": [
    "someParameterName",
    "anotherParameterName"
  ],
  "independentMetrics": false,
  "fetchFull": false
}

Example Response

200 application/json
{
  "experiments": {
    "experimentKey": "KEY",
    "steps": [
      1,
      2,
      3
    ],
    "epochs": [
      "integer"
    ],
    "metrics": [
      {
        "metricName": "someMetricName",
        "values": [
          1.2,
          1.3,
          1.4
        ],
        "steps": [
          1,
          2,
          3
        ],
        "epochs": [
          "integer"
        ],
        "timestamps": [
          "[Long, list of timestamps of metric values]"
        ],
        "durations": [
          "[Long, time between each value and the previous value, 0 for the first]"
        ]
      }
    ],
    "params": {
      "anotherParam": "whatever value you want",
      "someParam": "8675309"
    }
  },
  "empty": false
}

Get Parameters

get /api/rest/v2/experiment/parameters?experimentKey=KEY

Get an experiment's parameters summary

Example Response

200 application/json
{
  "values": [
    {
      "name": "someName",
      "valueMax": "max value",
      "valueMin": "min value",
      "valueCurrent": "last value",
      "runContextMax": "run context of max value",
      "runContextMin": "run context of min value",
      "runContextCurrent": "run context of last value"
    }
  ]
}

Get Project Columns

get /api/rest/v2/project/column-names?projectId=someProjectId&projectName=pname&workspaceName=aTeamName

Get a project's columns. These are the items that can be queried

Example Response

200 application/json
{
  "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",
      "kinds": [
        "string"
      ]
    }
  ]
}

Get Project Notes

get /api/rest/v2/project/notes?projectId=someProjectId

Get a project's notes

Example Response

200 application/json
{
  "notes": "someProjectNotes"
}

Get All Metrics For Name

get /api/rest/v2/experiment/metrics/get-metric?experimentKey=KEY&metricName=NAME

Get all metric values for a metric name

Example Response

200 application/json
{
  "metrics": [
    {
      "metricName": "someMetricName",
      "metricValue": "someMetricValue",
      "runContext": "someRunContext"
    }
  ]
}

Get Registry Model Count

get /api/rest/v2/registry-model/count?workspaceName=aTeamName

Get a count of a workspace's registry models

Example Response

200 application/json
{
  "registryModelCount": 7
}

Get Registry Model Details

get /api/rest/v2/registry-model/details?workspaceName=aTeamName&modelName=someModelName

Get a registry model's details

Example Response

200 application/json
{
  "registryModelId": "someRegistryModelId",
  "modelName": "someModelName",
  "description": "someDescription",
  "isPublic": false,
  "versions": [
    {
      "registryModelItemId": "someRegistryModelItemId",
      "experimentModel": {
        "experimentModelId": "someExperimentModelId",
        "experimentKey": "someExperimentKey",
        "modelName": "someExperimentModelName",
        "registryRecords": [
          {}
        ]
      },
      "version": "someVersion",
      "comment": "someComment",
      "stages": [
        "production",
        "staging"
      ],
      "assets": [
        {
          "fileName": "someFileName",
          "runContext": "someRunContext",
          "link": "link to download asset file",
          "dir": "someDirectory",
          "canView": false,
          "audio": false,
          "histogram": false,
          "image": false,
          "type": "the type of asset",
          "metadata": "Metadata associated with the asset",
          "assetId": "someAssetId",
          "tags": [
            "string"
          ]
        }
      ],
      "userName": "someUserName"
    }
  ],
  "userName": "someUserName"
}

Get Registry Model Notes

get /api/rest/v2/registry-model/notes?workspaceName=aTeamName&modelName=someModelName

Get a registry model's notes

Example Response

200 application/json
{
  "notes": "Potentially very long notes string"
}

Get Registry Models

get /api/rest/v2/registry-model?workspaceName=aTeamName

Get a workspace's registry models

Example Response

200 application/json
{
  "registryModels": [
    {
      "registryModelId": "someRegistryModelId",
      "modelName": "someModelName",
      "description": "someDescription",
      "latestVersion": {
        "registryModelItemId": "someRegistryModelItemId",
        "experimentModel": {
          "experimentModelId": "someExperimentModelId",
          "experimentKey": "someExperimentKey",
          "modelName": "someExperimentModelName",
          "registryRecords": [
            {}
          ]
        },
        "version": "someVersion",
        "comment": "someComment",
        "stages": [
          "production",
          "staging"
        ],
        "metadata": [
          "metadata from first asset",
          "metadata from second asset"
        ],
        "userName": "someUserName"
      },
      "userName": "someUserName",
      "isPublic": false
    }
  ]
}

Get Git Metadata

get /api/rest/v2/experiment/git/metadata?experimentKey=KEY

Get the git metadata of an experiment

Example Response

200 application/json
{
  "sdkGitMetadataWithContext": {
    "sdkGitMetadata": {
      "status": {
        "untracked": [
          "string"
        ],
        "unstaged": [
          "string"
        ],
        "staged": {
          "add": [
            "string"
          ],
          "modify": [
            "string"
          ],
          "delete": [
            "string"
          ]
        }
      }
    }
  }
}

Get Project

get /api/rest/v2/project?workspaceName=aTeamName&projectId=someProjectId&projectName=pname

Get details on a project

Example Response

200 application/json
{
  "projectId": "aProjectId",
  "projectName": "Project Name",
  "ownerUserName": "Owner User Name",
  "projectDescription": "Project Description",
  "workspaceName": "Name of the team for team_id above"
}

Get System Details

get /api/rest/v2/experiment/system-details?experimentKey=KEY

Get an experiment's system details

Example Response

200 application/json
{
  "experimentKey": "KEY",
  "user": "system username",
  "pythonVersion": "python version",
  "pythonVersionVerbose": "python version with verbose flag",
  "osType": "os experiment ran on",
  "os": "os with version info",
  "ip": "ip address",
  "hostname": "hostname",
  "env": "JsonNode",
  "gpuStaticInfoList": [
    {
      "name": "name",
      "uuid": "someUniqueId"
    }
  ],
  "logAdditionalSystemInfoList": [
    {
      "key": "some key",
      "value": "some value"
    }
  ],
  "systemMetricNames": [
    "name",
    "anotherName"
  ],
  "networkInterfaceIps": [
    "ip",
    "anotherIp"
  ],
  "command": [
    "myScript.py",
    "-arg",
    "theArgument"
  ],
  "executable": "/usr/local/bin/python",
  "osPackages": [
    "package",
    "anotherPackage"
  ],
  "installedPackages": [
    "package",
    "anotherPackage"
  ]
}

Get Tags

get /api/rest/v2/experiment/tags?experimentKey=KEY

Get an experiment's tags

Example Response

200 application/json
{
  "tags": [
    "a tag",
    "another tag"
  ]
}

Dec. 17, 2024