Detection Rule
Create Detection Rule
Endpoint to create a new Detection Rule
post/detection-rule
Request
- Base URLhttps://oneuptime.com/api
- AuthAPI key in header APIKey
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"data": {
"projectId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"name": "Example Text",
"sigmaRuleYaml": "This is an example of longer text content that provides detailed information."
}
}Response
Created successfully
Example response
{
"data": {
"_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"createdAt": {
"_type": "DateTime",
"value": "2023-10-01T12:00:00Z"
},
"updatedAt": {
"_type": "DateTime",
"value": "2023-10-01T12:00:00Z"
},
"deletedAt": {
"_type": "DateTime",
"value": "2023-10-01T12:00:00Z"
},
"project": {
"_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
},
"projectId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"name": "Example Text",
"description": "This is an example of longer text content that provides detailed information.",
"sigmaRuleYaml": "This is an example of longer text content that provides detailed information.",
"isEnabled": true,
"evaluationIntervalInMinutes": 42,
"isRealTime": true,
"groupByField": "Example Text",
"distinctCountField": "Example Text",
"matchCountThreshold": 42,
"shouldCreateAlert": true,
"shouldWriteDetectionFinding": true,
"shouldCreateIncident": true,
"shouldCreateCase": true,
"riskScore": 42,
"alertSeverity": {
"_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
},
"alertSeverityId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"incidentSeverity": {
"_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
},
"incidentSeverityId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"lastEvaluatedAt": {
"_type": "DateTime",
"value": "2023-10-01T12:00:00Z"
},
"lastMatchAt": {
"_type": "DateTime",
"value": "2023-10-01T12:00:00Z"
},
"lastError": "This is an example of longer text content that provides detailed information.",
"createdByUser": {
"_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
},
"createdByUserId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"deletedByUser": {
"_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
},
"deletedByUserId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.