# Delete deletes a cluster

`DELETE /api/v1/clusters/{id.value}`

Authentication (security requirement alternatives):

```json
[
  {
    "bearer": []
  }
]
```

- bearer: apiKey, header Authorization. A token sent as `Authorization: Bearer <token>`. [API Docs](https://sourcey-argocd.pages.dev/developer-guide/api-docs/index.md#authorization) shows how to get one.

Parameters:

- `id.value` (path, string, required) - value holds the cluster server URL or cluster name
  Type: string

- `server` (query, string, optional)
  Type: string

- `name` (query, string, optional)
  Type: string

- `id.type` (query, string, optional) - type is the type of the specified cluster identifier ( "server" - default, "name" ).
  Type: string

Responses:

- 200: A successful response.

Content type: application/json

Type: object

Schema: [clusterClusterResponse](https://sourcey-argocd.pages.dev/api/models/clusterclusterresponse/index.md)

- default: An unexpected error response.

Content type: application/json

Type: object

Schema: [runtimeError](https://sourcey-argocd.pages.dev/api/models/runtimeerror/index.md)

- `code` (optional)
  Type: integer, int32

- `details` (optional)
  Type: array
  
  Items:
    Reference: [protobufAny](https://sourcey-argocd.pages.dev/api/models/protobufany/index.md); Type: object

- `error` (optional)
  Type: string

- `message` (optional)
  Type: string

## Examples

### cURL

```bash
curl -X DELETE 'https://argocd.example.com/api/v1/clusters/string' \
  -H 'Authorization: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://argocd.example.com/api/v1/clusters/string', {
  method: 'DELETE',
  headers: {
    'Authorization': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.delete(
    'https://argocd.example.com/api/v1/clusters/string',
    headers={
        'Authorization': 'YOUR_TOKEN',
    },
)
print(response.text)
```
