A ruleset is comprised of rules which are assigned to an Agent. You can have multiple rulesets assigned to an Agent, such as Distributed Cloud AIP's Base Ruleset or Threat Intelligence Ruleset.
Distributed Cloud AIP fires an alert after evaluating incoming events against the rules you created and enabled within your organization. A rule fires an alert when the window
and threshold
requirements of the rule are met.
The rule endpoints enable you to work with the IDS Rule model and the File Rule model. To learn more about creating rules in Distributed Cloud AIP, see Rule Creation Overview.
This method enables you to get a list of all the rulesets in your environment.
Find all the rulesets in your organization:
https://api.threatstack.com/v2/rulesets
Find a ruleset with a specific agentId
(for example: 12345678-9abc-def0-1234-56789abcdef0):
https://api.threatstack.com/v2/rulesets?agentId=12345678-9abc-def0-1234-56789abcdef0
A 400 error means the agentId
is invalid. The agentId should be a 36 character UUID.
A 404 error means there is no data associated with the query for that agentId
.
Success
Bad parameters
Unauthorized response
The user is not allowed to perform this action
Rate limit hit
An internal error has occurred
{- "rulesets": [
- {
- "id": "string",
- "rulesIds": [
- "string"
], - "name": "string",
- "createdAt": "string",
- "updatedAt": "string",
- "description": "string"
}
]
}
This method enables you to create rulesets in your environment.
Create a Ruleset in your organization:
https://api.threatstack.com/v2/rulesets
400: The syntax of the message body is incorrect and the ruleset was unable to be created.
404: One of the ruleIds specified in the message body does not exist, so the ruleset was unable to be created.
409: The ruleset name duplicates an existing ruleset name. The ruleset was unable to be created.
OK
Invalid keys
Unauthorized response
ruleIds not found
Resource already exists
Rate limit hit
An internal error has occurred
{- "name": "string",
- "description": "string",
- "ruleIds": [
- "string"
]
}
{- "id": "string",
- "rulesIds": [
- "string"
], - "name": "string",
- "createdAt": "string",
- "updatedAt": "string",
- "description": "string"
}
This method enables you to get the details of a ruleset by rulesetId
.
NOTE
You can only pass one
rulesetId
at a time.
Find a ruleset by rulesetId
:
https://api.threatstack.com/v2/rulesets/{rulesetId}
The 404 error code means that the rulesetId
was not found.
Success
Bad parameters
Unauthorized response
The user is not allowed to perform this action
The resource was not found
Rate limit hit
An internal error has occurred
{- "id": "string",
- "rulesIds": [
- "string"
], - "name": "string",
- "createdAt": "string",
- "updatedAt": "string",
- "description": "string"
}
This method enables you to update rulesets in your organization.
Update a ruleset in your organization:
https://api.threatstack.com/v2/rulesets/{rulesetID}
Error Handling Tips
400: The syntax of the message body is incorrect and the ruleset did not update.
404: One of the following occurred:
409: The ruleset name duplicates an existing ruleset name.
OK
Invalid keys
Unauthorized response
Ruleset or ruleIds not found
Resource already exists
Rate limit hit
An internal error has occurred
{- "name": "string",
- "description": "string",
- "ruleIds": [
- "string"
]
}
{- "id": "string",
- "rulesIds": [
- "string"
], - "name": "string",
- "createdAt": "string",
- "updatedAt": "string",
- "description": "string"
}
This method enables you to delete a specific ruleset from your environment.
When you delete a ruleset, two things occur:
IMPORTANT: Any alerts generated by rule in the deleted ruleset are not deleted. These alerts continue to list the rule that triggered the alert, even though the ruleset no longer exists.
Delete a ruleset with a specific rulesetID
(for example: 00000000-aaaa-0000-aaaa-0000000000):
https://api.threatstack.com/v2/rulesets/00000000-aaaa-0000-aaaa-0000000000
404: The ruleset to delete was not found.
OK
Bad parameters
Unauthorized response
The resource was not found
Rate limit hit
An internal error has occurred
{- "server_ids": [
- "string"
]
}
This method enables you to get the list of rules assigned to a ruleset by the rulesetId
.
NOTE
You can only pass one
rulesetId
at a time.
Find list of rules by rulesetId
:
https://api.threatstack.com/v2/rulesets/{rulesetId}/rules
The 404 error code means that the rulesetId
was not found."
Success
Bad parameters
Unauthorized response
The user is not allowed to perform this action
The resource was not found
Rate limit hit
An internal error has occurred
{- "rules": [
- {
- "name": "string",
- "title": "string",
- "type": "File",
- "createdAt": "string",
- "updatedAt": "string",
- "severityOfAlerts": 0,
- "alertDescription": "string",
- "aggregateFields": [
- "string"
], - "filter": "string",
- "window": 0,
- "threshold": 0,
- "suppressions": [
- "string"
], - "enabled": true,
- "fileIntegrityPaths": [
- {
- "path": "string",
- "recursive": true
}
], - "ignoreFiles": [
- "string"
], - "eventsToMonitor": [
- "string"
]
}
]
}
This method enables you to create a rule for a specific ruleset.
Create a rule for a specific ruleset:
https://api.threatstack.com/v2/rulesets/{rulesetId}/rules
OK
Validation error
Unauthorized response
Ruleset ID not found
Rate limit hit
An internal error has occurred
{- "name": "string",
- "type": "host",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "severityOfAlerts": 1,
- "alertDescription": "string",
- "filter": "string",
- "window": 3600,
- "threshold": 1,
- "suppressions": [
- "string"
], - "enabled": true,
- "classificationLabels": [
- {
- "labelId": "e5034ccf-bf8e-4005-b942-737deaf4c491",
- "labelModifier": "(b)"
}
], - "aggregatedFields": [
- "exe"
]
}
{- "id": "string",
- "rulesetId": "string",
- "name": "string",
- "type": "Host",
- "createdAt": "string",
- "updatedAt": "string",
- "title": "string",
- "severityOfAlerts": 0,
- "alertDescription": "string",
- "aggregateFields": [
- "string"
], - "filter": "string",
- "window": 0,
- "threshold": 0,
- "suppressions": [
- "string"
], - "enabled": true
}
This method enables you to get the details of a specific rule assigned to a ruleset by the rulesetId
and ruleId
.
NOTE
You can only pass one
rulesetId
and oneruleId
at a time.
Find the details of a rule by rulesetId
and ruleId
:
https://api.threatstack.com/v2/rulesets/{rulesetId}/rules/{ruleId}
The 404 error code means the rulesetId
or ruleId
was not found.
Success
Bad parameters
Unauthorized response
The resource was not found
Rate limit hit
An internal error has occurred
{- "name": "string",
- "title": "string",
- "type": "host",
- "severityOfAlerts": 1,
- "alertDescription": "string",
- "aggregateFields": [
- {
- "file": "command"
}
], - "filter": "string",
- "window": 3600,
- "threshold": 1,
- "suppressions": [
- "string"
], - "fileIntegrityPaths": [
- {
- "path": "string",
- "recursive": true
}
], - "ignoreFiles": [
- "string"
], - "eventsToMonitor": [
- "string"
], - "enabled": true,
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "rulesetId": "2f23ed23-d3ba-42fd-898b-b2ccad407a6e",
- "classificationLabels": [
- {
- "labelId": "e5034ccf-bf8e-4005-b942-737deaf4c491",
- "domainId": "e5034ccf-bf8e-4005-b942-737deaf4c491",
- "domainName": "Compliance",
- "categoryId": "e5034ccf-bf8e-4005-b942-737deaf4c491",
- "categoryName": "ISO 27001",
- "labelName": "A.9.2",
- "labelModifier": "(b)"
}
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
This method enables you to update a rule.
NOTE
You cannot update the rule's
type
with this method.
Update a rule in a specific ruleset:
https://api.threatstack.com/v2/rulesets/{rulesetId}/rules/{ruleId}
OK
Validation error
Unauthorized response
Ruleset or rule ID not found
Resource already exists
Rate limit hit
An internal error has occurred
{- "name": "string",
- "type": "host",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "severityOfAlerts": 1,
- "alertDescription": "string",
- "filter": "string",
- "window": 3600,
- "threshold": 1,
- "suppressions": [
- "string"
], - "enabled": true,
- "classificationLabels": [
- {
- "labelId": "e5034ccf-bf8e-4005-b942-737deaf4c491",
- "labelModifier": "(b)"
}
], - "aggregatedFields": [
- "exe"
]
}
{- "id": "string",
- "rulesetId": "string",
- "name": "string",
- "type": "Host",
- "createdAt": "string",
- "updatedAt": "string",
- "title": "string",
- "severityOfAlerts": 0,
- "alertDescription": "string",
- "aggregateFields": [
- "string"
], - "filter": "string",
- "window": 0,
- "threshold": 0,
- "suppressions": [
- "string"
], - "enabled": true
}
This method enables you to delete a rule from a specific ruleset.
Delete a rule from a specific ruleset
https://api.threatstack.com/v2/rulesets/{rulesetId}/rules/{ruleId}
404: Either the selected ruleset cannot be found, or the rule cannot be found.
The rule was successfully deleted.
Unauthorized response
Ruleset cannot be found
Rate limit hit
An internal error has occurred
{- "message": "string"
}
This method enables you to get the list of Distributed Cloud AIP Agents to which a specific ruleset has been assigned.
NOTE
This endpoint returns only
active
Agents. You can only pass onerulesetId
at a time.
Find the list of Distributed Cloud AIP Agents assigned to a specific ruleset:
https://api.threatstack.com/v2/rulesets/{rulesetId}/agents
The 404 error code means rulesetId
was not found.
OK
Bad parameters
Unauthorized response
The resource was not found
Rate limit hit
An internal error has occurred
{- "agents": [
- "string"
]
}
This method enables you to update a rule's suppression list.
Update a rule suppression list in your organization:
https://api.threatstack.com/v2/rules/{ruleID}/suppressions
400: The syntax of the message body is incorrect and the rule did not update. There are three possible messages:
OK
Bad Request
Unauthorized response
ruleId not found
Rate limit hit
An internal error has occurred
{- "suppressions": [
- "string"
]
}
{- "name": "string",
- "title": "string",
- "type": "host",
- "severityOfAlerts": 1,
- "alertDescription": "string",
- "aggregateFields": [
- {
- "host": "exe",
- "cloudTrail": "user",
- "threatIntel": "threatintel_source"
}
], - "filter": "string",
- "window": 3600,
- "threshold": 1,
- "suppressions": [
- "string"
], - "enabled": true,
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "rulesetId": "2f23ed23-d3ba-42fd-898b-b2ccad407a6e",
- "classificationLabels": [
- {
- "labelId": "e5034ccf-bf8e-4005-b942-737deaf4c491",
- "domainId": "e5034ccf-bf8e-4005-b942-737deaf4c491",
- "domainName": "Compliance",
- "categoryId": "e5034ccf-bf8e-4005-b942-737deaf4c491",
- "categoryName": "ISO 27001",
- "labelName": "A.9.2",
- "labelModifier": "(b)"
}
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}