Start a discovery scan
POST/api/v1/orgs/:org/discovery/scans
Admin only. The generic body is {type, parameters}; the discovery-type
registry validates the parameters and resolves the job to enqueue. For LAN,
parameters are {cidrs, ports?, concurrency?, timeout?}; for Freebox,
{channelUid}; for Container, {hosts, timeout?} where each host is a
Docker-compatible endpoint (unix:// or tcp://); for Kubernetes,
{clusterUid, namespaces?, timeout?} where clusterUid references a
stored Kubernetes cluster connection (empty namespaces scans every
visible namespace).
A lan scan may carry a top-level region (one of the organization's
private regions, @slug): the region's agents run it, never the
server. It needs an admin membership of the organization (no super
admin bypass, refused under impersonation), a live agent of that
region whose operator enabled discovery, at most 32 ports, and room in
the organization's daily agent address quota.
Request
Responses
- 201
- 400
- 403
- 404
- 409
- 422
Scan started
Unknown discovery type (DISCOVERY_UNKNOWN_TYPE)
Permission denied
The referenced Kubernetes cluster connection was not found (KUBERNETES_CLUSTER_NOT_FOUND)
A scan of this type is already running (DISCOVERY_ALREADY_RUNNING), or a Freebox channel is not paired (FREEBOX_NOT_GRANTED)
Invalid parameters (DISCOVERY_INVALID_PARAMETERS), range too large (DISCOVERY_RANGE_TOO_LARGE), a region on a non-lan type (VALIDATION_ERROR), no live agent of the region runs discovery (DISCOVERY_REGION_UNAVAILABLE), or the daily agent address quota is spent (DISCOVERY_QUOTA_EXCEEDED)