API Documentation / Admin API Reference Comet Enterprise allows some Admin operations only via REST API.
Assigning admin role to users Prior Comet backend version 3.2.140
you'll need to add your username in the environment variable config /etc/default/comet-ml
in the following format
ADMIN_USER_LIST="[user1,user2]"
For kubernetes deployments, you should add it in your values.yaml
like this: backend:
adminUserList: "[user1,user2]"
Recovering Admin access Backend versions including and after 3.2.140
, Users that have the Admin
role also have the same capabilities to run admin API operations. The ADMIN_USER_LIST
is still available in recent versions in case you need to recover Admin access to the Comet application.
Note
After applying this configuration, it is important to restart all backend services to ensure the changes take effect.
How to run curl commands With the user that already have Admin permissions, you can get your API Key following this
Example on how to pull usage report:
curl -X GET https://comet-host/api/admin/generate-license-report -H 'Authorization: adminApiKey'
- Example on how to add a user to workspace: curl -X POST 'https://comet-host/api/admin/workspace/addUser' -H 'Content-Type: application/json' -H 'Authorization: adminApiKey' -d '{ "userName": "string", "workspaceName": "string", "admin": false }'
Example on how to change an user password: curl -X PUT 'https://comet-host/api/admin/reset-password' -H 'Content-Type: application/json' -H 'Authorization: adminApiKey' -d '{"username": "some-user", "newPassword": "NeWPasswordComet!"}'
Available operations addUserToTeam
POST /admin/workspace/addUser
Body parameter
{
"userName" : "string" ,
"workspaceName" : "string" ,
"admin" : true
}
Parameters Responses Status Meaning Description Schema 200 OK OK None
This operation does not require authentication changeUserName
POST /admin/change-user-name
Body parameter
{
"oldUserName" : "string" ,
"newUserName" : "string"
}
Parameters Responses Status Meaning Description Schema 200 OK OK None
This operation does not require authentication createExperimentShareCode
POST /admin/share-code/new-experiment-link
Body parameter
{
"experimentKey" : "string"
}
Parameters Example responses
200 Response
{
"shareCode" : "string" ,
"link" : "string"
}
Responses This operation does not require authentication createProjectShareCode
POST /admin/share-code/new-project-link
Body parameter
{
"workspaceName" : "string" ,
"projectName" : "string"
}
Parameters Example responses
200 Response
{
"shareCode" : "string" ,
"link" : "string"
}
Responses This operation does not require authentication deleteAllInternalProjectShareCodes
DELETE /admin/share-code/delete-all
Responses Status Meaning Description Schema 200 OK OK None
This operation does not require authentication deleteUser
DELETE /admin/delete-user
Parameters Name In Type Required Description userName query string true none
Responses Status Meaning Description Schema 200 OK OK None
This operation does not require authentication generateAndGetLatestLicenseReport
GET /admin/generate-license-report
Example responses
200 Response
{
"licensedUsers" : [
{
"username" : "string" ,
"email" : "string" ,
"created_at" : 0 ,
"uiUsageCount" : 0 ,
"uiUsageUpdateTs" : 0 ,
"sdkUsageCount" : 0 ,
"sdkUsageUpdateTs" : 0 ,
"deletedAt" : 0 ,
"suspended" : true
}
],
"numberOfUsers" : 0 ,
"createdAt" : "2019-08-24T14:15:22Z"
}
Responses This operation does not require authentication getAllUserUsageReports
GET /admin/license-report/getAll
Example responses
200 Response
[
{
"licensedUsers" : [
{
"username" : "string" ,
"email" : "string" ,
"created_at" : 0 ,
"uiUsageCount" : 0 ,
"uiUsageUpdateTs" : 0 ,
"sdkUsageCount" : 0 ,
"sdkUsageUpdateTs" : 0 ,
"deletedAt" : 0 ,
"suspended" : true
}
],
"numberOfUsers" : 0 ,
"createdAt" : "2019-08-24T14:15:22Z"
}
]
Responses Status Meaning Description Schema 200 OK none Inline
Response Schema Status Code 200
Name Type Required Restrictions Description anonymous [LicenseReport ] false none none
This operation does not require authentication getLatestUserUsageReport
GET /admin/license-report/getLatest
Example responses
200 Response
{
"licensedUsers" : [
{
"username" : "string" ,
"email" : "string" ,
"created_at" : 0 ,
"uiUsageCount" : 0 ,
"uiUsageUpdateTs" : 0 ,
"sdkUsageCount" : 0 ,
"sdkUsageUpdateTs" : 0 ,
"deletedAt" : 0 ,
"suspended" : true
}
],
"numberOfUsers" : 0 ,
"createdAt" : "2019-08-24T14:15:22Z"
}
Responses This operation does not require authentication getProjectShareCodes
GET /admin/share-code/get-all
Parameters Name In Type Required Description workspaceName query string true none projectName query string true none
Example responses
200 Response
{
"shareCodes" : [
"string"
],
"links" : [
"string"
]
}
Responses This operation does not require authentication listAllUsers
GET /admin/list-all-users
Parameters Name In Type Required Description suspendedOnly query boolean false none
Example responses
200 Response
[
{
"left" : "string" ,
"right" : "string" ,
"value" : "string" ,
"key" : "string"
}
]
Responses Status Meaning Description Schema 200 OK none Inline
Response Schema Status Code 200
This operation does not require authentication newTeam
POST /admin/workspace/new
Body parameter
{
"name" : "string" ,
"plan" : "string" ,
"users" : [
"string"
],
"organizationId" : "string"
}
Parameters Example responses
200 Response
{
"msg" : "string" ,
"teamName" : "string" ,
"teamId" : "string" ,
"usersAdded" : [
"string"
],
"usersError" : [
"string"
],
"code" : 0
}
Responses This operation does not require authentication removeFromTeam
POST /admin/workspace/removeUser
Body parameter
{
"userName" : "string" ,
"workspaceName" : "string"
}
Parameters Responses Status Meaning Description Schema 200 OK OK None
This operation does not require authentication removeTeam
DELETE /admin/workspace/delete
Parameters Name In Type Required Description workspaceName query string true none
Responses Status Meaning Description Schema 200 OK OK None
This operation does not require authentication resetPasswordComplete
PUT /admin/reset-password
Body parameter
{
"username" : "string" ,
"newPassword" : "string"
}
Parameters Responses Status Meaning Description Schema 200 OK OK None
This operation does not require authentication rotateExpiredApiKeys
POST /admin/keys/rotate
Body parameter
Parameters Responses Status Meaning Description Schema 200 OK OK None
This operation does not require authentication setOnPremUserOrganizationAdmin
PATCH /admin/set-onprem-user-admin
Body parameter
Parameters Responses Status Meaning Description Schema 200 OK OK None
This operation does not require authentication suspendUser
PUT /admin/suspend-user
Body parameter
Parameters Responses Status Meaning Description Schema 200 OK OK None
This operation does not require authentication syncUserToTeams
POST /admin/workspace/syncUser
Body parameter
{
"userName" : "string" ,
"workspaceNames" : [
"string"
],
"workspacePlan" : "string"
}
Parameters Responses Status Meaning Description Schema 200 OK OK None
This operation does not require authentication transferAllProject
PUT /admin/transfer/projects
Body parameter
{
"originWorkspace" : "string" ,
"targetWorkspace" : "string"
}
Parameters Responses Status Meaning Description Schema 200 OK OK None
This operation does not require authentication transferProject
PUT /admin/transfer/project
Body parameter
{
"workspaceName" : "string" ,
"projectName" : "string" ,
"targetWorkspaceName" : "string" ,
"owner" : "string"
}
Parameters Responses Status Meaning Description Schema 200 OK OK None
This operation does not require authentication unsuspendUser
PUT /admin/unsuspend-user
Body parameter
Parameters Responses Status Meaning Description Schema 200 OK OK None
This operation does not require authentication updateCodePanelTemplate
PUT /admin/code-visualizations/template/{template_id}/scope
Body parameter
{
"scopeType" : "PRIVATE"
}
Parameters Responses Status Meaning Description Schema 200 OK OK None
This operation does not require authentication Schemas AddUserToTeamByName {
"userName" : "string" ,
"workspaceName" : "string" ,
"admin" : true
}
Properties Name Type Required Restrictions Description userName string false none none workspaceName string false none none admin boolean false none none
ChangeUserName {
"oldUserName" : "string" ,
"newUserName" : "string"
}
Properties Name Type Required Restrictions Description oldUserName string false none none newUserName string false none none
NewProjectShareCodeLink {
"shareCode" : "string" ,
"link" : "string"
}
Properties Name Type Required Restrictions Description shareCode string false none none link string false none none
NewExperimentLinkRequest {
"experimentKey" : "string"
}
Properties Name Type Required Restrictions Description experimentKey string false none none
NewProjectShareCodeLinkRequest {
"workspaceName" : "string" ,
"projectName" : "string"
}
Properties Name Type Required Restrictions Description workspaceName string false none none projectName string false none none
LicenseReport {
"licensedUsers" : [
{
"username" : "string" ,
"email" : "string" ,
"isSuspended" : true ,
"created_at" : 0 ,
"uiUsageCount" : 0 ,
"uiUsageUpdateTs" : 0 ,
"sdkUsageCount" : 0 ,
"sdkUsageUpdateTs" : 0 ,
"deletedAt" : 0 ,
"suspended" : true
}
],
"numberOfUsers" : 0 ,
"createdAt" : "2019-08-24T14:15:22Z"
}
Properties Name Type Required Restrictions Description licensedUsers [LicensedUser ] false none none
LicensedUser {
"username" : "string" ,
"email" : "string" ,
"isSuspended" : true ,
"created_at" : 0 ,
"uiUsageCount" : 0 ,
"uiUsageUpdateTs" : 0 ,
"sdkUsageCount" : 0 ,
"sdkUsageUpdateTs" : 0 ,
"deletedAt" : 0 ,
"suspended" : true
}
Properties Name Type Required Restrictions Description username string false none none email string false none none isSuspended boolean false write-only none created_at integer(int64) false none none uiUsageCount integer(int32) false none none uiUsageUpdateTs integer(int64) false none none sdkUsageCount integer(int32) false none none sdkUsageUpdateTs integer(int64) false none none deletedAt integer(int64) false none none suspended boolean false none none
ProjectShareCodeLinks
{
"shareCodes" : [
"string"
],
"links" : [
"string"
]
}
Properties Name Type Required Restrictions Description shareCodes [string] false none none links [string] false none none
PairStringString
{
"left" : "string" ,
"right" : "string" ,
"value" : "string" ,
"key" : "string"
}
Properties Name Type Required Restrictions Description left string false none none right string false none none value string false none none key string false none none
NewTeamAdminResponse {
"msg" : "string" ,
"teamName" : "string" ,
"teamId" : "string" ,
"usersAdded" : [
"string"
],
"usersError" : [
"string"
],
"code" : 0
}
Properties Name Type Required Restrictions Description msg string false none none teamName string false none none teamId string false none none usersAdded [string] false none none usersError [string] false none none code integer(int32) false none none
NewTeamAdminRequest {
"name" : "string" ,
"plan" : "string" ,
"users" : [
"string"
],
"organizationId" : "string"
}
Properties Name Type Required Restrictions Description name string false none none plan string false none none users [string] false none none organizationId string false none none
RemoveUserFromTeamByName {
"userName" : "string" ,
"workspaceName" : "string"
}
Properties Name Type Required Restrictions Description userName string false none none workspaceName string false none none
resetPasswordRequest {
"username" : "string" ,
"newPassword" : "string"
}
Properties Name Type Required Restrictions Description username string false none none newPassword string false none none
KeysRotateRequest Properties Name Type Required Restrictions Description days integer(int32) false none none
SetOnPremUserOrganizationAdminRequest Properties Name Type Required Restrictions Description userName string true none none
SuspendUserRequest Properties Name Type Required Restrictions Description username string false none none
SyncUserToTeamsRequest {
"userName" : "string" ,
"workspaceNames" : [
"string"
],
"workspacePlan" : "string"
}
Properties Name Type Required Restrictions Description userName string false none none workspaceNames [string] false none none workspacePlan string false none none
TransferAllProjectRequest {
"originWorkspace" : "string" ,
"targetWorkspace" : "string"
}
Properties Name Type Required Restrictions Description originWorkspace string false none none targetWorkspace string false none none
TransferProjectRequest {
"workspaceName" : "string" ,
"projectName" : "string" ,
"targetWorkspaceName" : "string" ,
"owner" : "string"
}
Properties Name Type Required Restrictions Description workspaceName string false none none projectName string false none none targetWorkspaceName string false none none owner string false none none
UpdatePanelTemplateScopeRequest {
"scopeType" : "PRIVATE"
}
Properties Name Type Required Restrictions Description scopeType string false none none
Enumerated Values Property Value scopeType PRIVATE scopeType INTERNAL scopeType PUBLIC scopeType BUILTIN scopeType WORKSPACE