Get Clusters List

JFrog Security User Guide

ft:sourceType
Ftml

Description: Retrieve a list of clusters configured by the user, optionally returning the associated nodes for each cluster based on user input.

Security: Requires a valid user with a "Admin" permission

Usage: POST/runtime/api/v1/clusters

Consumes: application/json

Produces: application/json

Request body

NameTypeRequired/OptionalDescription
limitintOptionalMaximum number of clusters to return per request. Default is `10`. (Range: 1-100)
next_keystringOptionalID from the previous request, empty on the first request

Response body

NameTypeDescription
total_countintThe total number of clusters that match the filter query.
paginationpaginationObjPagination info for the request
clustersArray[clusterObj]A list of cluster objects containing details of each cluster.

paginationObj:

NameTypeDescription
limitintKey-based pagination - number of rows per request
next_keystringId from the previous request, empty on the first request

clusterObj:

NameTypeDescription
monitored_atstring (ISO 8601)Timestamp when the monitoring of cluster started
idstringUnique identifier for the cluster in the system. (this is the cluster_identifier)
namestringThe name of the cluster.
controller_versionstringVersion of the cluster controller.
controller_statusstringPossible options: running, stopped
controller_last_updatedstringDate of last update
providerstringThe cloud provider where the cluster is hosted (e.g., aws).
regionsArray[string]List of regions in which the cluster is deployed.
nodes_countintThe total number of nodes in the cluster.
running_nodes_countintThe number of nodes currently running.
failed_nodes_countintThe number of nodes that have failed.
failed_to_install_nodes_countintThe number of nodes that failed to install.
disabled_nodes_countintThe number of nodes that are currently disabled.

Response codes:

Status codeStatus code
200OK
400Bad request - Required fields are missing
403Permission denied
404Not found
500Internal server error

Request URL :

POST /runtime/api/v1/clusters

Examples

Example request

{
  "limit": "50",
  "last_key": "id123",
}

Example successful response

200 OK
{
   "clusters": [
       {
           "controller_last_updated": "2024-12-31T11:32:10.367653Z",
           "controller_status": "running",
           "controller_version": "0.0.0",
           "disabled_nodes_count": 0,
           "failed_nodes_count": 0,
           "failed_to_install_nodes_count": 0,
           "id": 2,
           "monitored_at": "2024-12-25T12:28:13.438479Z",
           "name": "z0runtime",
           "nodes_count": 4,
           "provider": "kubernetes",
           "regions": [],
           "running_nodes_count": 4
       }
   ],
   "pagination": {
       "limit": 10
   },
   "total_count": 1
}

Example error response:

404 Not Found
{
    "error": "error message"
}