Skip to main content
POST
/
api
/
v1
/
rules
CreateRule
curl --request POST \
  --url https://api.siftstack.com/api/v1/rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "update": {
    "name": "<string>",
    "description": "<string>",
    "conditions": [
      {
        "expression": {},
        "actions": [
          {
            "actionType": "ACTION_KIND_UNSPECIFIED",
            "configuration": {},
            "ruleActionId": "<string>"
          }
        ],
        "ruleConditionId": "<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"
      }
    ],
    "ruleId": "<string>",
    "assetId": "<string>",
    "isEnabled": true,
    "organizationId": "<string>",
    "versionNotes": "<string>",
    "clientKey": "<string>",
    "assetConfiguration": {
      "assetIds": [
        "<string>"
      ],
      "tagIds": [
        "<string>"
      ]
    },
    "isExternal": true
  }
}
'
{
  "ruleId": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
update
object
required

UpdateRuleRequest is used to create or update a rule. If the rule_id or client_key is provided, the rule will be updated. If not, a new rule will be created.

Response

A successful response.

ruleId
string
required