Clusters
Preview

Ask a cluster's operator to scan for Argo CD and Flux again

"Check again": the cluster's operator looks for Argo CD and Flux, reading only, and reports what they manage; the result replaces what earlier scans found. Answers at once with the scan under way; the result arrives as a live update and in `getClusterImportScan`. A scan already under way answers the

POST
/clusters/{clusterId}/import-scans
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

clusterId*string
Formatuuid
Idempotency-Key?string

Makes retries safe. A repeated key with the same request returns the first result and sets Idempotent-Replayed: true. The same key with a different request answers 409 idempotency.key_reused, and while the first request is still running 409 idempotency.in_progress. Results are kept for 24 hours. Server errors and refusals for lack of sign-in or permission are not kept, so a retry runs again.

Match^[A-Za-z0-9_.:-]+$
Length1 <= length <= 255

Response Body

The scan is under way.

application/json
  1. response

What a cluster's scan for Argo CD and Flux found.

clusterId*string
state*string

scanning while a scan is under way; done once the cluster reported one; none when it never has and none is under way.

Value in"scanning""done""none"
enabled*boolean

Whether the cluster's operator scans, which needs an operator that can and the import capability on.

requestedScanId*|

The scan last asked for, or null when nobody has asked.

requestedAt*|
Formatdate-time
scannedAt*|

When the latest complete scan ran, or null when the cluster has reported none.

Formatdate-time
tools*array<>

The tools the latest scan found, Argo CD first. Empty when it found neither.

Example Request
curl -X POST 'https://wardn.example.com/api/v1/clusters/497f6eca-6276-4993-bfeb-53cbbbba6f08/import-scans'
Example Response
{  "clusterId": "string",  "state": "scanning",  "enabled": true,  "requestedScanId": "string",  "requestedAt": "2019-08-24T14:15:22Z",  "scannedAt": "2019-08-24T14:15:22Z",  "tools": [    {      "tool": "argocd",      "namespace": "string",      "version": "string",      "objects": [        {          "kind": "string",          "count": 0        }      ],      "clusters": [        "string"      ],      "error": {        "message": "string",        "reason": "forbidden",        "namespace": "string"      },      "truncated": true,      "scannedAt": "2019-08-24T14:15:22Z",      "counts": {        "total": 0,        "importable": 0,        "imported": 0,        "remaining": 0      }    }  ]}