KubeSphere (2.0.2)

Download OpenAPI specification:Download

KubeSphere OpenAPI

Authentication

jwt

Security scheme type: API Key
Header parameter name: Authorization

DevOps Project

Get the specified DevOps Project

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "create_time": "2023-06-06T09:04:07Z",
  • "creator": "string",
  • "description": "string",
  • "extra": "string",
  • "name": "string",
  • "project_id": "string",
  • "status": "string",
  • "visibility": "string",
  • "workspace": "string"
}

Update the specified DevOps Project

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

Request Body schema: application/json
create_time
required
string <date-time>

DevOps Project's Creation time'

creator
required
string

Creator's username'

description
string

DevOps Projects's Description, used to describe the DevOps Project'

extra
string

Internal Use

name
required
string

DevOps Projects's Name

project_id
required
string

ProjectId must be unique within a workspace, it is generated by kubesphere.

status
required
string

DevOps project's status. e.g. active

visibility
string

Desperated Field

workspace
required
string

The workspace to which the devops project belongs

Responses

200

ok

patch /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "create_time": "2023-06-06T09:04:07Z",
  • "creator": "string",
  • "description": "string",
  • "extra": "string",
  • "name": "string",
  • "project_id": "string",
  • "status": "string",
  • "visibility": "string",
  • "workspace": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "create_time": "2023-06-06T09:04:07Z",
  • "creator": "string",
  • "description": "string",
  • "extra": "string",
  • "name": "string",
  • "project_id": "string",
  • "status": "string",
  • "visibility": "string",
  • "workspace": "string"
}

DevOps Project Credential

Get all credentials of the specified DevOps project

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/credentials
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/credentials

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Create a credential in the specified DevOps project

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

Request Body schema: application/json
create_time
string <date-time>

Credential's create_time'

creator
string

Creator's username

description
string

Credential's description'

display_name
string

Credential's display name'

domain
string

Credential's domain,In ks we only use the default domain, default '_''

fingerprint
object (devops.JenkinsCredential.fingerprint)
id
required
string

Id of Credential, e.g. dockerhub-id

kubeconfig
object (devops.KubeconfigCredential)
secret_text
object (devops.SecretTextCredential)
ssh
object (devops.SshCredential)
type
required
string

Type of Credential, e.g. ssh/kubeconfig

username_password
object (devops.UsernamePasswordCredential)

Responses

200

OK

post /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/credentials
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/credentials

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "create_time": "2023-06-06T09:04:07Z",
  • "creator": "string",
  • "description": "string",
  • "display_name": "string",
  • "domain": "string",
  • "fingerprint":
    {
    },
  • "id": "string",
  • "kubeconfig":
    {
    },
  • "secret_text":
    {
    },
  • "ssh":
    {
    },
  • "type": "string",
  • "username_password":
    {
    }
}

Get the specified credential of the DevOps project

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

credential
required
string

credential's ID, e.g. dockerhub-id

query Parameters
content
string

Get extra credential content if this query parameter is set. Specifically, there are three types of info in a credential. One is the basic info that must be returned for each query such as name, id, etc. The second one is non-encrypted info such as the username of the username-password type of credential, which returns when the "content" parameter is set to non-empty. The last one is encrypted info, such as the password of the username-password type of credential, which never returns.

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/credentials/{credential}
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/credentials/{credential}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "create_time": "2023-06-06T09:04:07Z",
  • "creator": "string",
  • "description": "string",
  • "display_name": "string",
  • "domain": "string",
  • "fingerprint":
    {
    },
  • "id": "string",
  • "kubeconfig":
    {
    },
  • "secret_text":
    {
    },
  • "ssh":
    {
    },
  • "type": "string",
  • "username_password":
    {
    }
}

Update the specified credential of the DevOps project

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

credential
required
string

credential's ID, e.g. dockerhub-id

Request Body schema: application/json
create_time
string <date-time>

Credential's create_time'

creator
string

Creator's username

description
string

Credential's description'

display_name
string

Credential's display name'

domain
string

Credential's domain,In ks we only use the default domain, default '_''

fingerprint
object (devops.JenkinsCredential.fingerprint)
id
required
string

Id of Credential, e.g. dockerhub-id

kubeconfig
object (devops.KubeconfigCredential)
secret_text
object (devops.SecretTextCredential)
ssh
object (devops.SshCredential)
type
required
string

Type of Credential, e.g. ssh/kubeconfig

username_password
object (devops.UsernamePasswordCredential)

Responses

200

OK

put /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/credentials/{credential}
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/credentials/{credential}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "create_time": "2023-06-06T09:04:07Z",
  • "creator": "string",
  • "description": "string",
  • "display_name": "string",
  • "domain": "string",
  • "fingerprint":
    {
    },
  • "id": "string",
  • "kubeconfig":
    {
    },
  • "secret_text":
    {
    },
  • "ssh":
    {
    },
  • "type": "string",
  • "username_password":
    {
    }
}

Delete the specified credential of the DevOps project

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

credential
required
string

credential's ID, e.g. dockerhub-id

Responses

200

OK

delete /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/credentials/{credential}
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/credentials/{credential}

DevOps Pipeline

Get crumb issuer. A CrumbIssuer represents an algorithm to generate a nonce value, known as a crumb, to counter cross site request forgery exploits. Crumbs are typically hashes incorporating information that uniquely identifies an agent that sends a request, along with a guarded secret so that the crumb value cannot be forged by a third party.

Authorizations:

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/crumbissuer
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/crumbissuer

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_class": "string",
  • "crumb": "string",
  • "crumbRequestField": "string"
}

Create a DevOps project pipeline

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

Request Body schema: application/json
multi_branch_pipeline
object (devops.MultiBranchPipeline)
pipeline
object (devops.NoScmPipeline)
type
required
string

type of devops pipeline, in scm or no scm

Responses

200

ok

post /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "multi_branch_pipeline":
    {
    },
  • "pipeline":
    {
    },
  • "type": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "multi_branch_pipeline":
    {
    },
  • "pipeline":
    {
    },
  • "type": "string"
}

Get the specified pipeline of the DevOps project

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_class": "string",
  • "_links":
    {
    },
  • "actions":
    [
    ],
  • "branchNames":
    [
    ],
  • "disabled": null,
  • "displayName": "string",
  • "estimatedDurationInMillis": 0,
  • "fullDisplayName": "string",
  • "fullName": "string",
  • "name": "string",
  • "numberOfFailingBranches": 0,
  • "numberOfFailingPullRequests": 0,
  • "numberOfFolders": 0,
  • "numberOfPipelines": 0,
  • "numberOfSuccessfulBranches": 0,
  • "numberOfSuccessfulPullRequests": 0,
  • "organization": "string",
  • "parameters": null,
  • "permissions":
    {
    },
  • "pipelineFolderNames":
    [
    ],
  • "scmSource":
    {
    },
  • "totalNumberOfBranches": 0,
  • "totalNumberOfPullRequests": 0,
  • "weatherScore": 0
}

Update the specified pipeline of the DevOps project

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, e.g. sample-pipeline

Request Body schema: application/json
multi_branch_pipeline
object (devops.MultiBranchPipeline)
pipeline
object (devops.NoScmPipeline)
type
required
string

type of devops pipeline, in scm or no scm

Responses

200

OK

put /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "multi_branch_pipeline":
    {
    },
  • "pipeline":
    {
    },
  • "type": "string"
}

Delete the specified pipeline of the DevOps project

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, e.g. sample-pipeline

Responses

200

OK

delete /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}

(MultiBranchesPipeline) Get all branches in the specified pipeline.

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

query Parameters
filter
string <filter=%s>

filter remote scm. e.g. origin

start
string <start=%d>
Default: "start=0"

the count of branches start.

limit
string <limit=%d>
Default: "limit=100"

the count of branches limit.

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

(MultiBranchesPipeline) Get all activities in the specified pipeline.

Authorizations:
path Parameters
devops
required
string

the name of devops project

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

branch
required
string

the name of branch, same as repository brnach

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_class": "string",
  • "_links":
    {
    },
  • "actions":
    [
    ],
  • "branch":
    {
    },
  • "disabled": true,
  • "displayName": "string",
  • "estimatedDurationInMillis": 0,
  • "fullDisplayName": "string",
  • "fullName": "string",
  • "latestRun":
    {
    },
  • "name": "string",
  • "organization": "string",
  • "parameters":
    [
    ],
  • "permissions":
    {
    },
  • "weatherScore": 0
}

(MultiBranchesPipeline) Run pipeline.

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

branch
required
string

the name of branch, same as repository brnach.

Request Body schema: application/json
parameters
Array of objects (devops.RunPayload.parameters)

Responses

200

ok

post /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "parameters":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_class": "string",
  • "_links":
    {
    },
  • "actions":
    [
    ],
  • "artifactsZipFile": null,
  • "causeOfBlockage": "string",
  • "causes":
    [
    ],
  • "changeSet":
    [
    ],
  • "description": null,
  • "durationInMillis": null,
  • "enQueueTime": null,
  • "endTime": null,
  • "estimatedDurationInMillis": null,
  • "id": "string",
  • "name": null,
  • "organization": "string",
  • "pipeline": "string",
  • "queueId": "string",
  • "replayable": true,
  • "result": "string",
  • "runSummary": null,
  • "startTime": null,
  • "state": "string",
  • "type": "string"
}

(MultiBranchesPipeline) Get all runs in a branch

Authorizations:
path Parameters
pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

branch
required
string

the name of branch, same as repository brnach.

run
required
string

pipeline run id, the unique id for a pipeline once build.

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_class": "string",
  • "_links":
    {
    },
  • "actions":
    [
    ],
  • "artifactsZipFile": null,
  • "branch":
    {
    },
  • "causeOfBlockage": null,
  • "causes":
    [
    ],
  • "changeSet":
    [
    ],
  • "commitId": "string",
  • "commitUrl": null,
  • "description": null,
  • "durationInMillis": 0,
  • "enQueueTime": "string",
  • "endTime": "string",
  • "estimatedDurationInMillis": 0,
  • "id": "string",
  • "name": null,
  • "organization": "string",
  • "pipeline": "string",
  • "pullRequest": null,
  • "replayable": true,
  • "result": "string",
  • "runSummary": "string",
  • "startTime": "string",
  • "state": "string",
  • "type": "string"
}

(MultiBranchesPipeline) Get all artifacts in the specified pipeline.

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

branch
required
string

the name of branch, same as repository brnach.

run
required
string

pipeline run id, the unique id for a pipeline once build.

query Parameters
start
string <start=%d>

the item number of the search starts from.

limit
string <limit=%d>

the limit item count of the search.

Responses

200

The filed of "Url" in response can download artifacts

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/artifacts
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/artifacts

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

(MultiBranchesPipeline) Get run logs of the specified pipeline activity.

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

branch
required
string

the name of branch, same as repository brnach.

run
required
string

pipeline run id, the unique id for a pipeline once build.

query Parameters
start
string <start=%d>
Default: "start=0"

the item number of the search starts from.

Responses

200

OK

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/log
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/log

(MultiBranchesPipeline) Get run nodes.

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

branch
required
string

the name of branch, same as repository brnach.

run
required
string

pipeline run id, the unique id for a pipeline once build.

query Parameters
limit
string <limit=%d>
Default: "limit=10000"

the limit item count of the search.

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/nodes
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/nodes

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

(MultiBranchesPipeline) Get all steps in the specified node.

Authorizations:
path Parameters
devops
required
string

the name of devops project

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

branch
required
string

the name of branch, same as repository brnach.

run
required
string

pipeline run id, the unique id for a pipeline once build.

node
required
string

pipeline node id, the one node in pipeline.

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/nodes/{node}/steps
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/nodes/{node}/steps

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

(MultiBranchesPipeline) Proceed or Break the paused pipeline which waiting for user input.

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

branch
required
string

the name of branch, same as repository brnach.

run
required
string

pipeline run id, the unique id for a pipeline once build.

node
required
string

pipeline node id, the one node in pipeline.

step
required
string

pipeline step id, the one step in pipeline.

Request Body schema: application/json
abort
boolean

abort or not

id
string

id

parameters
Array of objects (devops.CheckPlayload.parameters)

Responses

200

OK

post /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/nodes/{node}/steps/{step}
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/nodes/{node}/steps/{step}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "abort": true,
  • "id": "string",
  • "parameters":
    [
    ]
}

(MultiBranchesPipeline) Get pipelines step log.

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

branch
required
string

the name of branch, same as repository brnach.

run
required
string

pipeline run id, the unique id for a pipeline once build.

node
required
string

pipeline node id, the one node in pipeline.

step
required
string

pipeline step id, the one step in pipeline.

query Parameters
start
string <start=%d>
Default: "start=0"

the item number of the search starts from.

Responses

200

OK

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/nodes/{node}/steps/{step}/log
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/nodes/{node}/steps/{step}/log

(MultiBranchesPipeline) Gives steps details inside a activity node. For a node, the steps which defined inside the node.

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

branch
required
string

the name of branch, same as repository brnach.

run
required
string

pipeline run id, the unique id for a pipeline once build.

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/nodesdetail
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/nodesdetail

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

(MultiBranchesPipeline) Replay pipeline

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

branch
required
string

the name of branch, same as repository brnach.

run
required
string

pipeline run id, the unique id for a pipeline once build.

Responses

200

ok

post /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/replay
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/replay

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_class": "string",
  • "_links":
    {
    },
  • "actions":
    [
    ],
  • "artifactsZipFile": null,
  • "causeOfBlockage": "string",
  • "causes":
    [
    ],
  • "changeSet":
    [
    ],
  • "description": null,
  • "durationInMillis": null,
  • "enQueueTime": null,
  • "endTime": null,
  • "estimatedDurationInMillis": null,
  • "id": "string",
  • "name": null,
  • "organization": "string",
  • "pipeline": "string",
  • "queueId": "string",
  • "replayable": true,
  • "result": "string",
  • "runSummary": null,
  • "startTime": null,
  • "state": "string",
  • "type": "string"
}

(MultiBranchesPipeline) Stop pipeline.

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

branch
required
string

the name of branch, same as repository brnach.

run
required
string

pipeline run id, the unique id for a pipeline once build.

query Parameters
blocking
string <blocking=%t>
Default: "blocking=false"

stop and between each retries will sleep.

timeOutInSecs
string <timeOutInSecs=%d>
Default: "timeOutInSecs=10"

the time of stop and between each retries sleep.

Responses

200

ok

post /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/stop
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/stop

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_class": "string",
  • "_links":
    {
    },
  • "actions":
    [
    ],
  • "artifactsZipFile": null,
  • "branch":
    {
    },
  • "causeOfBlockage": null,
  • "causes":
    [
    ],
  • "changeSet":
    [
    ],
  • "commitId": "string",
  • "commitUrl": null,
  • "description": null,
  • "durationInMillis": 0,
  • "enQueueTime": "string",
  • "endTime": "string",
  • "estimatedDurationInMillis": 0,
  • "id": "string",
  • "name": null,
  • "organization": "string",
  • "pipeline": "string",
  • "pullRequest": null,
  • "replayable": true,
  • "result": "string",
  • "runSummary": "string",
  • "startTime": "string",
  • "state": "string",
  • "type": "string"
}

Get the sonar quality check information for the specified pipeline branch of the DevOps project. For a detailed explanation of the fields you can refer to the official sonarqube documentation: https://docs.sonarqube.org/7.4/user-guide/metric-definitions/

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, e.g. sample-pipeline

branch
required
string

branch name, e.g. master

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/sonarstatus
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/sonarstatus

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Get the configuration information of the specified pipeline of the DevOps Project

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, e.g. sample-pipeline

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/config
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/config

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "multi_branch_pipeline":
    {
    },
  • "pipeline":
    {
    },
  • "type": "string"
}

Get scan reponsitory logs in the specified pipeline.

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

Responses

200

OK

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/consolelog
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/consolelog

Get all runs of the specified pipeline

Authorizations:
path Parameters
pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

query Parameters
start
string <start=%d>

the item number of the search starts from

limit
string <limit=%d>

the limit item count of the search

branch
string <branch=%s>

the name of branch, same as repository branch, will be filtered by branch.

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Run pipeline.

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

Request Body schema: application/json
parameters
Array of objects (devops.RunPayload.parameters)

Responses

200

ok

post /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "parameters":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_class": "string",
  • "_links":
    {
    },
  • "actions":
    [
    ],
  • "artifactsZipFile": null,
  • "causeOfBlockage": "string",
  • "causes":
    [
    ],
  • "changeSet":
    [
    ],
  • "description": null,
  • "durationInMillis": null,
  • "enQueueTime": null,
  • "endTime": null,
  • "estimatedDurationInMillis": null,
  • "id": "string",
  • "name": null,
  • "organization": "string",
  • "pipeline": "string",
  • "queueId": "string",
  • "replayable": true,
  • "result": "string",
  • "runSummary": null,
  • "startTime": null,
  • "state": "string",
  • "type": "string"
}

Get all activities in the specified pipeline.

Authorizations:
path Parameters
devops
required
string

the name of devops project

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

run
required
string

pipeline run id, the unique id for a pipeline once build.

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_class": "string",
  • "_links":
    {
    },
  • "actions":
    [
    ],
  • "artifactsZipFile": null,
  • "branch": null,
  • "causeOfBlockage": null,
  • "causes":
    [
    ],
  • "changeSet":
    [
    ],
  • "commitId": null,
  • "commitUrl": null,
  • "description": null,
  • "durationInMillis": 0,
  • "enQueueTime": "string",
  • "endTime": "string",
  • "estimatedDurationInMillis": 0,
  • "id": "string",
  • "name": null,
  • "organization": "string",
  • "pipeline": "string",
  • "pullRequest": null,
  • "replayable": true,
  • "result": "string",
  • "runSummary": "string",
  • "startTime": "string",
  • "state": "string",
  • "type": "string"
}

Get all artifacts in the specified pipeline.

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

run
required
string

pipeline run id, the unique id for a pipeline once build.

query Parameters
start
string <start=%d>

the item number of the search starts from.

limit
string <limit=%d>

the limit item count of the search.

Responses

200

The filed of "Url" in response can download artifacts

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/artifacts
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/artifacts

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Get run logs of the specified pipeline activity.

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

run
required
string

pipeline run id, the unique id for a pipeline once build.

query Parameters
start
string <start=%d>
Default: "start=0"

the item number of the search starts from.

Responses

200

OK

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/log
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/log

Get all nodes in the specified activity. node is the stage in the pipeline task

Authorizations:
path Parameters
devops
required
string

the name of devops project

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

run
required
string

pipeline run id, the unique id for a pipeline once build

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodes
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodes

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Get all steps in the specified node.

Authorizations:
path Parameters
devops
required
string

the name of devops project

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

run
required
string

pipeline run id, the unique id for a pipeline once build

node
required
string

pipeline node id, the one node in pipeline.

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Proceed or Break the paused pipeline which waiting for user input.

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

run
required
string

pipeline run id, the unique id for a pipeline once build.

node
required
string

pipeline node id, the one node in pipeline.

step
required
string

pipeline step id

Request Body schema: application/json
abort
boolean

abort or not

id
string

id

parameters
Array of objects (devops.CheckPlayload.parameters)

Responses

200

OK

post /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps/{step}
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps/{step}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "abort": true,
  • "id": "string",
  • "parameters":
    [
    ]
}

Get pipelines step log.

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

run
required
string

pipeline run id, the unique id for a pipeline once build.

node
required
string

pipeline node id, the one node in pipeline.

step
required
string

pipeline step id, the one step in pipeline.

query Parameters
start
string <start=%d>
Default: "start=0"

the item number of the search starts from.

Responses

200

OK

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps/{step}/log
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps/{step}/log

Gives steps details inside a activity node. For a node, the steps which defined inside the node.

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

branch
required
string

the name of branch, same as repository brnach.

run
required
string

pipeline run id, the unique id for a pipeline once build.

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodesdetail
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodesdetail

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Replay pipeline

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

run
required
string

pipeline run id, the unique id for a pipeline once build.

Responses

200

ok

post /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/replay
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/replay

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_class": "string",
  • "_links":
    {
    },
  • "actions":
    [
    ],
  • "artifactsZipFile": null,
  • "causeOfBlockage": "string",
  • "causes":
    [
    ],
  • "changeSet":
    [
    ],
  • "description": null,
  • "durationInMillis": null,
  • "enQueueTime": null,
  • "endTime": null,
  • "estimatedDurationInMillis": null,
  • "id": "string",
  • "name": null,
  • "organization": "string",
  • "pipeline": "string",
  • "queueId": "string",
  • "replayable": true,
  • "result": "string",
  • "runSummary": null,
  • "startTime": null,
  • "state": "string",
  • "type": "string"
}

Stop pipeline

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

run
required
string

pipeline run id, the unique id for a pipeline once build.

query Parameters
blocking
string <blocking=%t>
Default: "blocking=false"

stop and between each retries will sleep.

timeOutInSecs
string <timeOutInSecs=%d>
Default: "timeOutInSecs=10"

the time of stop and between each retries sleep.

Responses

200

ok

post /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/stop
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/stop

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_class": "string",
  • "_links":
    {
    },
  • "actions":
    [
    ],
  • "artifactsZipFile": null,
  • "branch":
    {
    },
  • "causeOfBlockage": null,
  • "causes":
    [
    ],
  • "changeSet":
    [
    ],
  • "commitId": "string",
  • "commitUrl": null,
  • "description": null,
  • "durationInMillis": 0,
  • "enQueueTime": "string",
  • "endTime": "string",
  • "estimatedDurationInMillis": 0,
  • "id": "string",
  • "name": null,
  • "organization": "string",
  • "pipeline": "string",
  • "pullRequest": null,
  • "replayable": true,
  • "result": "string",
  • "runSummary": "string",
  • "startTime": "string",
  • "state": "string",
  • "type": "string"
}

Scan remote Repositorie, Start a build if have new branch.

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, which helps to deliver continuous integration continuous deployment.

query Parameters
delay
string <delay=%d>

will be delay time to scan.

Responses

200

OK

post /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/scan
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/scan

Get the sonar quality information for the specified pipeline of the DevOps project. For a detailed explanation of the fields you can refer to the official sonarqube documentation: https://docs.sonarqube.org/7.4/user-guide/metric-definitions/

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

pipeline
required
string

the name of pipeline, e.g. sample-pipeline

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/sonarstatus
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/sonarstatus

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Search DevOps resource.

Authorizations:
query Parameters
q
string <q=%s>

query pipelines, condition for filtering.

filter
string <filter=%s>

Filter some types of jobs. e.g. no-folder,will not get a job of type folder

start
string <start=%d>

the item number of the search starts from.

limit
string <limit=%d>

the limit item count of the search.

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/search
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/search

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

DevOps Project Member

Get the build-in roles info of the specified DevOps project

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/defaultroles
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/defaultroles

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Get the members of the specified DevOps project

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

query Parameters
paging
string <limit=%d,page=%d>
Default: "limit=10,page=1"

page

conditions
string <key=%s,key~%s>

query conditions, support using key-value pairs separated by comma to search, like 'conditions:somekey=somevalue,anotherkey=anothervalue'

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/members
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/members

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Add a member to the specified DevOps project

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

Responses

200

ok

post /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/members
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/members

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "grand_by": "string",
  • "project_id": "string",
  • "role": "string",
  • "status": "string",
  • "username": "string"
}

Get the specified member of the DevOps project

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

member
required
string

member's username, e.g. admin

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/members/{member}
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/members/{member}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "grand_by": "string",
  • "project_id": "string",
  • "role": "string",
  • "status": "string",
  • "username": "string"
}

Delete the specified member of the DevOps project

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

member
required
string

member's username, e.g. admin

Responses

200

OK

delete /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/members/{member}
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/members/{member}

Update the specified member of the DevOps project

Authorizations:
path Parameters
devops
required
string

DevOps project's ID, e.g. project-RRRRAzLBlLEm

member
required
string

member's username, e.g. admin

Request Body schema: application/json
grand_by
string

Username of the user who assigned the role

project_id
required
string

the DevOps Projects which project membership belongs to

role
required
string

DevOps Project membership's role type. e.g. owner '

status
required
string

Desperated, Status of project membership. e.g. active

username
required
string

Member's username,username can uniquely identify a user

Responses

200

ok

patch /kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/members/{member}
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/members/{member}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "grand_by": "string",
  • "project_id": "string",
  • "role": "string",
  • "status": "string",
  • "username": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "grand_by": "string",
  • "project_id": "string",
  • "role": "string",
  • "status": "string",
  • "username": "string"
}

DevOps Webhook

Get commit notification by HTTP GET method. Git webhook will request here.

Authorizations:
query Parameters
url
required
string <url=%s>

url of git

Responses

200

OK

get /kapis/devops.kubesphere.io/v1alpha2/webhook/git
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/webhook/git

Get commit notification by HTTP POST method. Git webhook will request here.

Authorizations:
query Parameters
url
required
string <url=%s>

url of git

Responses

200

OK

post /kapis/devops.kubesphere.io/v1alpha2/webhook/git
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/webhook/git

Get commit notification. Github webhook will request here.

Authorizations:

Responses

200

OK

post /kapis/devops.kubesphere.io/v1alpha2/webhook/github
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/webhook/github

DevOps Jenkinsfile

Convert json to jenkinsfile format.

Authorizations:
Request Body schema: application/x-www-form-urlencoded
json
string

json data

Responses

200

ok

post /kapis/devops.kubesphere.io/v1alpha2/tojenkinsfile
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/tojenkinsfile

Response samples

Content type
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "status": "string"
}

Convert jenkinsfile to json format. Usually the frontend uses json to show or edit pipeline

Authorizations:
Request Body schema: application/x-www-form-urlencoded
jenkinsfile
string

jenkinsfile

Responses

200

ok

post /kapis/devops.kubesphere.io/v1alpha2/tojson
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/tojson

Response samples

Content type
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "status": "string"
}

DevOps Scm

List all organizations of the specified source configuration management (SCM) such as Github.

Authorizations:
path Parameters
scm
required
string

the id of the source configuration management (SCM).

query Parameters
credentialId
required
string <credentialId=%s>

credential id for source configuration management (SCM).

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/scms/{scm}/organizations
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/scms/{scm}/organizations

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

List all repositories in the specified organization.

Authorizations:
path Parameters
scm
required
string

The id of the source configuration management (SCM).

organization
required
string

organization Id, such as github username.

query Parameters
credentialId
required
string <credentialId=%s>

credential id for SCM.

pageNumber
required
string <pageNumber=%d>

page number.

pageSize
required
string <pageSize=%d>

the item count of one page.

Responses

200

ok

get /kapis/devops.kubesphere.io/v1alpha2/scms/{scm}/organizations/{organization}/repositories
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/scms/{scm}/organizations/{organization}/repositories

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Validate the access token of the specified source configuration management (SCM) such as Github

Authorizations:
path Parameters
scm
required
string

the id of the source configuration management (SCM).

Responses

200

ok

post /kapis/devops.kubesphere.io/v1alpha2/scms/{scm}/verify
https://console.kubesphere.io/kapis/devops.kubesphere.io/v1alpha2/scms/{scm}/verify

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "credentialId": "string"
}

Identity Management

TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.

Authorizations:
Request Body schema: application/json
apiVersion
required
string

Kubernetes API version

kind
required
string

kind of the API object

spec
object (iam.Spec)
status
object (iam.Status)

Responses

200

ok

post /kapis/iam.kubesphere.io/v1alpha2/authenticate
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/authenticate

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "apiVersion": "string",
  • "kind": "string",
  • "spec":
    {
    },
  • "status":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "apiVersion": "string",
  • "kind": "string",
  • "spec":
    {
    },
  • "status":
    {
    }
}

KubeSphere APIs support token-based authentication via the Authtoken request header. The POST Login API is used to retrieve the authentication token. After the authentication token is obtained, it must be inserted into the Authtoken header for all requests.

Authorizations:
Request Body schema: application/json
password
required
string

password

username
required
string

username

Responses

200

ok

post /kapis/iam.kubesphere.io/v1alpha2/login
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/login

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "password": "string",
  • "username": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "access_token": "string"
}

List all users.

Authorizations:

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/users
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/users

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ],
  • "total_count": 0
}

Create a user account.

Authorizations:
Request Body schema: application/json
cluster_role
required
string

user's cluster role

description
required
string

user's description

email
required
string

email address

lang
string

user's language setting, default is zh-CN

password
required
string

password'

username
required
string

username

Responses

200

ok

post /kapis/iam.kubesphere.io/v1alpha2/users
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/users

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "cluster_role": "string",
  • "description": "string",
  • "email": "string",
  • "lang": "string",
  • "password": "string",
  • "username": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "string"
}

Describe the specified user.

Authorizations:
path Parameters
user
required
string

username

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/users/{user}
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/users/{user}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "avatar_url": "string",
  • "cluster_role": "string",
  • "create_time": "2023-06-06T09:04:07Z",
  • "current_password": "string",
  • "description": "string",
  • "email": "string",
  • "groups":
    [
    ],
  • "lang": "string",
  • "last_login_time": "string",
  • "password": "string",
  • "role": "string",
  • "role_bind_time": "2023-06-06T09:04:07Z",
  • "role_binding": "string",
  • "roles":
    {
    },
  • "status": 0,
  • "username": "string",
  • "workspace_role": "string"
}

Update information about the specified user.

Authorizations:
path Parameters
user
required
string

username

Request Body schema: application/json
cluster_role
required
string

user's cluster role

current_password
string

this is necessary if you need to change your password

description
required
string

user's description

email
required
string

email address

lang
required
string

user's language setting, default is zh-CN

password
string

this is necessary if you need to change your password

username
required
string

username

Responses

200

ok

put /kapis/iam.kubesphere.io/v1alpha2/users/{user}
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/users/{user}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "cluster_role": "string",
  • "current_password": "string",
  • "description": "string",
  • "email": "string",
  • "lang": "string",
  • "password": "string",
  • "username": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "string"
}

Delete the specified user.

Authorizations:
path Parameters
user
required
string

username

Responses

200

ok

delete /kapis/iam.kubesphere.io/v1alpha2/users/{user}
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/users/{user}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "string"
}

Retrieve the "login logs" for the specified user.

Authorizations:
path Parameters
user
required
string

username

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/users/{user}/logs
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/users/{user}/logs

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "login_ip": "string",
  • "login_time": "string"
}

Access Management

List all cluster roles.

Authorizations:

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/clusterroles
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/clusterroles

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ],
  • "total_count": 0
}

List all policy rules of the specified cluster role.

Authorizations:
path Parameters
clusterrole
required
string

cluster role name

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/clusterroles/{clusterrole}/rules
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/clusterroles/{clusterrole}/rules

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

List all users that are bound to the specified cluster role.

Authorizations:
path Parameters
clusterrole
required
string

cluster role name

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/clusterroles/{clusterrole}/users
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/clusterroles/{clusterrole}/users

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ],
  • "total_count": 0
}

List all policy rules of the specified role in the given devops project.

Authorizations:
path Parameters
devops
required
string

devops project ID

role
required
string

devops role name

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/devops/{devops}/roles/{role}/rules
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/devops/{devops}/roles/{role}/rules

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Retrieve the roles that are assigned to the user in the specified namespace.

Authorizations:
path Parameters
namespace
required
string

kubernetes namespace

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/namespaces/{namespace}/roles
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/namespaces/{namespace}/roles

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ],
  • "total_count": 0
}

List all policy rules of the specified role in the given namespace.

Authorizations:
path Parameters
namespace
required
string

kubernetes namespace

role
required
string

role name

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/namespaces/{namespace}/roles/{role}/rules
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/namespaces/{namespace}/roles/{role}/rules

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Retrieve the users that are bound to the role in the specified namespace.

Authorizations:
path Parameters
namespace
required
string

kubernetes namespace

role
required
string

role name

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/namespaces/{namespace}/roles/{role}/users
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/namespaces/{namespace}/roles/{role}/users

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

List all users in the specified namespace.

Authorizations:
path Parameters
namespace
required
string

kubernetes namespace

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/namespaces/{namespace}/users
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/namespaces/{namespace}/users

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Get the mapping relationships between cluster roles and policy rules.

Authorizations:

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/rulesmapping/clusterroles
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/rulesmapping/clusterroles

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Get the mapping relationships between namespaced roles and policy rules.

Authorizations:

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/rulesmapping/roles
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/rulesmapping/roles

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Retrieve all the roles that are assigned to the specified user.

Authorizations:
path Parameters
user
required
string

username

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/users/{user}/roles
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/users/{user}/roles

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "clusterRole":
    [
    ],
  • "roles":
    [
    ]
}

List all members in the specified workspace.

Authorizations:
path Parameters
workspace
required
string

workspace name

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/members
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/members

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ],
  • "total_count": 0
}

Invite a member to the specified workspace.

Authorizations:
path Parameters
workspace
required
string

workspace name

Request Body schema: application/json
username
required
string

username

workspace_role
required
string

user's workspace role'

Responses

200

ok

post /kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/members
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/members

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "username": "string",
  • "workspace_role": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "string"
}

Describe the specified user in the given workspace.

Authorizations:
path Parameters
workspace
required
string

workspace name

member
required
string

username

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/members/{member}
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/members/{member}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "cluster_role": "string",
  • "create_time": "2023-06-06T09:04:07Z",
  • "description": "string",
  • "email": "string",
  • "lang": "string",
  • "last_login_time": "2023-06-06T09:04:07Z",
  • "username": "string",
  • "workspace_role": "string"
}

Remove the specified member from the workspace.

Authorizations:
path Parameters
workspace
required
string

workspace name

member
required
string

username

Responses

200

ok

delete /kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/members/{member}
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/members/{member}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "string"
}

List all workspace roles.

Authorizations:
path Parameters
workspace
required
string

workspace name

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/roles
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/roles

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ],
  • "total_count": 0
}

Describe the workspace role.

Authorizations:
path Parameters
workspace
required
string

workspace name

role
required
string

workspace role name

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/roles/{role}
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/roles/{role}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "aggregationRule":
    {
    },
  • "apiVersion": "string",
  • "kind": "string",
  • "metadata":
    {
    },
  • "rules":
    [
    ]
}

List all policy rules of the specified workspace role.

Authorizations:
path Parameters
workspace
required
string

workspace name

role
required
string

workspace role name

Responses

200

ok

get /kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/roles/{role}/rules
https://console.kubesphere.io/kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/roles/{role}/rules

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Cluster Resources

get abnormal workloads' count of whole cluster

Authorizations:

Responses

200

ok

get /kapis/resources.kubesphere.io/v1alpha2/abnormalworkloads
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/abnormalworkloads

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "items": { },
  • "namespace": "string"
}

List applications in cluster

Authorizations:
query Parameters
conditions
string <key=value,key~value>

query conditions, connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a

cluster_id
string

equivalent to application unique ID

runtime_id
string

runtime id initialization when namespace is created, means which namespace

paging
string <limit=%d,page=%d>
Default: "limit=10,page=1"

paging query, e.g. limit=100,page=1

Responses

200

ok

get /kapis/resources.kubesphere.io/v1alpha2/applications
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/applications

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ],
  • "total_count": 0
}

Drain node

Authorizations:
path Parameters
node
required
string

node name

Responses

200

ok

post /kapis/resources.kubesphere.io/v1alpha2/nodes/{node}/drainage
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/nodes/{node}/drainage

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "string"
}

get whole cluster's resource usage

Authorizations:

Responses

200

ok

get /kapis/resources.kubesphere.io/v1alpha2/quotas
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/quotas

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "namespace": "string"
}

List all routers

Authorizations:

Responses

200

ok

get /kapis/resources.kubesphere.io/v1alpha2/routers
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/routers

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "apiVersion": "string",
  • "kind": "string",
  • "metadata":
    {
    },
  • "spec":
    {
    },
  • "status":
    {
    }
}

Cluster level resource query

Authorizations:
path Parameters
resources
required
string

cluster level resource type, e.g. nodes,workspaces,storageclasses,clusterroles.

query Parameters
conditions
string <key=value,key~value>

query conditions, connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a

paging
string <limit=%d,page=%d>
Default: "limit=10,page=1"

paging query, e.g. limit=100,page=1

reverse
string

sort parameters, e.g. reverse=true

orderBy
string

sort parameters, e.g. orderBy=createTime

Responses

200

ok

get /kapis/resources.kubesphere.io/v1alpha2/{resources}
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/{resources}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ],
  • "total_count": 0
}

Namespace Resources

get abnormal workloads' count of specified namespace

Authorizations:
path Parameters
namespace
required
string

the name of the project

Responses

200

ok

get /kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/abnormalworkloads
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/abnormalworkloads

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "items": { },
  • "namespace": "string"
}

List all applications within the specified namespace

Authorizations:
path Parameters
namespace
required
string

the name of the project

query Parameters
conditions
string <key=value,key~value>

query conditions, connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a

paging
string <limit=%d,page=%d>
Default: "limit=10,page=1"

paging query, e.g. limit=100,page=1

Responses

200

ok

get /kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/applications
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/applications

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ],
  • "total_count": 0
}

Deploy a new application

Authorizations:
path Parameters
namespace
required
string

the name of the project

Request Body schema: application/json
app_id
required
string
conf
required
string
runtime_id
required
string
version_id
required
string

Responses

200

ok

post /kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/applications
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/applications

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "app_id": "string",
  • "conf": "string",
  • "runtime_id": "string",
  • "version_id": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "string"
}

Describe the specified application of the namespace

Authorizations:
path Parameters
namespace
required
string

the name of the project

application
required
string

application ID

Responses

200

ok

get /kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/applications/{application}
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/applications/{application}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "app": "string",
  • "app_id": "string",
  • "cluster_id": "string",
  • "createTime": "2023-06-06T09:04:07Z",
  • "description": "string",
  • "ingresses":
    [
    ],
  • "name": "string",
  • "namespace": "string",
  • "repoName": "string",
  • "runtime_id": "string",
  • "services":
    [
    ],
  • "status": "string",
  • "updateTime": "2023-06-06T09:04:07Z",
  • "version": "string",
  • "version_id": "string",
  • "workloads":
    {
    }
}

Delete the specified application

Authorizations:
path Parameters
namespace
required
string

the name of the project

application
required
string

application ID

Responses

200

ok

delete /kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/applications/{application}
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/applications/{application}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "string"
}

Get the specified daemonset revision

Authorizations:
path Parameters
daemonset
required
string

the name of the daemonset

namespace
required
string

the namespace of the daemonset

revision
required
string

the revision of the daemonset

Responses

200

ok

get /kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/daemonsets/{daemonset}/revisions/{revision}
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/daemonsets/{daemonset}/revisions/{revision}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "apiVersion": "string",
  • "kind": "string",
  • "metadata":
    {
    },
  • "spec":
    {
    },
  • "status":
    {
    }
}

Get the specified deployment revision

Authorizations:
path Parameters
deployment
required
string

the name of deployment

namespace
required
string

the namespace of the deployment

revision
required
string

the revision of the deployment

Responses

200

ok

get /kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/deployments/{deployment}/revisions/{revision}
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/deployments/{deployment}/revisions/{revision}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "apiVersion": "string",
  • "kind": "string",
  • "metadata":
    {
    },
  • "spec":
    {
    },
  • "status":
    {
    }
}

Rerun job whether the job is complete or not

Authorizations:
path Parameters
job
required
string

job name

namespace
required
string

the namespace where the job runs in

query Parameters
a
string

action

Responses

200

ok

post /kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/jobs/{job}
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/jobs/{job}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "string"
}

get specified namespace's resource quota and usage

Authorizations:
path Parameters
namespace
required
string

the name of the project

Responses

200

ok

get /kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/quotas
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/quotas

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "namespace": "string"
}

List router of a specified project

Authorizations:
path Parameters
namespace
required
string

the name of the project

Responses

200

OK

get /kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/router
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/router

Update a router for a specified project

Authorizations:
path Parameters
namespace
required
string

the name of the project

Responses

200

OK

put /kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/router
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/router

Create a router for a specified project

Authorizations:
path Parameters
namespace
required
string

the name of the project

Responses

200

OK

post /kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/router
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/router

List router of a specified project

Authorizations:
path Parameters
namespace
required
string

the name of the project

Responses

200

OK

delete /kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/router
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/router

Get the specified statefulset revision

Authorizations:
path Parameters
statefulset
required
string

the name of the statefulset

namespace
required
string

the namespace of the statefulset

revision
required
string

the revision of the statefulset

Responses

200

ok

get /kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/statefulsets/{statefulset}/revisions/{revision}
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/statefulsets/{statefulset}/revisions/{revision}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "apiVersion": "string",
  • "kind": "string",
  • "metadata":
    {
    },
  • "spec":
    {
    },
  • "status":
    {
    }
}

Namespace level resource query

Authorizations:
path Parameters
namespace
required
string

the name of the project

resources
required
string

namespace level resource type, e.g. pods,jobs,configmaps,services.

query Parameters
conditions
string <key=%s,key~%s>

query conditions,connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a

paging
string <limit=%d,page=%d>
Default: "limit=10,page=1"

paging query, e.g. limit=100,page=1

reverse
string

sort parameters, e.g. reverse=true

orderBy
string

sort parameters, e.g. orderBy=createTime

Responses

200

ok

get /kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/{resources}
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/{resources}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ],
  • "total_count": 0
}

User Resources

get users' kubeconfig

Authorizations:
path Parameters
user
required
string

username

Responses

200

ok

get /kapis/resources.kubesphere.io/v1alpha2/users/{user}/kubeconfig
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/users/{user}/kubeconfig

Response samples

Content type
No sample

get user's kubectl pod

Authorizations:
path Parameters
user
required
string

username

Responses

200

ok

get /kapis/resources.kubesphere.io/v1alpha2/users/{user}/kubectl
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/users/{user}/kubectl

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "container": "string",
  • "namespace": "string",
  • "pod": "string"
}

Component Status

Get the health status of system components.

Authorizations:

Responses

200

ok

get /kapis/resources.kubesphere.io/v1alpha2/componenthealth
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/componenthealth

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kubernetesStatus":
    [
    ],
  • "kubesphereStatus":
    [
    ],
  • "nodeStatus":
    {
    }
}

List the system components.

Authorizations:

Responses

200

ok

get /kapis/resources.kubesphere.io/v1alpha2/components
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/components

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Describe the specified system component.

Authorizations:
path Parameters
component
required
string

component name

Responses

200

ok

get /kapis/resources.kubesphere.io/v1alpha2/components/{component}
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/components/{component}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "healthyBackends": 0,
  • "label": null,
  • "name": "string",
  • "namespace": "string",
  • "selfLink": "string",
  • "startedAt": "2023-06-06T09:04:07Z",
  • "totalBackends": 0
}

Tenant Resources

List the rules for the current user

Authorizations:
path Parameters
devops
required
string

devops project id

Responses

200

ok

get /kapis/tenant.kubesphere.io/v1alpha2/devops/{devops}/rules
https://console.kubesphere.io/kapis/tenant.kubesphere.io/v1alpha2/devops/{devops}/rules

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "actions":
    [
    ],
  • "name": "string"
}

Query cluster-level logs in a multi-tenants environment

Authorizations:
query Parameters
operation
required
string

Query type. This can be one of three types: query (for querying logs), statistics (for retrieving statistical data), and histogram (for displaying log count by time interval).

workspaces
string

A comma-separated list of workspaces. This field restricts the query to specified workspaces. For example, the following filter matches the workspace my-ws and demo-ws: my-ws,demo-ws

workspace_query
string

A comma-separated list of keywords. Differing from workspaces, this field performs fuzzy matching on workspaces. For example, the following value limits the query to workspaces whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

namespaces
string

A comma-separated list of namespaces. This field restricts the query to specified namespaces. For example, the following filter matches the namespace my-ns and demo-ns: my-ns,demo-ns

namespace_query
string

A comma-separated list of keywords. Differing from namespaces, this field performs fuzzy matching on namespaces. For example, the following value limits the query to namespaces whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

workloads
string

A comma-separated list of workloads. This field restricts the query to specified workloads. For example, the following filter matches the workload my-wl and demo-wl: my-wl,demo-wl

workload_query
string

A comma-separated list of keywords. Differing from workloads, this field performs fuzzy matching on workloads. For example, the following value limits the query to workloads whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

pods
string

A comma-separated list of pods. This field restricts the query to specified pods. For example, the following filter matches the pod my-po and demo-po: my-po,demo-po

pod_query
string

A comma-separated list of keywords. Differing from pods, this field performs fuzzy matching on pods. For example, the following value limits the query to pods whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

containers
string

A comma-separated list of containers. This field restricts the query to specified containers. For example, the following filter matches the container my-cont and demo-cont: my-cont,demo-cont

container_query
string

A comma-separated list of keywords. Differing from containers, this field performs fuzzy matching on containers. For example, the following value limits the query to containers whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

log_query
string

A comma-separated list of keywords. The query returns logs which contain at least one keyword. Case-insensitive matching. For example, if the field is set to err,INFO, the query returns any log containing err(ERR,Err,...) OR INFO(info,InFo,...).

interval
string
Default: "15m"

Time interval. It requires operation is set to histogram. The format is [0-9]+[smhdwMqy]. Defaults to 15m (i.e. 15 min).

start_time
string

Start time of query. Default to 0. The format is a string representing milliseconds since the epoch, eg. 1559664000000.

end_time
string

End time of query. Default to now. The format is a string representing milliseconds since the epoch, eg. 1559664000000.

sort
string
Default: "desc"

Direction of the sort. One of acs, desc. This field sorts logs by timestamp.

from
integer
Default: 0

The offset from the result set. This field returns query results from the specified offset. It requires operation is set to query. Defaults to 0 (i.e. from the beginning of the result set).

size
integer
Default: 10

Size of result to return. It requires operation is set to query. Defaults to 10 (i.e. 10 log records).

Responses

200

ok

get /kapis/tenant.kubesphere.io/v1alpha2/logs
https://console.kubesphere.io/kapis/tenant.kubesphere.io/v1alpha2/logs

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_shards":
    {
    },
  • "aggregations": "string",
  • "hits":
    {
    },
  • "status": 0,
  • "workspace": "string"
}

List the rules for the current user

Authorizations:
path Parameters
namespace
required
string

namespace

Responses

200

ok

get /kapis/tenant.kubesphere.io/v1alpha2/namespaces/{namespace}/rules
https://console.kubesphere.io/kapis/tenant.kubesphere.io/v1alpha2/namespaces/{namespace}/rules

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "actions":
    [
    ],
  • "name": "string"
}

List workspace by user

Authorizations:

Responses

200

ok

get /kapis/tenant.kubesphere.io/v1alpha2/workspaces
https://console.kubesphere.io/kapis/tenant.kubesphere.io/v1alpha2/workspaces

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ],
  • "total_count": 0
}

Describe workspace

Authorizations:
path Parameters
workspace
required
string

workspace name

Responses

200

ok

get /kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}
https://console.kubesphere.io/kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "apiVersion": "string",
  • "kind": "string",
  • "metadata":
    {
    },
  • "spec":
    {
    },
  • "status": null
}

List devops projects for the current user

Authorizations:
path Parameters
workspace
required
string

workspace name

query Parameters
paging
string <limit=%d,page=%d>
Default: "limit=10,page=1"

page

conditions
string <key=%s,key~%s>

query conditions

Responses

200

OK

get /kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/devops
https://console.kubesphere.io/kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/devops

Create devops project

Authorizations:
path Parameters
workspace
required
string

workspace name

Request Body schema: application/json
create_time
required
string <date-time>

DevOps Project's Creation time'

creator
required
string

Creator's username'

description
string

DevOps Projects's Description, used to describe the DevOps Project'

extra
string

Internal Use

name
required
string

DevOps Projects's Name

project_id
required
string

ProjectId must be unique within a workspace, it is generated by kubesphere.

status
required
string

DevOps project's status. e.g. active

visibility
string

Desperated Field

workspace
required
string

The workspace to which the devops project belongs

Responses

200

ok

post /kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/devops
https://console.kubesphere.io/kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/devops

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "create_time": "2023-06-06T09:04:07Z",
  • "creator": "string",
  • "description": "string",
  • "extra": "string",
  • "name": "string",
  • "project_id": "string",
  • "status": "string",
  • "visibility": "string",
  • "workspace": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "create_time": "2023-06-06T09:04:07Z",
  • "creator": "string",
  • "description": "string",
  • "extra": "string",
  • "name": "string",
  • "project_id": "string",
  • "status": "string",
  • "visibility": "string",
  • "workspace": "string"
}

Delete devops project

Authorizations:
path Parameters
workspace
required
string

workspace name

devops
required
string

devops project id

Responses

200

ok

delete /kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/devops/{devops}
https://console.kubesphere.io/kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/devops/{devops}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "create_time": "2023-06-06T09:04:07Z",
  • "creator": "string",
  • "description": "string",
  • "extra": "string",
  • "name": "string",
  • "project_id": "string",
  • "status": "string",
  • "visibility": "string",
  • "workspace": "string"
}

List the devops projects for the workspace member

Authorizations:
path Parameters
workspace
required
string

workspace name

member
required
string

workspace member's username

query Parameters
paging
string <limit=%d,page=%d>
Default: "limit=10,page=1"

page

conditions
string <key=%s,key~%s>

query conditions

Responses

200

ok

get /kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/members/{member}/devops
https://console.kubesphere.io/kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/members/{member}/devops

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ],
  • "total_count": 0
}

List the namespaces for the workspace member

Authorizations:
path Parameters
workspace
required
string

workspace name

member
required
string

workspace member's username

Responses

200

ok

get /kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/members/{member}/namespaces
https://console.kubesphere.io/kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/members/{member}/namespaces

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

List the namespaces for the current user

Authorizations:
path Parameters
workspace
required
string

workspace name

Responses

200

ok

get /kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/namespaces
https://console.kubesphere.io/kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/namespaces

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Create namespace

Authorizations:
path Parameters
workspace
required
string

workspace name

Responses

200

ok

post /kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/namespaces
https://console.kubesphere.io/kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/namespaces

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Delete namespace

Authorizations:
path Parameters
workspace
required
string

workspace name

namespace
required
string

namespace

Responses

200

ok

delete /kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/namespaces/{namespace}
https://console.kubesphere.io/kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/namespaces/{namespace}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "string"
}

List the rules for the current user

Authorizations:
path Parameters
workspace
required
string

workspace name

Responses

200

ok

get /kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/rules
https://console.kubesphere.io/kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/rules

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "actions":
    [
    ],
  • "name": "string"
}

Verification

Verify if the kubernetes secret has read access to the git repository

Authorizations:
Request Body schema: application/json
remoteUrl
required
string

git server url

secretRef
object (v1.SecretReference)

SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace

Responses

200

ok

post /kapis/resources.kubesphere.io/v1alpha2/git/verify
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/git/verify

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "remoteUrl": "string",
  • "secretRef":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "string"
}

verify if a user has access to the docker registry

Authorizations:
Request Body schema: application/json
password
required
string

password

serverhost
required
string

registry server host

username
required
string

username

Responses

200

ok

post /kapis/resources.kubesphere.io/v1alpha2/registry/verify
https://console.kubesphere.io/kapis/resources.kubesphere.io/v1alpha2/registry/verify

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "password": "string",
  • "serverhost": "string",
  • "username": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "string"
}

Cluster Metrics

Get cluster-level metric data.

Authorizations:
query Parameters
metrics_filter
string

The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both cluster CPU usage and disk usage: cluster_cpu_usage|cluster_disk_size_usage. View available metrics at kubesphere.io.

start
string

Start time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200.

end
string

End time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200.

step
string
Default: "10m"

Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both start and end are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).

time
string

A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.

Responses

200

ok

get /kapis/monitoring.kubesphere.io/v1alpha2/cluster
https://console.kubesphere.io/kapis/monitoring.kubesphere.io/v1alpha2/cluster

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "metrics_level": "string",
  • "page": 0,
  • "results":
    [
    ],
  • "total_item": 0,
  • "total_page": 0
}

Node Metrics

Get node-level metric data of all nodes.

Authorizations:
query Parameters
metrics_filter
string

The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both node CPU usage and disk usage: node_cpu_usage|node_disk_size_usage. View available metrics at kubesphere.io.

resources_filter
string

The node filter consists of a regexp pattern. It specifies which node data to return. For example, the following filter matches both node i-caojnter and i-cmu82ogj: i-caojnter|i-cmu82ogj.

start
string

Start time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200.

end
string

End time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200.

step
string
Default: "10m"

Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both start and end are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).

time
string

A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.

sort_metric
string

Sort nodes by the specified metric. Not applicable if start and end are provided.

sort_type
string
Default: "desc."

Sort order. One of asc, desc.

page
integer

The page number. This field paginates result data of each metric, then returns a specific page. For example, setting page to 2 returns the second page. It only applies to sorted metric data.

limit
integer
Default: 5

Page size, the maximum number of results in a single page. Defaults to 5.

Responses

200

ok

get /kapis/monitoring.kubesphere.io/v1alpha2/nodes
https://console.kubesphere.io/kapis/monitoring.kubesphere.io/v1alpha2/nodes

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "metrics_level": "string",
  • "page": 0,
  • "results":
    [
    ],
  • "total_item": 0,
  • "total_page": 0
}

Get node-level metric data of the specific node.

Authorizations:
path Parameters
node
required
string

Node name.

query Parameters
metrics_filter
string

The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both node CPU usage and disk usage: node_cpu_usage|node_disk_size_usage. View available metrics at kubesphere.io.

start
string

Start time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200.

end
string

End time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200.

step
string
Default: "10m"

Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both start and end are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).

time
string

A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.

Responses

200

ok

get /kapis/monitoring.kubesphere.io/v1alpha2/nodes/{node}
https://console.kubesphere.io/kapis/monitoring.kubesphere.io/v1alpha2/nodes/{node}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "metrics_level": "string",
  • "page": 0,
  • "results":
    [
    ],
  • "total_item": 0,
  • "total_page": 0
}

Namespace Metrics

Get namespace-level metric data of all namespaces.

Authorizations:
query Parameters
metrics_filter
string

The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both namespace CPU usage and memory usage: namespace_cpu_usage|namespace_memory_usage. View available metrics at kubesphere.io.

resources_filter
string

The namespace filter consists of a regexp pattern. It specifies which namespace data to return. For example, the following filter matches both namespace test and kube-system: test|kube-system.

start
string

Start time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200.

end
string

End time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200.

step
string
Default: "10m"

Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both start and end are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).

time
string

A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.

sort_metric
string

Sort namespaces by the specified metric. Not applicable if start and end are provided.

sort_type
string
Default: "desc."

Sort order. One of asc, desc.

page
integer

The page number. This field paginates result data of each metric, then returns a specific page. For example, setting page to 2 returns the second page. It only applies to sorted metric data.

limit
integer
Default: 5

Page size, the maximum number of results in a single page. Defaults to 5.

Responses

200

ok

get /kapis/monitoring.kubesphere.io/v1alpha2/namespaces
https://console.kubesphere.io/kapis/monitoring.kubesphere.io/v1alpha2/namespaces

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "metrics_level": "string",
  • "page": 0,
  • "results":
    [
    ],
  • "total_item": 0,
  • "total_page": 0
}

Get namespace-level metric data of the specific namespace.

Authorizations:
path Parameters
namespace
required
string

The name of the namespace.

query Parameters
metrics_filter
string

The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both namespace CPU usage and memory usage: namespace_cpu_usage|namespace_memory_usage. View available metrics at kubesphere.io.

start
string

Start time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200.

end
string

End time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200.

step
string
Default: "10m"

Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both start and end are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).

time
string

A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.

Responses

200

ok

get /kapis/monitoring.kubesphere.io/v1alpha2/namespaces/{namespace}
https://console.kubesphere.io/kapis/monitoring.kubesphere.io/v1alpha2/namespaces/{namespace}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "metrics_level": "string",
  • "page": 0,
  • "results":
    [
    ],
  • "total_item": 0,
  • "total_page": 0
}

Workload Metrics

Get workload-level metric data of a specific namespace's workloads.

Authorizations:
path Parameters
namespace
required
string

The name of the namespace.

query Parameters
metrics_filter
string

The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both workload CPU usage and memory usage: workload_pod_cpu_usage|workload_pod_memory_usage. View available metrics at kubesphere.io.

resources_filter
string

The workload filter consists of a regexp pattern. It specifies which workload data to return. For example, the following filter matches any workload whose name begins with prometheus: prometheus.*.

start
string

Start time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200.

end
string

End time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200.

step
string
Default: "10m"

Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both start and end are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).

time
string

A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.

sort_metric
string

Sort workloads by the specified metric. Not applicable if start and end are provided.

sort_type
string
Default: "desc."

Sort order. One of asc, desc.

page
integer

The page number. This field paginates result data of each metric, then returns a specific page. For example, setting page to 2 returns the second page. It only applies to sorted metric data.

limit
integer
Default: 5

Page size, the maximum number of results in a single page. Defaults to 5.

Responses

200

ok

get /kapis/monitoring.kubesphere.io/v1alpha2/namespaces/{namespace}/workloads
https://console.kubesphere.io/kapis/monitoring.kubesphere.io/v1alpha2/namespaces/{namespace}/workloads

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "metrics_level": "string",
  • "page": 0,
  • "results":
    [
    ],
  • "total_item": 0,
  • "total_page": 0
}

Get workload-level metric data of all workloads which belongs to a specific kind.

Authorizations:
path Parameters
namespace
required
string

The name of the namespace.

kind
required
string

Workload kind. One of deployment, daemonset, statefulset.

query Parameters
metrics_filter
string

The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both workload CPU usage and memory usage: workload_pod_cpu_usage|workload_pod_memory_usage. View available metrics at kubesphere.io.

resources_filter
string

The workload filter consists of a regexp pattern. It specifies which workload data to return. For example, the following filter matches any workload whose name begins with prometheus: prometheus.*.

start
string

Start time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200.

end
string

End time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200.

step
string
Default: "10m"

Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both start and end are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).

time
string

A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.

sort_metric
string

Sort workloads by the specified metric. Not applicable if start and end are provided.

sort_type
string
Default: "desc."

Sort order. One of asc, desc.

page
integer

The page number. This field paginates result data of each metric, then returns a specific page. For example, setting page to 2 returns the second page. It only applies to sorted metric data.

limit
integer
Default: 5

Page size, the maximum number of results in a single page. Defaults to 5.

Responses

200

ok

get /kapis/monitoring.kubesphere.io/v1alpha2/namespaces/{namespace}/workloads/{kind}
https://console.kubesphere.io/kapis/monitoring.kubesphere.io/v1alpha2/namespaces/{namespace}/workloads/{kind}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "metrics_level": "string",
  • "page": 0,
  • "results":
    [
    ],
  • "total_item": 0,
  • "total_page": 0
}

Pod Metrics

Get pod-level metric data of the specific namespace's pods.

Authorizations:
path Parameters
namespace
required
string

The name of the namespace.

query Parameters
metrics_filter
string

The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both pod CPU usage and memory usage: pod_cpu_usage|pod_memory_usage. View available metrics at kubesphere.io.

resources_filter
string

The pod filter consists of a regexp pattern. It specifies which pod data to return. For example, the following filter matches any pod whose name begins with redis: redis.*.

start
string

Start time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200.

end
string

End time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200.

step
string
Default: "10m"

Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both start and end are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).

time
string

A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.

sort_metric
string

Sort pods by the specified metric. Not applicable if start and end are provided.

sort_type
string
Default: "desc."

Sort order. One of asc, desc.

page
integer

The page number. This field paginates result data of each metric, then returns a specific page. For example, setting page to 2 returns the second page. It only applies to sorted metric data.

limit
integer
Default: 5

Page size, the maximum number of results in a single page. Defaults to 5.

Responses

200

ok

get /kapis/monitoring.kubesphere.io/v1alpha2/namespaces/{namespace}/pods
https://console.kubesphere.io/kapis/monitoring.kubesphere.io/v1alpha2/namespaces/{namespace}/pods

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "metrics_level": "string",
  • "page": 0,
  • "results":
    [
    ],
  • "total_item": 0,
  • "total_page": 0
}

Get pod-level metric data of a specific pod. Navigate to the pod by the pod's namespace.

Authorizations:
path Parameters
namespace
required
string

The name of the namespace.

pod
required
string

Pod name.

query Parameters
metrics_filter
string

The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both pod CPU usage and memory usage: pod_cpu_usage|pod_memory_usage. View available metrics at kubesphere.io.

start
string

Start time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200.

end
string

End time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200.

step
string
Default: "10m"

Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both start and end are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).

time
string

A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.

Responses

200

ok

get /kapis/monitoring.kubesphere.io/v1alpha2/namespaces/{namespace}/pods/{pod}
https://console.kubesphere.io/kapis/monitoring.kubesphere.io/v1alpha2/namespaces/{namespace}/pods/{pod}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "metrics_level": "string",
  • "page": 0,
  • "results":
    [
    ],
  • "total_item": 0,
  • "total_page": 0
}

Get pod-level metric data of a specific workload's pods. Navigate to the workload by the namespace.

Authorizations:
path Parameters
namespace
required
string

The name of the namespace.

kind
required
string

Workload kind. One of deployment, daemonset, statefulset.

workload
required
string

Workload name.

query Parameters
metrics_filter
string

The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both pod CPU usage and memory usage: pod_cpu_usage|pod_memory_usage. View available metrics at kubesphere.io.

resources_filter
string

The pod filter consists of a regexp pattern. It specifies which pod data to return. For example, the following filter matches any pod whose name begins with redis: redis.*.

start
string

Start time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200.

end
string

End time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200.

step
string
Default: "10m"

Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both start and end are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).

time
string

A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.

sort_metric
string

Sort pods by the specified metric. Not applicable if start and end are provided.

sort_type
string
Default: "desc."

Sort order. One of asc, desc.

page
integer

The page number. This field paginates result data of each metric, then returns a specific page. For example, setting page to 2 returns the second page. It only applies to sorted metric data.

limit
integer
Default: 5

Page size, the maximum number of results in a single page. Defaults to 5.

Responses

200

ok

get /kapis/monitoring.kubesphere.io/v1alpha2/namespaces/{namespace}/workloads/{kind}/{workload}/pods
https://console.kubesphere.io/kapis/monitoring.kubesphere.io/v1alpha2/namespaces/{namespace}/workloads/{kind}/{workload}/pods

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "metrics_level": "string",
  • "page": 0,
  • "results":
    [
    ],
  • "total_item": 0,
  • "total_page": 0
}

Get pod-level metric data of all pods on a specific node.

Authorizations:
path Parameters
node
required
string

Node name.

query Parameters
metrics_filter
string

The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both pod CPU usage and memory usage: pod_cpu_usage|pod_memory_usage. View available metrics at kubesphere.io.

resources_filter
string

The pod filter consists of a regexp pattern. It specifies which pod data to return. For example, the following filter matches any pod whose name begins with redis: redis.*.

start
string

Start time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200.

end
string

End time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200.

step
string
Default: "10m"

Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both start and end are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).

time
string

A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.

sort_metric
string

Sort pods by the specified metric. Not applicable if start and end are provided.

sort_type
string
Default: "desc."

Sort order. One of asc, desc.

page
integer

The page number. This field paginates result data of each metric, then returns a specific page. For example, setting page to 2 returns the second page. It only applies to sorted metric data.

limit
integer
Default: 5

Page size, the maximum number of results in a single page. Defaults to 5.

Responses

200

ok

get /kapis/monitoring.kubesphere.io/v1alpha2/nodes/{node}/pods
https://console.kubesphere.io/kapis/monitoring.kubesphere.io/v1alpha2/nodes/{node}/pods

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "metrics_level": "string",
  • "page": 0,
  • "results":
    [
    ],
  • "total_item": 0,
  • "total_page": 0
}

Get pod-level metric data of a specific pod. Navigate to the pod by the node where it is scheduled.

Authorizations:
path Parameters
node
required
string

Node name.

pod
required
string

Pod name.

query Parameters
metrics_filter
string

The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both pod CPU usage and memory usage: pod_cpu_usage|pod_memory_usage. View available metrics at kubesphere.io.

start
string

Start time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200.

end
string

End time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200.

step
string
Default: "10m"

Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both start and end are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).

time
string

A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.

Responses

200

ok

get /kapis/monitoring.kubesphere.io/v1alpha2/nodes/{node}/pods/{pod}
https://console.kubesphere.io/kapis/monitoring.kubesphere.io/v1alpha2/nodes/{node}/pods/{pod}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "metrics_level": "string",
  • "page": 0,
  • "results":
    [
    ],
  • "total_item": 0,
  • "total_page": 0
}

Container Metrics

Get container-level metric data of a specific pod's containers. Navigate to the pod by the pod's namespace.

Authorizations:
path Parameters
namespace
required
string

The name of the namespace.

pod
required
string

Pod name.

query Parameters
metrics_filter
string

The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both container CPU usage and memory usage: container_cpu_usage|container_memory_usage. View available metrics at kubesphere.io.

resources_filter
string

The container filter consists of a regexp pattern. It specifies which container data to return. For example, the following filter matches container prometheus and prometheus-config-reloader: prometheus|prometheus-config-reloader.

start
string

Start time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200.

end
string

End time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200.

step
string
Default: "10m"

Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both start and end are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).

time
string

A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.

sort_metric
string

Sort containers by the specified metric. Not applicable if start and end are provided.

sort_type
string
Default: "desc."

Sort order. One of asc, desc.

page
integer

The page number. This field paginates result data of each metric, then returns a specific page. For example, setting page to 2 returns the second page. It only applies to sorted metric data.

limit
integer
Default: 5

Page size, the maximum number of results in a single page. Defaults to 5.

Responses

200

ok

get /kapis/monitoring.kubesphere.io/v1alpha2/namespaces/{namespace}/pods/{pod}/containers
https://console.kubesphere.io/kapis/monitoring.kubesphere.io/v1alpha2/namespaces/{namespace}/pods/{pod}/containers

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "metrics_level": "string",
  • "page": 0,
  • "results":
    [
    ],
  • "total_item": 0,
  • "total_page": 0
}

Get container-level metric data of a specific container. Navigate to the container by the pod name and the namespace.

Authorizations:
path Parameters
namespace
required
string

The name of the namespace.

pod
required
string

Pod name.

container
required
string

Container name.

query Parameters
metrics_filter
string

The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both container CPU usage and memory usage: container_cpu_usage|container_memory_usage. View available metrics at kubesphere.io.

start
string

Start time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200.

end
string

End time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200.

step
string
Default: "10m"

Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both start and end are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).

time
string

A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.

Responses

200

ok

get /kapis/monitoring.kubesphere.io/v1alpha2/namespaces/{namespace}/pods/{pod}/containers/{container}
https://console.kubesphere.io/kapis/monitoring.kubesphere.io/v1alpha2/namespaces/{namespace}/pods/{pod}/containers/{container}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "metrics_level": "string",
  • "page": 0,
  • "results":
    [
    ],
  • "total_item": 0,
  • "total_page": 0
}

Get container-level metric data of a specific pod's containers. Navigate to the pod by the node where it is scheduled.

Authorizations:
path Parameters
node
required
string

Node name.

pod
required
string

Pod name.

query Parameters
metrics_filter
string

The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both container CPU usage and memory usage: container_cpu_usage|container_memory_usage. View available metrics at kubesphere.io.

resources_filter
string

The container filter consists of a regexp pattern. It specifies which container data to return. For example, the following filter matches container prometheus and prometheus-config-reloader: prometheus|prometheus-config-reloader.

start
string

Start time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200.

end
string

End time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200.

step
string
Default: "10m"

Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both start and end are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).

time
string

A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.

sort_metric
string

Sort containers by the specified metric. Not applicable if start and end are provided.

sort_type
string
Default: "desc."

Sort order. One of asc, desc.

page
integer

The page number. This field paginates result data of each metric, then returns a specific page. For example, setting page to 2 returns the second page. It only applies to sorted metric data.

limit
integer
Default: 5

Page size, the maximum number of results in a single page. Defaults to 5.

Responses

200

ok

get /kapis/monitoring.kubesphere.io/v1alpha2/nodes/{node}/pods/{pod}/containers
https://console.kubesphere.io/kapis/monitoring.kubesphere.io/v1alpha2/nodes/{node}/pods/{pod}/containers

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "metrics_level": "string",
  • "page": 0,
  • "results":
    [
    ],
  • "total_item": 0,
  • "total_page": 0
}

Workspace Metrics

Get workspace-level metric data of all workspaces.

Authorizations:
query Parameters
metrics_filter
string

The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both workspace CPU usage and memory usage: workspace_cpu_usage|workspace_memory_usage. View available metrics at kubesphere.io.

resources_filter
string

The workspace filter consists of a regexp pattern. It specifies which workspace data to return.

start
string

Start time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200.

end
string

End time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200.

step
string
Default: "10m"

Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both start and end are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).

time
string

A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.

sort_metric
string

Sort workspaces by the specified metric. Not applicable if start and end are provided.

sort_type
string
Default: "desc."

Sort order. One of asc, desc.

page
integer

The page number. This field paginates result data of each metric, then returns a specific page. For example, setting page to 2 returns the second page. It only applies to sorted metric data.

limit
integer
Default: 5

Page size, the maximum number of results in a single page. Defaults to 5.

type
string

Additional operations. Currently available types is statistics. It retrieves the total number of workspaces, devops projects, namespaces, accounts in the cluster at the moment.

Responses

200

ok

get /kapis/monitoring.kubesphere.io/v1alpha2/workspaces
https://console.kubesphere.io/kapis/monitoring.kubesphere.io/v1alpha2/workspaces

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "metrics_level": "string",
  • "page": 0,
  • "results":
    [
    ],
  • "total_item": 0,
  • "total_page": 0
}

Get workspace-level metric data of a specific workspace.

Authorizations:
path Parameters
workspace
required
string

Workspace name.

query Parameters
metrics_filter
string

The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both workspace CPU usage and memory usage: workspace_cpu_usage|workspace_memory_usage. View available metrics at kubesphere.io.

start
string

Start time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200.

end
string

End time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200.

step
string
Default: "10m"

Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both start and end are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).

time
string

A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.

type
string

Additional operations. Currently available types is statistics. It retrieves the total number of namespaces, devops projects, members and roles in this workspace at the moment.

Responses

200

ok

get /kapis/monitoring.kubesphere.io/v1alpha2/workspaces/{workspace}
https://console.kubesphere.io/kapis/monitoring.kubesphere.io/v1alpha2/workspaces/{workspace}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "metrics_level": "string",
  • "page": 0,
  • "results":
    [
    ],
  • "total_item": 0,
  • "total_page": 0
}

Component Metrics

Get component-level metric data of the specific system component.

Authorizations:
path Parameters
component
required
string

system component to monitor. One of etcd, apiserver, scheduler, controller_manager, coredns, prometheus.

query Parameters
metrics_filter
string

The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both etcd server list and total size of the underlying database: etcd_server_list|etcd_mvcc_db_size. View available metrics at kubesphere.io.

start
string

Start time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200.

end
string

End time of query. Use start and end to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200.

step
string
Default: "10m"

Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both start and end are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).

time
string

A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.

Responses

200

ok

get /kapis/monitoring.kubesphere.io/v1alpha2/components/{component}
https://console.kubesphere.io/kapis/monitoring.kubesphere.io/v1alpha2/components/{component}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "metrics_level": "string",
  • "page": 0,
  • "results":
    [
    ],
  • "total_item": 0,
  • "total_page": 0
}

Log Query

Query logs against the cluster.

Authorizations:
query Parameters
operation
string
Default: "query"

Query type. This can be one of three types: query (for querying logs), statistics (for retrieving statistical data), and histogram (for displaying log count by time interval). Defaults to query.

workspaces
string

A comma-separated list of workspaces. This field restricts the query to specified workspaces. For example, the following filter matches the workspace my-ws and demo-ws: my-ws,demo-ws

workspace_query
string

A comma-separated list of keywords. Differing from workspaces, this field performs fuzzy matching on workspaces. For example, the following value limits the query to workspaces whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

namespaces
string

A comma-separated list of namespaces. This field restricts the query to specified namespaces. For example, the following filter matches the namespace my-ns and demo-ns: my-ns,demo-ns

namespace_query
string

A comma-separated list of keywords. Differing from namespaces, this field performs fuzzy matching on namespaces. For example, the following value limits the query to namespaces whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

workloads
string

A comma-separated list of workloads. This field restricts the query to specified workloads. For example, the following filter matches the workload my-wl and demo-wl: my-wl,demo-wl

workload_query
string

A comma-separated list of keywords. Differing from workloads, this field performs fuzzy matching on workloads. For example, the following value limits the query to workloads whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

pods
string

A comma-separated list of pods. This field restricts the query to specified pods. For example, the following filter matches the pod my-po and demo-po: my-po,demo-po

pod_query
string

A comma-separated list of keywords. Differing from pods, this field performs fuzzy matching on pods. For example, the following value limits the query to pods whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

containers
string

A comma-separated list of containers. This field restricts the query to specified containers. For example, the following filter matches the container my-cont and demo-cont: my-cont,demo-cont

container_query
string

A comma-separated list of keywords. Differing from containers, this field performs fuzzy matching on containers. For example, the following value limits the query to containers whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

log_query
string

A comma-separated list of keywords. The query returns logs which contain at least one keyword. Case-insensitive matching. For example, if the field is set to err,INFO, the query returns any log containing err(ERR,Err,...) OR INFO(info,InFo,...).

interval
string
Default: "15m"

Time interval. It requires operation is set to histogram. The format is [0-9]+[smhdwMqy]. Defaults to 15m (i.e. 15 min).

start_time
string

Start time of query. Default to 0. The format is a string representing milliseconds since the epoch, eg. 1559664000000.

end_time
string

End time of query. Default to now. The format is a string representing milliseconds since the epoch, eg. 1559664000000.

sort
string
Default: "desc"

Sort order. One of acs, desc. This field sorts logs by timestamp.

from
integer
Default: 0

The offset from the result set. This field returns query results from the specified offset. It requires operation is set to query. Defaults to 0 (i.e. from the beginning of the result set).

size
integer
Default: 10

Size of result to return. It requires operation is set to query. Defaults to 10 (i.e. 10 log records).

Responses

200

ok

get /kapis/logging.kubesphere.io/v1alpha2/cluster
https://console.kubesphere.io/kapis/logging.kubesphere.io/v1alpha2/cluster

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "error": "string",
  • "histogram":
    {
    },
  • "query":
    {
    },
  • "statistics":
    {
    },
  • "status": 0,
  • "workspace": "string"
}

Query logs against the specific namespace.

Authorizations:
path Parameters
namespace
required
string

The name of the namespace.

query Parameters
operation
string
Default: "query"

Query type. This can be one of three types: query (for querying logs), statistics (for retrieving statistical data), and histogram (for displaying log count by time interval). Defaults to query.

workloads
string

A comma-separated list of workloads. This field restricts the query to specified workloads. For example, the following filter matches the workload my-wl and demo-wl: my-wl,demo-wl

workload_query
string

A comma-separated list of keywords. Differing from workloads, this field performs fuzzy matching on workloads. For example, the following value limits the query to workloads whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

pods
string

A comma-separated list of pods. This field restricts the query to specified pods. For example, the following filter matches the pod my-po and demo-po: my-po,demo-po

pod_query
string

A comma-separated list of keywords. Differing from pods, this field performs fuzzy matching on pods. For example, the following value limits the query to pods whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

containers
string

A comma-separated list of containers. This field restricts the query to specified containers. For example, the following filter matches the container my-cont and demo-cont: my-cont,demo-cont

container_query
string

A comma-separated list of keywords. Differing from containers, this field performs fuzzy matching on containers. For example, the following value limits the query to containers whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

log_query
string

A comma-separated list of keywords. The query returns logs which contain at least one keyword. Case-insensitive matching. For example, if the field is set to err,INFO, the query returns any log containing err(ERR,Err,...) OR INFO(info,InFo,...).

interval
string
Default: "15m"

Time interval. It requires operation is set to histogram. The format is [0-9]+[smhdwMqy]. Defaults to 15m (i.e. 15 min).

start_time
string

Start time of query. Default to 0. The format is a string representing milliseconds since the epoch, eg. 1559664000000.

end_time
string

End time of query. Default to now. The format is a string representing milliseconds since the epoch, eg. 1559664000000.

sort
string
Default: "desc"

Sort order. One of acs, desc. This field sorts logs by timestamp.

from
integer
Default: 0

The offset from the result set. This field returns query results from the specified offset. It requires operation is set to query. Defaults to 0 (i.e. from the beginning of the result set).

size
integer
Default: 10

Size of result to return. It requires operation is set to query. Defaults to 10 (i.e. 10 log records).

Responses

200

ok

get /kapis/logging.kubesphere.io/v1alpha2/namespaces/{namespace}
https://console.kubesphere.io/kapis/logging.kubesphere.io/v1alpha2/namespaces/{namespace}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "error": "string",
  • "histogram":
    {
    },
  • "query":
    {
    },
  • "statistics":
    {
    },
  • "status": 0,
  • "workspace": "string"
}

Query logs against the specific pod.

Authorizations:
path Parameters
namespace
required
string

The name of the namespace.

pod
required
string

Pod name.

query Parameters
operation
string
Default: "query"

Query type. This can be one of three types: query (for querying logs), statistics (for retrieving statistical data), and histogram (for displaying log count by time interval). Defaults to query.

containers
string

A comma-separated list of containers. This field restricts the query to specified containers. For example, the following filter matches the container my-cont and demo-cont: my-cont,demo-cont

container_query
string

A comma-separated list of keywords. Differing from containers, this field performs fuzzy matching on containers. For example, the following value limits the query to containers whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

log_query
string

A comma-separated list of keywords. The query returns logs which contain at least one keyword. Case-insensitive matching. For example, if the field is set to err,INFO, the query returns any log containing err(ERR,Err,...) OR INFO(info,InFo,...).

interval
string
Default: "15m"

Time interval. It requires operation is set to histogram. The format is [0-9]+[smhdwMqy]. Defaults to 15m (i.e. 15 min).

start_time
string

Start time of query. Default to 0. The format is a string representing milliseconds since the epoch, eg. 1559664000000.

end_time
string

End time of query. Default to now. The format is a string representing milliseconds since the epoch, eg. 1559664000000.

sort
string
Default: "desc"

Sort order. One of acs, desc. This field sorts logs by timestamp.

from
integer
Default: 0

The offset from the result set. This field returns query results from the specified offset. It requires operation is set to query. Defaults to 0 (i.e. from the beginning of the result set).

size
integer
Default: 10

Size of result to return. It requires operation is set to query. Defaults to 10 (i.e. 10 log records).

Responses

200

ok

get /kapis/logging.kubesphere.io/v1alpha2/namespaces/{namespace}/pods/{pod}
https://console.kubesphere.io/kapis/logging.kubesphere.io/v1alpha2/namespaces/{namespace}/pods/{pod}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "error": "string",
  • "histogram":
    {
    },
  • "query":
    {
    },
  • "statistics":
    {
    },
  • "status": 0,
  • "workspace": "string"
}

Query logs against the specific container.

Authorizations:
path Parameters
namespace
required
string

The name of the namespace.

pod
required
string

Pod name.

container
required
string

Container name.

query Parameters
operation
string
Default: "query"

Query type. This can be one of three types: query (for querying logs), statistics (for retrieving statistical data), and histogram (for displaying log count by time interval). Defaults to query.

log_query
string

A comma-separated list of keywords. The query returns logs which contain at least one keyword. Case-insensitive matching. For example, if the field is set to err,INFO, the query returns any log containing err(ERR,Err,...) OR INFO(info,InFo,...).

interval
string
Default: "15m"

Time interval. It requires operation is set to histogram. The format is [0-9]+[smhdwMqy]. Defaults to 15m (i.e. 15 min).

start_time
string

Start time of query. Default to 0. The format is a string representing milliseconds since the epoch, eg. 1559664000000.

end_time
string

End time of query. Default to now. The format is a string representing milliseconds since the epoch, eg. 1559664000000.

sort
string
Default: "desc"

Sort order. One of acs, desc. This field sorts logs by timestamp.

from
integer
Default: 0

The offset from the result set. This field returns query results from the specified offset. It requires operation is set to query. Defaults to 0 (i.e. from the beginning of the result set).

size
integer
Default: 10

Size of result to return. It requires operation is set to query. Defaults to 10 (i.e. 10 log records).

Responses

200

ok

get /kapis/logging.kubesphere.io/v1alpha2/namespaces/{namespace}/pods/{pod}/containers/{container}
https://console.kubesphere.io/kapis/logging.kubesphere.io/v1alpha2/namespaces/{namespace}/pods/{pod}/containers/{container}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "error": "string",
  • "histogram":
    {
    },
  • "query":
    {
    },
  • "statistics":
    {
    },
  • "status": 0,
  • "workspace": "string"
}

Query logs against the specific workload.

Authorizations:
path Parameters
namespace
required
string

The name of the namespace.

workload
required
string

The name of the workload.

query Parameters
operation
string
Default: "query"

Query type. This can be one of three types: query (for querying logs), statistics (for retrieving statistical data), and histogram (for displaying log count by time interval). Defaults to query.

pods
string

A comma-separated list of pods. This field restricts the query to specified pods. For example, the following filter matches the pod my-po and demo-po: my-po,demo-po

pod_query
string

A comma-separated list of keywords. Differing from pods, this field performs fuzzy matching on pods. For example, the following value limits the query to pods whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

containers
string

A comma-separated list of containers. This field restricts the query to specified containers. For example, the following filter matches the container my-cont and demo-cont: my-cont,demo-cont

container_query
string

A comma-separated list of keywords. Differing from containers, this field performs fuzzy matching on containers. For example, the following value limits the query to containers whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

log_query
string

A comma-separated list of keywords. The query returns logs which contain at least one keyword. Case-insensitive matching. For example, if the field is set to err,INFO, the query returns any log containing err(ERR,Err,...) OR INFO(info,InFo,...).

interval
string
Default: "15m"

Time interval. It requires operation is set to histogram. The format is [0-9]+[smhdwMqy]. Defaults to 15m (i.e. 15 min).

start_time
string

Start time of query. Default to 0. The format is a string representing milliseconds since the epoch, eg. 1559664000000.

end_time
string

End time of query. Default to now. The format is a string representing milliseconds since the epoch, eg. 1559664000000.

sort
string
Default: "desc"

Sort order. One of acs, desc. This field sorts logs by timestamp.

from
integer
Default: 0

The offset from the result set. This field returns query results from the specified offset. It requires operation is set to query. Defaults to 0 (i.e. from the beginning of the result set).

size
integer
Default: 10

Size of result to return. It requires operation is set to query. Defaults to 10 (i.e. 10 log records).

Responses

200

ok

get /kapis/logging.kubesphere.io/v1alpha2/namespaces/{namespace}/workloads/{workload}
https://console.kubesphere.io/kapis/logging.kubesphere.io/v1alpha2/namespaces/{namespace}/workloads/{workload}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "error": "string",
  • "histogram":
    {
    },
  • "query":
    {
    },
  • "statistics":
    {
    },
  • "status": 0,
  • "workspace": "string"
}

Query logs against the specific workspace.

Authorizations:
path Parameters
workspace
required
string

The name of the workspace.

query Parameters
operation
string
Default: "query"

Query type. This can be one of three types: query (for querying logs), statistics (for retrieving statistical data), and histogram (for displaying log count by time interval). Defaults to query.

namespaces
string

A comma-separated list of namespaces. This field restricts the query to specified namespaces. For example, the following filter matches the namespace my-ns and demo-ns: my-ns,demo-ns

namespace_query
string

A comma-separated list of keywords. Differing from namespaces, this field performs fuzzy matching on namespaces. For example, the following value limits the query to namespaces whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

workloads
string

A comma-separated list of workloads. This field restricts the query to specified workloads. For example, the following filter matches the workload my-wl and demo-wl: my-wl,demo-wl

workload_query
string

A comma-separated list of keywords. Differing from workloads, this field performs fuzzy matching on workloads. For example, the following value limits the query to workloads whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

pods
string

A comma-separated list of pods. This field restricts the query to specified pods. For example, the following filter matches the pod my-po and demo-po: my-po,demo-po

pod_query
string

A comma-separated list of keywords. Differing from pods, this field performs fuzzy matching on pods. For example, the following value limits the query to pods whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

containers
string

A comma-separated list of containers. This field restricts the query to specified containers. For example, the following filter matches the container my-cont and demo-cont: my-cont,demo-cont

container_query
string

A comma-separated list of keywords. Differing from containers, this field performs fuzzy matching on containers. For example, the following value limits the query to containers whose name contains the word my(My,MY,...) OR demo(Demo,DemO,...): my,demo.

log_query
string

A comma-separated list of keywords. The query returns logs which contain at least one keyword. Case-insensitive matching. For example, if the field is set to err,INFO, the query returns any log containing err(ERR,Err,...) OR INFO(info,InFo,...).

interval
string
Default: "15m"

Time interval. It requires operation is set to histogram. The format is [0-9]+[smhdwMqy]. Defaults to 15m (i.e. 15 min).

start_time
string

Start time of query. Default to 0. The format is a string representing milliseconds since the epoch, eg. 1559664000000.

end_time
string

End time of query. Default to now. The format is a string representing milliseconds since the epoch, eg. 1559664000000.

sort
string
Default: "desc"

Sort order. One of acs, desc. This field sorts logs by timestamp.

from
integer
Default: 0

The offset from the result set. This field returns query results from the specified offset. It requires operation is set to query. Defaults to 0 (i.e. from the beginning of the result set).

size
integer
Default: 10

Size of result to return. It requires operation is set to query. Defaults to 10 (i.e. 10 log records).

Responses

200

ok

get /kapis/logging.kubesphere.io/v1alpha2/workspaces/{workspace}
https://console.kubesphere.io/kapis/logging.kubesphere.io/v1alpha2/workspaces/{workspace}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "error": "string",
  • "histogram":
    {
    },
  • "query":
    {
    },
  • "statistics":
    {
    },
  • "status": 0,
  • "workspace": "string"
}

Fluent Bit Setting

List all Fluent bit output plugins.

Authorizations:

Responses

200

ok

get /kapis/logging.kubesphere.io/v1alpha2/fluentbit/outputs
https://console.kubesphere.io/kapis/logging.kubesphere.io/v1alpha2/fluentbit/outputs

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "error": "string",
  • "outputs":
    [
    ],
  • "status": 0
}

Add a new Fluent bit output plugin.

Authorizations:
Request Body schema:
enable
required
boolean

active status, one of true, false

id
string

output uuid

name
required
string

output plugin name, eg. fluentbit-output-es

parameters
required
Array of objects (fluentbitclient.Parameter)

output plugin configuration parameters

type
required
string

output plugin type, eg. fluentbit-output-es

updatetime
string <date-time>

last updatetime

Responses

200

ok

post /kapis/logging.kubesphere.io/v1alpha2/fluentbit/outputs
https://console.kubesphere.io/kapis/logging.kubesphere.io/v1alpha2/fluentbit/outputs

Request samples

Content type
Copy
Expand all Collapse all
{
  • "enable": true,
  • "id": "string",
  • "name": "string",
  • "parameters":
    [
    ],
  • "type": "string",
  • "updatetime": "2023-06-06T09:04:07Z"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "error": "string",
  • "outputs":
    [
    ],
  • "status": 0
}

Update the specific Fluent bit output plugin.

Authorizations:
path Parameters
output
required
string

ID of the output.

Request Body schema:
enable
required
boolean

active status, one of true, false

id
string

output uuid

name
required
string

output plugin name, eg. fluentbit-output-es

parameters
required
Array of objects (fluentbitclient.Parameter)

output plugin configuration parameters

type
required
string

output plugin type, eg. fluentbit-output-es

updatetime
string <date-time>

last updatetime

Responses

200

ok

put /kapis/logging.kubesphere.io/v1alpha2/fluentbit/outputs/{output}
https://console.kubesphere.io/kapis/logging.kubesphere.io/v1alpha2/fluentbit/outputs/{output}

Request samples

Content type
Copy
Expand all Collapse all
{
  • "enable": true,
  • "id": "string",
  • "name": "string",
  • "parameters":
    [
    ],
  • "type": "string",
  • "updatetime": "2023-06-06T09:04:07Z"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "error": "string",
  • "outputs":
    [
    ],
  • "status": 0
}

Delete the specific Fluent bit output plugin.

Authorizations:
path Parameters
output
required
string

ID of the output.

Responses

200

ok

delete /kapis/logging.kubesphere.io/v1alpha2/fluentbit/outputs/{output}
https://console.kubesphere.io/kapis/logging.kubesphere.io/v1alpha2/fluentbit/outputs/{output}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "error": "string",
  • "outputs":
    [
    ],
  • "status": 0
}

ServiceMesh

Get graph from all namespaces

Authorizations:
query Parameters
duration
string
Default: "10m"

duration of the query period, in seconds

graphType
string
Default: "workload"

type of the generated service graph. Available graph types: [app, service, versionedApp, workload].

groupBy
string
Default: "none"

app box grouping characteristic. Available groupings: [app, none, version].

queryTime
string

from which time point in UNIX timestamp, default now

injectServiceNodes
string
Default: false

flag for injecting the requested service node between source and destination nodes.

Responses

200

ok

400

bad request

404

not found

get /kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/graph
https://console.kubesphere.io/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/graph

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "duration": 0,
  • "elements":
    {
    },
  • "graphType": "string",
  • "timestamp": 0
}

Get workload health

Authorizations:
path Parameters
namespace
required
string

name of a namespace

app
required
string

app name

query Parameters
rateInterval
required
string
Default: "10m"

the rate interval used for fetching error rate

queryTime
string

the time to use for query

Responses

200

ok

get /kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/apps/{app}/health
https://console.kubesphere.io/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/apps/{app}/health

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "requests":
    {
    },
  • "workloadStatuses":
    [
    ]
}

Get app metrics from a specific namespace

Authorizations:
path Parameters
namespace
required
string

name of the namespace

app
required
string

name of the app

query Parameters
filters[]
string
Default: "[]"

type of metrics type, fetch all metrics when empty, e.g. request_count, request_duration, request_error_count

queryTime
string

from which UNIX time to extract metrics

duration
string
Default: 1800

duration of the query period, in seconds

step
string
Default: 15

step between graph data points, in seconds.

rateInterval
string
Default: "1m"

metrics rate intervals, e.g. 20s

direction
string
Default: "outbound"

traffic direction: 'inbound' or 'outbound'

quantiles[]
string
Default: "[]"

list of quantiles to fetch, fetch no quantiles when empty. eg. 0.5, 0.9, 0.99

byLabels[]
string
Default: "[]"

list of labels to use for grouping metrics(via Prometheus 'by' clause), e.g. source_workload, destination_service_name

requestProtocol
string
Default: "all protocols"

request protocol for the telemetry, e.g. http/tcp/grpc

reporter
string
Default: "source"

istio telemetry reporter, 'source' or 'destination'

Responses

200

ok

get /kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/apps/{app}/metrics
https://console.kubesphere.io/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/apps/{app}/metrics

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "histograms":
    {
    },
  • "metrics":
    {
    }
}

Get service graph for a specific namespace

Authorizations:
path Parameters
namespace
required
string

name of a namespace

query Parameters
duration
string
Default: "10m"

duration of the query period, in seconds

graphType
string
Default: "workload"

type of the generated service graph. Available graph types: [app, service, versionedApp, workload].

groupBy
string
Default: "none"

app box grouping characteristic. Available groupings: [app, none, version].

queryTime
string

from which time point in UNIX timestamp, default now

injectServiceNodes
string
Default: false

flag for injecting the requested service node between source and destination nodes.

Responses

200

ok

400

bad request

404

not found

get /kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/graph
https://console.kubesphere.io/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/graph

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "duration": 0,
  • "elements":
    {
    },
  • "graphType": "string",
  • "timestamp": 0
}

Get workload health

Authorizations:
path Parameters
namespace
required
string

name of a namespace

type
required
string
Default: "app"

the type of health, app/service/workload, default app

query Parameters
rateInterval
required
string
Default: "10m"

the rate interval used for fetching error rate

queryTime
string

the time to use for query

Responses

200

ok

400

bad request

404

not found

get /kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/health
https://console.kubesphere.io/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/health

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "NamespaceAppHealth":
    {
    }
}

Get workload metrics from a specific namespace

Authorizations:
path Parameters
namespace
required
string

name of the namespace

service
required
string

name of the service

query Parameters
filters[]
string
Default: "[]"

type of metrics type, fetch all metrics when empty, e.g. request_count, request_duration, request_error_count

queryTime
string

from which UNIX time to extract metrics

duration
string
Default: 1800

duration of the query period, in seconds

step
string
Default: 15

step between graph data points, in seconds.

rateInterval
string
Default: "1m"

metrics rate intervals, e.g. 20s

direction
string
Default: "outbound"

traffic direction: 'inbound' or 'outbound'

quantiles[]
string
Default: "[]"

list of quantiles to fetch, fetch no quantiles when empty. eg. 0.5, 0.9, 0.99

byLabels[]
string
Default: "[]"

list of labels to use for grouping metrics(via Prometheus 'by' clause), e.g. source_workload, destination_service_name

requestProtocol
string
Default: "all protocols"

request protocol for the telemetry, e.g. http/tcp/grpc

reporter
string
Default: "source"

istio telemetry reporter, 'source' or 'destination'

Responses

200

ok

get /kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/metrics
https://console.kubesphere.io/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/metrics

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "histograms":
    {
    },
  • "metrics":
    {
    }
}

Get workload health

Authorizations:
path Parameters
namespace
required
string

name of a namespace

service
required
string

service name

query Parameters
rateInterval
required
string
Default: "10m"

the rate interval used for fetching error rate

queryTime
string

the time to use for query

Responses

200

ok

get /kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/services/{service}/health
https://console.kubesphere.io/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/services/{service}/health

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "requests":
    {
    }
}

Get service metrics from a specific namespace

Authorizations:
path Parameters
namespace
required
string

name of the namespace

service
required
string

name of the service

query Parameters
filters[]
string
Default: "[]"

type of metrics type, fetch all metrics when empty, e.g. request_count, request_duration, request_error_count

queryTime
string

from which UNIX time to extract metrics

duration
string
Default: 1800

duration of the query period, in seconds

step
string
Default: 15

step between graph data points, in seconds.

rateInterval
string
Default: "1m"

metrics rate intervals, e.g. 20s

direction
string
Default: "outbound"

traffic direction: 'inbound' or 'outbound'

quantiles[]
string
Default: "[]"

list of quantiles to fetch, fetch no quantiles when empty. eg. 0.5, 0.9, 0.99

byLabels[]
string
Default: "[]"

list of labels to use for grouping metrics(via Prometheus 'by' clause), e.g. source_workload, destination_service_name

requestProtocol
string
Default: "all protocols"

request protocol for the telemetry, e.g. http/tcp/grpc

reporter
string
Default: "source"

istio telemetry reporter, 'source' or 'destination'

Responses

200

ok

get /kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/services/{service}/metrics
https://console.kubesphere.io/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/services/{service}/metrics

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "histograms":
    {
    },
  • "metrics":
    {
    }
}

Get tracing of a service, should have servicemesh enabled first

Authorizations:
path Parameters
namespace
required
string

namespace of service

service
required
string

name of service queried

query Parameters
start
string

start of time range want to query, in unix timestamp

end
string

end of time range want to query, in unix timestamp

limit
string
Default: 10

maximum tracing entries returned at one query, default 10

loopback
string

loopback of duration want to query, e.g. 30m/1h/2d

maxDuration
string

maximum duration of a request

minDuration
string

minimum duration of a request

Responses

200

OK

get /kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/services/{service}/traces
https://console.kubesphere.io/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/services/{service}/traces

Get workload health

Authorizations:
path Parameters
namespace
required
string

name of a namespace

workload
required
string

workload name

query Parameters
rateInterval
required
string
Default: "10m"

the rate interval used for fetching error rate

queryTime
string

the time to use for query

Responses

200

ok

get /kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/workloads/{workload}/health
https://console.kubesphere.io/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/workloads/{workload}/health

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "requests":
    {
    },
  • "workloadStatus":
    {
    }
}

Get workload metrics from a specific namespace

Authorizations:
path Parameters
namespace
required
string

name of the namespace

workload
required
string

name of the workload

service
required
string

name of the service

query Parameters
filters[]
string
Default: "[]"

type of metrics type, fetch all metrics when empty, e.g. request_count, request_duration, request_error_count

queryTime
string

from which UNIX time to extract metrics

duration
string
Default: 1800

duration of the query period, in seconds

step
string
Default: 15

step between graph data points, in seconds.

rateInterval
string
Default: "1m"

metrics rate intervals, e.g. 20s

direction
string
Default: "outbound"

traffic direction: 'inbound' or 'outbound'

quantiles[]
string
Default: "[]"

list of quantiles to fetch, fetch no quantiles when empty. eg. 0.5, 0.9, 0.99

byLabels[]
string
Default: "[]"

list of labels to use for grouping metrics(via Prometheus 'by' clause), e.g. source_workload, destination_service_name

requestProtocol
string
Default: "all protocols"

request protocol for the telemetry, e.g. http/tcp/grpc

reporter
string
Default: "source"

istio telemetry reporter, 'source' or 'destination'

Responses

200

ok

get /kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/workloads/{workload}/metrics
https://console.kubesphere.io/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/workloads/{workload}/metrics

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "histograms":
    {
    },
  • "metrics":
    {
    }
}