Skip to main content

perpetual detection

Manage detections.

perpetual detection create​

Create a new detection.

perpetual detection create [flags]

Changes: Stages its writes into a changeset.

Output: With --json, prints its result in the JSON envelope and any error in the error envelope.

Flags​

FlagTypeRequiredDescription
--namestringRequiredDetection name (max 256 characters).
--space-idstringRequiredSpace ID the detection belongs to.
--descriptionstringOptionalDetection description.
--querystringRequiredHamelin query for the detection.
--maturitystringOptionalDetection maturity (EXPERIMENTAL, TEST, STABLE, DEPRECATED).
--levelstringOptionalDetection level (INFORMATIONAL, LOW, MEDIUM, HIGH, CRITICAL).
--maximum-latencystringOptionalMaximum latency (MAX_1H, MAX_1D, MAX_15M).
--deploybooleanOptionalWhether to deploy the detection (default: false).
--changesetstringOptionalChangeset (CHG_*) to stage this create into — REQUIRED (the CLI makes no live changes).

Also accepts the global flags, including the sign-in flags.

perpetual detection delete​

Delete a detection.

perpetual detection delete <id> [flags]

Changes: Stages its writes into a changeset.

Output: With --json, prints its result in the JSON envelope and any error in the error envelope.

Arguments​

ArgumentRequiredDescription
idRequiredDetection ID (DET_*).

Flags​

FlagTypeRequiredDescription
--base-versionstringOptionalExpected current version for optimistic concurrency.
--changesetstringOptionalChangeset (CHG_*) to stage into; REQUIRED (the CLI makes no live changes).

Also accepts the global flags, including the sign-in flags.

perpetual detection export​

Write a detection as a GitOps file.

perpetual detection export <id> [flags]

Changes: Stages nothing.

Output: With --json, prints its result in the JSON envelope and any error in the error envelope.

Arguments​

ArgumentRequiredDescription
idRequiredDetection ID (DET_*).

Flags​

FlagTypeRequiredDescription
--dirstringOptionalDirectory for a new file (default .).
--filestringOptionalExisting .detection.yaml/.json file to edit in place.

Also accepts the global flags, including the sign-in flags.

perpetual detection get​

Get a detection.

perpetual detection get <id>

Changes: Stages nothing.

Output: With --json, prints its result in the JSON envelope and any error in the error envelope.

Arguments​

ArgumentRequiredDescription
idRequiredDetection ID (DET_*).

Also accepts the global flags, including the sign-in flags.

perpetual detection list​

List detections.

perpetual detection list [flags]

Changes: Stages nothing.

Output: With --json, prints its result in the JSON envelope and any error in the error envelope.

Flags​

FlagTypeRequiredDescription
--spacestring, repeatableOptionalOnly these spaces: SPC_* ids, comma-separated or repeated.
--filterstringOptionalRaw OData $filter expression, passed to the server as is.
--sort-bystringOptionalField to sort by (name, createdAt, updatedAt, level, maturity).
--sort-orderstringOptionalSort direction (asc, desc).
--namestringOptionalFilter by name (substring match).
--levelstringOptionalFilter by severity level (INFORMATIONAL, LOW, MEDIUM, HIGH, CRITICAL).
--maturitystringOptionalFilter by maturity (EXPERIMENTAL, TEST, STABLE, DEPRECATED).
--deploystringOptionalFilter by deployment status (true, false).
--archivedstringOptionalFilter by archived status (true, false).
--no-bodiesbooleanOptionalOmit the large query and description fields from each item (CLI-side projection; the server still returns the full bodies — this trims output, not the network transfer).
--created-by-user-idstringOptionalFilter by creator user ID (USR_* format).
--updated-by-user-idstringOptionalFilter by last updater user ID (USR_* format).
--topstringOptionalItems per page (server default 100).
--skipstringOptionalNumber of items to skip.
--allbooleanOptionalFetch every page (1000 items per request).

Also accepts the global flags, including the sign-in flags.

perpetual detection update​

Update a detection.

perpetual detection update <id> [flags]

Changes: Stages its writes into a changeset.

Output: With --json, prints its result in the JSON envelope and any error in the error envelope.

Arguments​

ArgumentRequiredDescription
idRequiredDetection ID.

Flags​

FlagTypeRequiredDescription
--namestringOptionalNew detection name.
--descriptionstringOptionalNew detection description.
--querystringOptionalNew Hamelin query for the detection.
--maturitystringOptionalNew maturity (EXPERIMENTAL, TEST, STABLE, DEPRECATED).
--levelstringOptionalNew level (INFORMATIONAL, LOW, MEDIUM, HIGH, CRITICAL).
--maximum-latencystringOptionalNew maximum latency (MAX_1H, MAX_1D, MAX_15M).
--deploybooleanOptionalWhether to deploy the detection.
--changesetstringOptionalChangeset (CHG_*) to stage this update into — REQUIRED (the CLI makes no live changes).

Also accepts the global flags, including the sign-in flags.


Perpetual CLI 0.5.0