Query callback rule list

Query the callback routing rules in the workspace.

HTTP
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/callback-rules

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. Prepare a personal access token and target workspace ID that can access the target workspace.

Request parameters

Shell
curl "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/callback-rules" -H "X-API-Key: $CLOUDSIGMA_API_KEY" -H "X-Workspace-ID: $WORKSPACE_ID"

Query parameters

Type

Required

Description

provider

string

No

Provider screening.

credential_ref

string

No

Credential reference filtering.

enabled

boolean

No

Whether to enable.

limit

integer

No

Default 50, maximum 200.

offset

integer

No

The default is 0, and negative numbers are handled as 0.

Use provider, credential_ref, and enabled for filtering, and limit and offset for paging. limit defaults to 50, and the maximum value is 200. Negative offset is treated as 0.

The results are arranged in ascending order by priority, id. When there is no match, items is [].

Successful response

JSON
{
  "code": 0,
  "data": {
    "items": [],
    "total": 0,
    "limit": 0,
    "offset": 0
  }
}

Field

Type

Description

code

integer

0 when the request is processed successfully.

data

object

response data.

data.items

array of object

Current page callback rules.

data.items[].id

string

Callback rule ID. Can be used to view, update, or delete the rule.

data.items[].workspace_id

string

The workspace ID to which it belongs.

data.items[].provider

string

Provider ID.

data.items[].credential_ref

string

A reference to a saved credential, not a clear-text key.

data.items[].name

string

Name.

data.items[].description

string

Description. Can be omitted if not set.

data.items[].enabled

boolean

Whether to enable.

data.items[].priority

integer

Match priority.

data.items[].match

object

Match condition.

data.items[].match.resource_kinds

array of string

Matching resource types. Any item in the array can be hit. Can be omitted if not set.

data.items[].match.event_types

array of string

Matching event types. Any item in the array can be hit. Can be omitted if not set.

data.items[].match.event_actions

array of string

Matching event action. Any item in the array can be hit. Can be omitted if not set.

data.items[].match.field_equals

object

A key-value pair of field paths and matching values. Can be omitted if not set.

data.items[].target_type

string

Callback target type, currently agent_automation_task.

data.items[].target_config

object

Callback target configuration and public extension fields. Can be omitted if not set.

data.items[].target_config.automation_task_id

string

The automation task ID that receives the callback.

data.items[].target_config.user_api_key_configured

boolean

Whether the credentials for the target call have been saved. Can be omitted if not set.

data.items[].stop_after_match

boolean

Whether to stop matching after a hit.

data.items[].version

integer

Current version number.

data.items[].created_by

string

Creator ID. Can be omitted if not set.

data.items[].updated_by

string

Last updated by identifier. Can be omitted if not set.

data.items[].created_at

string

Creation time, in RFC 3339 format.

data.items[].updated_at

string

Last updated in RFC 3339 format.

data.total

integer

The total number of matching rules.

data.limit

integer

The maximum number returned this time.

data.offset

integer

The starting position of this return.

Error response

JSON
{
  "code": 6,
  "message": "unauthenticated"
}

Field

Type

Description

code

integer

error code.

message

string

Error message for the caller.

Last updated on