---
title: "Register a new cluster"
method: POST
path: "/clusters"
tags: ["clusters"]
---

# Register a new cluster

`POST /clusters`

## Request

- Base URL: `https://pmp-demo.privateplatform.mendix.com/clusterservice/v1`
- URL: `https://pmp-demo.privateplatform.mendix.com/clusterservice/v1/clusters`
- Auth: one of:
  - HTTP basic
  - API key in header `Authorization`

Register a new cluster

## Request body

- ClusterRequest
  - `clusterName` string
  - `description` string
  - `clusterType` 'AKS' | 'EKS' | 'GKE' | 'OpenShift' | 'Kubernetes': Cluster type, GKE type is applicable only for Connected clusters.
  - `deployMode` 'Standalone' | 'Connected'
  - `apiServerURL` string: API server URL of the cluster. Required only for Standalone mode clusters.
  - `token` string: Token for API access the cluster. Required only for Standalone mode clusters.
  - `secretSource` 'AWS' | 'DB' | 'AZURE' | 'HASHICORP': Secret source for API token for access the cluster. Required only for Standalone mode clusters. AWS is AWS Secrets Manager, DB is Database, AZURE is Azure Key Vault, HASHICORP is HashiCorp Vault.
  - `secretName` string: Secret name for API token for access the cluster. Required only for Standalone mode clusters.
  - `enableLogging` 'Yes' | 'No'
  - `enableMonitoring` 'Yes' | 'No'
  - `registryOciURL` string: OCI URL for the container registry. Optional only for Standalone mode clusters.
  - `grafanaConfig` object
    - `host` string: Grafana Host API URL for logging and monitoring.
    - `apiKey` string: Grafana Host API Key for logging and monitoring.
    - `datasourceType` 'Loki' | 'Azure_Monitor': Grafana data source type for logging and monitoring.
    - `loki` string
    - `prometheus` string
    - `secretSource` 'AWS' | 'DB' | 'AZURE' | 'HASHICORP': Secret source for API key for access the Grafana data source. AWS is AWS Secrets Manager, DB is Database, AZURE is Azure Key Vault, HASHICORP is HashiCorp Vault.
    - `secretName` string: Secret name for API key for access the Grafana data source.
    - `azureMonitorName` string
    - `aksName` string
    - `aksResourceID` string

## Response `201`

Cluster information

- Cluster
  - `clusterId` string
  - `clusterName` string
  - `description` string
  - `clusterType` 'AKS' | 'EKS' | 'GKE' | 'OpenShift' | 'Kubernetes'
  - `deployMode` 'Standalone' | 'Connected'
  - `apiServerURL` string: API server URL of the cluster. Applicable only for Standalone mode clusters.
  - `token` string: Token for API token for access the cluster. Applicable only for Standalone mode clusters.
  - `secretSource` 'AWS' | 'DB' | 'AZURE' | 'HASHICORP': Secret source for API token for access the cluster. Required only for Standalone mode clusters. AWS is AWS Secrets Manager, DB is Database, AZURE is Azure Key Vault, HASHICORP is HashiCorp Vault.
  - `secretName` string: Secret name for API token for access the cluster. Applicable only for Standalone mode clusters.
  - `enableLogging` 'Yes' | 'No'
  - `enableMonitoring` 'Yes' | 'No'
  - `registryOciURL` string: OCI URL for the container registry. Optional only for Standalone mode clusters.
  - `grafanaConfig` object
    - `host` string
    - `apiKey` string
    - `datasourceType` 'Loki' | 'Azure_Monitor': Grafana data source type for logging and monitoring.
    - `loki` string
    - `prometheus` string
    - `secretSource` 'AWS' | 'DB' | 'AZURE' | 'HASHICORP': Secret source for API key for access the Grafana data source. AWS is AWS Secrets Manager, DB is Database, AZURE is Azure Key Vault, HASHICORP is HashiCorp Vault.
    - `secretName` string: Secret name for API key for access the Grafana data source.
    - `azureMonitorName` string
    - `aksName` string
    - `aksResourceID` string

## Other responses

- `400`: Invalid input parameter or request body
- `401`: Authentication information is missing or invalid
- `403`: User has no permission for this operation
- `404`: Resource not found

---

[API](https://skmtc.dev/mendix/apis/cluster-service-v1.md) - [All operations](https://skmtc.dev/mendix/apis/cluster-service-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/mendix/apis/cluster-service-v1/revisions/ce8d4c9c1a02?raw)
