SearchRules
curl --request POST \
--url https://api.siftstack.com/api/v1/rules/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"limit": 123,
"offset": 123,
"order": "SEARCH_ORDER_UNSPECIFIED",
"nameMatches": "<string>",
"caseSensitive": true,
"regexp": true,
"orderBy": "<string>",
"ruleIds": [
"<string>"
],
"assetIds": [
"<string>"
],
"includeDeleted": true,
"assetTags": {}
}
'import requests
url = "https://api.siftstack.com/api/v1/rules/search"
payload = {
"limit": 123,
"offset": 123,
"order": "SEARCH_ORDER_UNSPECIFIED",
"nameMatches": "<string>",
"caseSensitive": True,
"regexp": True,
"orderBy": "<string>",
"ruleIds": ["<string>"],
"assetIds": ["<string>"],
"includeDeleted": True,
"assetTags": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siftstack.com/api/v1/rules/search"
payload := strings.NewReader("{\n \"limit\": 123,\n \"offset\": 123,\n \"order\": \"SEARCH_ORDER_UNSPECIFIED\",\n \"nameMatches\": \"<string>\",\n \"caseSensitive\": true,\n \"regexp\": true,\n \"orderBy\": \"<string>\",\n \"ruleIds\": [\n \"<string>\"\n ],\n \"assetIds\": [\n \"<string>\"\n ],\n \"includeDeleted\": true,\n \"assetTags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"count": 123,
"rules": [
{
"ruleId": "<string>",
"assetId": "<string>",
"name": "<string>",
"description": "<string>",
"isEnabled": true,
"createdDate": "2023-11-07T05:31:56Z",
"modifiedDate": "2023-11-07T05:31:56Z",
"createdByUserId": "<string>",
"modifiedByUserId": "<string>",
"organizationId": "<string>",
"conditions": [
{
"ruleConditionId": "<string>",
"ruleId": "<string>",
"expression": {
"singleChannelComparison": {
"channelComponent": "<string>",
"channelName": "<string>",
"comparator": "CONDITION_COMPARATOR_UNSPECIFIED",
"double": 123,
"string": "<string>",
"lastValue": {}
},
"calculatedChannel": {
"channelReferences": {},
"expression": "<string>",
"functionDependencies": [
{
"userDefinedFunctionVersionId": "<string>"
}
]
}
},
"createdDate": "2023-11-07T05:31:56Z",
"modifiedDate": "2023-11-07T05:31:56Z",
"createdByUserId": "<string>",
"modifiedByUserId": "<string>",
"actions": [
{
"ruleActionId": "<string>",
"ruleConditionId": "<string>",
"actionType": "ACTION_KIND_UNSPECIFIED",
"configuration": {
"notification": {
"recipientUserIds": [
"<string>"
]
},
"annotation": {
"tagIds": [
"<string>"
],
"annotationType": "ANNOTATION_TYPE_UNSPECIFIED",
"assignedToUserId": "<string>",
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z"
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z"
}
]
}
},
"createdDate": "2023-11-07T05:31:56Z",
"modifiedDate": "2023-11-07T05:31:56Z",
"createdByUserId": "<string>",
"modifiedByUserId": "<string>",
"ruleActionVersionId": "<string>"
}
],
"ruleConditionVersionId": "<string>"
}
],
"ruleVersion": {
"ruleId": "<string>",
"ruleVersionId": "<string>",
"version": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"createdByUserId": "<string>",
"versionNotes": "<string>",
"generatedChangeMessage": "<string>",
"deletedDate": "2023-11-07T05:31:56Z"
},
"assetConfiguration": {
"assetIds": [
"<string>"
],
"tagIds": [
"<string>"
]
},
"contextualChannels": {
"channels": [
{
"name": "<string>",
"component": "<string>"
}
]
},
"isExternal": true,
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z"
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z"
}
],
"clientKey": "<string>",
"deletedDate": "2023-11-07T05:31:56Z"
}
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}RuleService
SearchRules
Queries rules based on provided search parameters.
POST
/
api
/
v1
/
rules
/
search
SearchRules
curl --request POST \
--url https://api.siftstack.com/api/v1/rules/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"limit": 123,
"offset": 123,
"order": "SEARCH_ORDER_UNSPECIFIED",
"nameMatches": "<string>",
"caseSensitive": true,
"regexp": true,
"orderBy": "<string>",
"ruleIds": [
"<string>"
],
"assetIds": [
"<string>"
],
"includeDeleted": true,
"assetTags": {}
}
'import requests
url = "https://api.siftstack.com/api/v1/rules/search"
payload = {
"limit": 123,
"offset": 123,
"order": "SEARCH_ORDER_UNSPECIFIED",
"nameMatches": "<string>",
"caseSensitive": True,
"regexp": True,
"orderBy": "<string>",
"ruleIds": ["<string>"],
"assetIds": ["<string>"],
"includeDeleted": True,
"assetTags": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siftstack.com/api/v1/rules/search"
payload := strings.NewReader("{\n \"limit\": 123,\n \"offset\": 123,\n \"order\": \"SEARCH_ORDER_UNSPECIFIED\",\n \"nameMatches\": \"<string>\",\n \"caseSensitive\": true,\n \"regexp\": true,\n \"orderBy\": \"<string>\",\n \"ruleIds\": [\n \"<string>\"\n ],\n \"assetIds\": [\n \"<string>\"\n ],\n \"includeDeleted\": true,\n \"assetTags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"count": 123,
"rules": [
{
"ruleId": "<string>",
"assetId": "<string>",
"name": "<string>",
"description": "<string>",
"isEnabled": true,
"createdDate": "2023-11-07T05:31:56Z",
"modifiedDate": "2023-11-07T05:31:56Z",
"createdByUserId": "<string>",
"modifiedByUserId": "<string>",
"organizationId": "<string>",
"conditions": [
{
"ruleConditionId": "<string>",
"ruleId": "<string>",
"expression": {
"singleChannelComparison": {
"channelComponent": "<string>",
"channelName": "<string>",
"comparator": "CONDITION_COMPARATOR_UNSPECIFIED",
"double": 123,
"string": "<string>",
"lastValue": {}
},
"calculatedChannel": {
"channelReferences": {},
"expression": "<string>",
"functionDependencies": [
{
"userDefinedFunctionVersionId": "<string>"
}
]
}
},
"createdDate": "2023-11-07T05:31:56Z",
"modifiedDate": "2023-11-07T05:31:56Z",
"createdByUserId": "<string>",
"modifiedByUserId": "<string>",
"actions": [
{
"ruleActionId": "<string>",
"ruleConditionId": "<string>",
"actionType": "ACTION_KIND_UNSPECIFIED",
"configuration": {
"notification": {
"recipientUserIds": [
"<string>"
]
},
"annotation": {
"tagIds": [
"<string>"
],
"annotationType": "ANNOTATION_TYPE_UNSPECIFIED",
"assignedToUserId": "<string>",
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z"
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z"
}
]
}
},
"createdDate": "2023-11-07T05:31:56Z",
"modifiedDate": "2023-11-07T05:31:56Z",
"createdByUserId": "<string>",
"modifiedByUserId": "<string>",
"ruleActionVersionId": "<string>"
}
],
"ruleConditionVersionId": "<string>"
}
],
"ruleVersion": {
"ruleId": "<string>",
"ruleVersionId": "<string>",
"version": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"createdByUserId": "<string>",
"versionNotes": "<string>",
"generatedChangeMessage": "<string>",
"deletedDate": "2023-11-07T05:31:56Z"
},
"assetConfiguration": {
"assetIds": [
"<string>"
],
"tagIds": [
"<string>"
]
},
"contextualChannels": {
"channels": [
{
"name": "<string>",
"component": "<string>"
}
]
},
"isExternal": true,
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z"
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z"
}
],
"clientKey": "<string>",
"deletedDate": "2023-11-07T05:31:56Z"
}
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Max number of rules to return (returns all if omitted).
Only applies if limit provided.
Available options:
SEARCH_ORDER_UNSPECIFIED, SEARCH_ORDER_ASC, SEARCH_ORDER_DESC Show child attributes
Show child attributes
Was this page helpful?
⌘I