# List clusters ListClusters returns a list of clusters. Endpoint: POST /gitops/api/v1/clusters Version: 1.0 Security: x-api-key ## Request fields (application/json): - `accountIdentifier` (string) Account Identifier for the Entity. - `projectIdentifier` (string) Project Identifier for the Entity. - `orgIdentifier` (string) Organization Identifier for the Entity. - `agentIdentifier` (string) Agent identifier for entity. - `identifier` (string) - `searchTerm` (string) - `pageSize` (integer) - `pageIndex` (integer) - `filter` (object) Filters for Clusters. Eg. "identifier": { "$in": ["id1", "id2"] - `sortBy` (string) Enum: "SORT_BY_NOT_SET", "NAME", "GITOPS_AGENT", "URL", "VERSION", "CONNECTIVITY_STATUS" - `sortOrder` (string) Enum: "SORT_ORDER_NOT_SET", "ASC", "DESC" ## Response 200 fields (application/json): - `content` (array) - `content.accountIdentifier` (string) Account Identifier for the Entity. - `content.orgIdentifier` (string) Organization Identifier for the Entity. - `content.projectIdentifier` (string) Project Identifier for the Entity. - `content.agentIdentifier` (string) Agent identifier for entity. - `content.identifier` (string) - `content.cluster` (object) - `content.cluster.server` (string) - `content.cluster.name` (string) - `content.cluster.config` (object) ClusterConfig is the configuration attributes. This structure is subset of the go-client rest.Config with annotations added for marshalling. - `content.cluster.config.username` (string) - `content.cluster.config.password` (string) - `content.cluster.config.bearerToken` (string) Server requires Bearer authentication. This client will not attempt to use refresh tokens for an OAuth2 flow. TODO: demonstrate an OAuth2 compatible client. - `content.cluster.config.tlsClientConfig` (object) - `content.cluster.config.tlsClientConfig.insecure` (boolean) Insecure specifies that the server should be accessed without verifying the TLS certificate. For testing only. - `content.cluster.config.tlsClientConfig.serverName` (string) ServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the server is used. - `content.cluster.config.tlsClientConfig.certData` (string) - `content.cluster.config.tlsClientConfig.keyData` (string) - `content.cluster.config.tlsClientConfig.caData` (string) - `content.cluster.config.awsAuthConfig` (object) - `content.cluster.config.awsAuthConfig.clusterName` (string) - `content.cluster.config.awsAuthConfig.roleARN` (string) RoleARN contains optional role ARN. If set then AWS IAM Authenticator assume a role to perform cluster operations instead of the default AWS credential provider chain. - `content.cluster.config.execProviderConfig` (object) - `content.cluster.config.execProviderConfig.command` (string) - `content.cluster.config.execProviderConfig.args` (array) - `content.cluster.config.execProviderConfig.env` (object) - `content.cluster.config.execProviderConfig.apiVersion` (string) - `content.cluster.config.execProviderConfig.installHint` (string) - `content.cluster.config.clusterConnectionType` (string) - `content.cluster.config.awsClusterName` (string) AWS Cluster name. If set then AWS CLI EKS token command will be used to access cluster. - `content.cluster.config.disableCompression` (boolean) DisableCompression bypasses automatic GZip compression requests to the server. - `content.cluster.config.proxyUrl` (string) - `content.cluster.connectionState` (object) - `content.cluster.connectionState.status` (string) - `content.cluster.connectionState.message` (string) - `content.cluster.connectionState.attemptedAt` (object) Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. +protobuf.options.marshal=false +protobuf.as=Timestamp +protobuf.options.(gogoproto.goproto_stringer)=false - `content.cluster.connectionState.attemptedAt.seconds` (string) Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. - `content.cluster.connectionState.attemptedAt.nanos` (integer) Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context. - `content.cluster.connectionState.attemptedAtTs` (string) - `content.cluster.serverVersion` (string) - `content.cluster.namespaces` (array) Holds list of namespaces which are accessible in that cluster. Cluster level resources will be ignored if namespace list is not empty. - `content.cluster.refreshRequestedAt` (object) Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. +protobuf.options.marshal=false +protobuf.as=Timestamp +protobuf.options.(gogoproto.goproto_stringer)=false - `content.cluster.info` (object) - `content.cluster.info.cacheInfo` (object) - `content.cluster.info.cacheInfo.resourcesCount` (string) - `content.cluster.info.cacheInfo.apisCount` (string) - `content.cluster.info.cacheInfo.lastCacheSyncTime` (object) Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. +protobuf.options.marshal=false +protobuf.as=Timestamp +protobuf.options.(gogoproto.goproto_stringer)=false - `content.cluster.info.cacheInfo.lastCacheSyncTimeTs` (string) - `content.cluster.info.applicationsCount` (string) - `content.cluster.info.apiVersions` (array) - `content.cluster.shard_deprecated` (string) DEPRECATED: use Shard field instead. Shard contains optional shard number. Calculated on the fly by the application controller if not specified. - `content.cluster.clusterResources` (boolean) Indicates if cluster level resources should be managed. This setting is used only if cluster is connected in a namespaced mode. - `content.cluster.project` (string) - `content.cluster.labels` (object) - `content.cluster.annotations` (object) - `content.cluster.type` (string) Enum: "CUSTOMER_PROVIDED", "HARNESS_HOSTED" - `content.cluster.refreshRequestedAtTs` (string) - `content.cluster.shard` (string) - `content.createdAt` (string) - `content.lastModifiedAt` (string) - `content.stale` (boolean) - `content.tags` (object) - `totalPages` (integer) - `totalItems` (integer) - `pageItemCount` (integer) - `pageSize` (integer) - `pageIndex` (integer) - `empty` (boolean) ## Response default fields (application/json): - `error` (string) - `code` (integer) - `message` (string) - `details` (array) - `details.type_url` (string) A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in ). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme , , or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one. Schemes other than , (or the empty scheme) might be used with implementation specific semantics. - `details.value` (string) Must be a valid serialized protocol buffer of the above specified type.