Scaleway logo
Audit Trail API

List alert rules for a specified organization and their current status (enabled or disabled)

GET
https://api.scaleway.com
/audit-trail/v1alpha1/regions/{region}/alert-rules

List alert rules for a specified organization and their current status (enabled or disabled) › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams

List alert rules for a specified organization and their current status (enabled or disabled) › query Parameters

organization_id
​string · required

ID of the Organization to target.

(Optional) Status of the alert rule.

Enum values:
unknown_status
enabled
disabled
enabling
disabling
Default: unknown_status
page
​integer · int32
page_size
​integer · uint32

List alert rules for a specified organization and their current status (enabled or disabled) › Responses

200

Single page of preconfigured alert rules matching the requested criteria.

total_count
​integer · uint64

Total count of alert rules matching the requested criteria.


Set the alert rules to enabled

PATCH
https://api.scaleway.com
/audit-trail/v1alpha1/regions/{region}/alert-rules

Set the alert rules to enabled by replacing the set of enabled alert rules for a specified organization. The provided list defines the complete set of rules that should be enabled. Any previously enabled rule not included in the request will be disabled.

Set the alert rules to enabled › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams

Set the alert rules to enabled › Request Body

organization_id
​string

ID of the Organization to target.

enabled_alert_rule_ids
​string[]

List of IDs of the rules that must be enabled after the update. (UUID format)

Set the alert rules to enabled › Responses

200

List of the preconfigured rules that were enabled.


GET
https://api.scaleway.com
/audit-trail/v1alpha1/regions/{region}/combined-events

path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams

query Parameters

organization_id
​string · required
project_id
​string
resource_type
​scaleway.audit_trail.v1alpha1.ResourceType · enum
Enum values:
unknown_type
secm_secret
secm_secret_version
kube_cluster
kube_pool
kube_node
kube_acl
keym_key
Default: unknown_type
recorded_after
​string · date-time

(RFC 3339 format)

recorded_before
​string · date-time

(RFC 3339 format)

Enum values:
recorded_at_desc
recorded_at_asc
Default: recorded_at_desc
page_size
​integer · uint32
page_token
​string

Responses


Retrieve available fields for custom alert rules

GET
https://api.scaleway.com
/audit-trail/v1alpha1/regions/{region}/custom-alert-rule-fields

Retrieve all available fields that can be used to construct Common Expression Language (CEL) queries for custom alert rules.

Retrieve available fields for custom alert rules › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams

Retrieve available fields for custom alert rules › query Parameters

organization_id
​string · required

Region to target. If none is passed will use default region from the config.

Retrieve available fields for custom alert rules › Responses

200

A list of fields that are authorized to be used in a CEL expression.

total_count
​integer · uint64

Number of fields.


List custom alert rules for a specified organization and their current status (enabled or disabled)

GET
https://api.scaleway.com
/audit-trail/v1alpha1/regions/{region}/custom-alert-rules

List custom alert rules for a specified organization and their current status (enabled or disabled) › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams

List custom alert rules for a specified organization and their current status (enabled or disabled) › query Parameters

organization_id
​string · required

ID of the Organization to target.

(Optional) Status of the custom alert rule.

Enum values:
unknown_status
enabled
disabled
enabling
disabling
Default: unknown_status
page
​integer · int32
page_size
​integer · uint32

List custom alert rules for a specified organization and their current status (enabled or disabled) › Responses

200

Single page of custom alert rules matching the requested criteria.

total_count
​integer · uint64

Total count of custom alert rules matching the requested criteria.


Set the custom alert rules to enabled

PUT
https://api.scaleway.com
/audit-trail/v1alpha1/regions/{region}/custom-alert-rules

Set the custom alert rules to enabled by replacing the set of enabled custom alert rules for a specified organization. The provided list defines the complete set of custom rules that should be enabled. Any previously enabled custom rule not included in the request will be disabled.

Set the custom alert rules to enabled › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams

Set the custom alert rules to enabled › Request Body

organization_id
​string

ID of the Organization to target.

enabled_custom_alert_rule_ids
​string[]

List of IDs of the custom rules that must be enabled after the update. (UUID format)

Set the custom alert rules to enabled › Responses


Create a custom alert rule

POST
https://api.scaleway.com
/audit-trail/v1alpha1/regions/{region}/custom-alert-rules

Create a custom alert rule in a given region specified by the region parameter.

Create a custom alert rule › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams

Create a custom alert rule › Request Body

organization_id
​string

ID of the Organization to target.

name
​string · pattern: ^[a-zA-Z0-9]([-_.a-z…

Name of the custom alert rule.

description
​string | null

(Optional) Description of the custom alert rule.

query
​string

The Common Expression Language (CEL) string defining the logic for the alert rule.

evaluation_window
​string | null

The duration of time over which to evaluate the rule (how far back to look for matching events). (in seconds)

occurrences
​integer · uint32

The minimum number of matched occurrences required within the evaluation window to trigger the alert.

(Optional) The severity level assigned to the custom alert rule. By default, the severity will be set to info.

Enum values:
unknown_severity
info
error
warning
critical
Default: unknown_severity

Create a custom alert rule › Responses

200
id
​string

ID of the alert rule. (UUID format)

srn
​string · pattern: ^srn://audit-trail\.…

The SRN of the alert rule.

name
​string

Name of the alert rule.

description
​string | null

(Optional) Description of the alert rule.

Current status of the alert rule.

Enum values:
unknown_status
enabled
disabled
enabling
disabling
Default: unknown_status
query
​string

The Common Expression Language (CEL) string defining the logic for the alert rule.

evaluation_window
​string | null

The duration of time over which to evaluate the rule (how far back to look for matching events). (in seconds)

occurrences
​integer · uint32

The minimum number of matched occurrences required within the evaluation window to trigger the alert.

The severity level assigned to the custom alert rule.

Enum values:
unknown_severity
info
error
warning
critical
Default: unknown_severity
created_at
​string | null · date-time

Custom alert rule creation date. (RFC 3339 format)

updated_at
​string | null · date-time

Custom alert rule last modification date. (RFC 3339 format)

region
​string

Region of the alert rule.


Get custom alert rule metadata

GET
https://api.scaleway.com
/audit-trail/v1alpha1/regions/{region}/custom-alert-rules/{custom_alert_rule_id}

Retrieve metadata for a specified custom alert rule using the region and custom_alert_rule_id parameters.

Get custom alert rule metadata › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
custom_alert_rule_id
​string · required

ID of the custom alert rule to retrieve.

Get custom alert rule metadata › Responses

200
id
​string

ID of the alert rule. (UUID format)

srn
​string · pattern: ^srn://audit-trail\.…

The SRN of the alert rule.

name
​string

Name of the alert rule.

description
​string | null

(Optional) Description of the alert rule.

Current status of the alert rule.

Enum values:
unknown_status
enabled
disabled
enabling
disabling
Default: unknown_status
query
​string

The Common Expression Language (CEL) string defining the logic for the alert rule.

evaluation_window
​string | null

The duration of time over which to evaluate the rule (how far back to look for matching events). (in seconds)

occurrences
​integer · uint32

The minimum number of matched occurrences required within the evaluation window to trigger the alert.

The severity level assigned to the custom alert rule.

Enum values:
unknown_severity
info
error
warning
critical
Default: unknown_severity
created_at
​string | null · date-time

Custom alert rule creation date. (RFC 3339 format)

updated_at
​string | null · date-time

Custom alert rule last modification date. (RFC 3339 format)

region
​string

Region of the alert rule.


Update a custom alert rule

PATCH
https://api.scaleway.com
/audit-trail/v1alpha1/regions/{region}/custom-alert-rules/{custom_alert_rule_id}

Modify a custom alert rule's metadata including name and description, specified by the alert_rule_id and region parameters.

Update a custom alert rule › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
custom_alert_rule_id
​string · required

ID of the custom alert rule to update.

Update a custom alert rule › Request Body

name
​string | null · pattern: ^[a-zA-Z0-9]([-_.a-z…

(Optional) New name for the custom alert rule.

description
​string | null

(Optional) New description for the custom alert rule.

Update a custom alert rule › Responses

200
id
​string

ID of the alert rule. (UUID format)

srn
​string · pattern: ^srn://audit-trail\.…

The SRN of the alert rule.

name
​string

Name of the alert rule.

description
​string | null

(Optional) Description of the alert rule.

Current status of the alert rule.

Enum values:
unknown_status
enabled
disabled
enabling
disabling
Default: unknown_status
query
​string

The Common Expression Language (CEL) string defining the logic for the alert rule.

evaluation_window
​string | null

The duration of time over which to evaluate the rule (how far back to look for matching events). (in seconds)

occurrences
​integer · uint32

The minimum number of matched occurrences required within the evaluation window to trigger the alert.

The severity level assigned to the custom alert rule.

Enum values:
unknown_severity
info
error
warning
critical
Default: unknown_severity
created_at
​string | null · date-time

Custom alert rule creation date. (RFC 3339 format)

updated_at
​string | null · date-time

Custom alert rule last modification date. (RFC 3339 format)

region
​string

Region of the alert rule.


Delete a custom alert rule

DELETE
https://api.scaleway.com
/audit-trail/v1alpha1/regions/{region}/custom-alert-rules/{custom_alert_rule_id}

Permanently delete a custom alert rule specified by the region and alert_rule_id parameters. This action is irreversible.

Delete a custom alert rule › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
custom_alert_rule_id
​string · required

ID of the custom alert rule to delete.

Delete a custom alert rule › Responses

No data returned

Disable alert rules

POST
https://api.scaleway.com
/audit-trail/v1alpha1/regions/{region}/disable-alert-rules

Disable alert rules for a specified organization. Disabled rules will no longer trigger alerts when matching events occur.

Disable alert rules › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams

Disable alert rules › Request Body

organization_id
​string

ID of the Organization to target.

alert_rule_ids
​string[]

List of IDs of the rules to disable. (UUID format)

Disable alert rules › Responses

200

List of the preconfigured rules that were disabled.


Disable custom alert rules

POST
https://api.scaleway.com
/audit-trail/v1alpha1/regions/{region}/disable-custom-alert-rules

Disable custom alert rules for a specified organization. Disabled rules will no longer trigger alerts when matching events occur.

Disable custom alert rules › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams

Disable custom alert rules › Request Body

organization_id
​string

ID of the Organization to target.

custom_alert_rule_ids
​string[]

List of IDs of the custom rules to disable. (UUID format)

Disable custom alert rules › Responses

200

Enable alert rules

POST
https://api.scaleway.com
/audit-trail/v1alpha1/regions/{region}/enable-alert-rules

Enable alert rules for a specified organization. Enabled rules will trigger alerts when matching events occur.

Enable alert rules › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams

Enable alert rules › Request Body

organization_id
​string

ID of the Organization to target.

alert_rule_ids
​string[]

List of IDs of the rules to enable. (UUID format)

Enable alert rules › Responses

200

List of the preconfigured rules that were enabled.


Enable custom alert rules

POST
https://api.scaleway.com
/audit-trail/v1alpha1/regions/{region}/enable-custom-alert-rules

Enable custom alert rules for a specified organization. Enabled custom rules will trigger alerts when matching events occur.

Enable custom alert rules › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams

Enable custom alert rules › Request Body

organization_id
​string

ID of the Organization to target.

custom_alert_rule_ids
​string[]

List of IDs of the custom rules to enable. (UUID format)

Enable custom alert rules › Responses

200

GET
https://api.scaleway.com
/audit-trail/v1alpha1/regions/{region}/export-jobs

path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams

query Parameters

organization_id
​string · required

Filter by Organization ID.

name
​string

(Optional) Filter by export name.

tags
​string[]

(Optional) List of tags to filter on.

page
​integer · int32
page_size
​integer · uint32
Enum values:
name_asc
name_desc
created_at_asc
created_at_desc
Default: name_asc

Responses

200

Single page of export jobs matching the requested criteria.

total_count
​integer · uint64

Total count of export jobs matching the requested criteria.


GET
https://api.scaleway.com
/audit-trail/v1alpha1/regions/{region}/last-events-overview

path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams

query Parameters

organization_id
​string · required
project_id
​string

Responses


Test a custom alert rule

POST
https://api.scaleway.com
/audit-trail/v1alpha1/regions/{region}/test-custom-alert-rule

Test whether a custom alert rule's condition is currently satisfied, without needing to create or enable it.

Test a custom alert rule › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams

Test a custom alert rule › Request Body

organization_id
​string

ID of the Organization to target.

query
​string

The Common Expression Language (CEL) string defining the logic for the alert rule.

evaluation_window
​string | null

The duration of time over which to evaluate the rule (how far back to look for matching events). (in seconds)

occurrences
​integer · uint32

The minimum number of matched occurrences required within the evaluation window to trigger the alert.

Test a custom alert rule › Responses

200
firing
​boolean

True when the alert rule's condition is currently satisfied, false otherwise. A false return value does not mean the alert rule is incorrect, only that it is not currently firing.