Conditions Create

Handle POST requests for both creation and filtering.

Determines whether the request is for creating a new condition or filtering existing conditions based on the presence of creation-specific fields.

Args: request: HTTP request object

Returns: Response: Either creation response or filtered list response

Authentication

AuthorizationBearer
JWT access token or Respan API key

Request

This endpoint expects an object.
namestringRequired1-255 characters

Human-readable name for the condition

condition_policyanyRequired
Complex condition rules and logic stored as JSON
idstringOptional1-255 characters
descriptionstringOptional
Description of what this condition does
filter_set_idstring or nullOptional<=255 characters
Filter set identifier for log filtering
time_step_minutesinteger or nullOptional-2147483648-2147483647
Time window in minutes for aggregation type conditions
sampling_ratedouble or nullOptional

Sampling rate for single log conditions (0.0 to 1.0)

updated_byinteger or nullOptional

Response

unique_organization_idstringRead-only
Organization identifier
namestring<=255 characters

Human-readable name for the condition

condition_policyany
Complex condition rules and logic stored as JSON
created_atdatetimeRead-only
updated_atdatetimeRead-only
idstring<=255 characters
descriptionstring
Description of what this condition does
filter_set_idstring or null<=255 characters
Filter set identifier for log filtering
time_step_minutesinteger or null-2147483648-2147483647
Time window in minutes for aggregation type conditions
sampling_ratedouble or null

Sampling rate for single log conditions (0.0 to 1.0)

updated_byinteger or null