Skip to content

Create new rule

Request

POST /v2/rules
Security
API_Key
Bodyapplication/jsonrequired

Rule create information

checkTimesinteger, (int32)required
isDefaultRulenumber
labelsArray of objects
matchAllFiltersbooleanrequired
namestringrequired
notesstring
pageFiltersArray of objects
recipientsArray of strings
tagsArray of objects
POST
/rules
curl -i -X POST \
  https://api.observepoint.com/v2/rules \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "checkTimes": 0,
    "isDefaultRule": 0,
    "labels": [
      {
        "id": 0
      }
    ],
    "matchAllFilters": true,
    "name": "string",
    "notes": "string",
    "pageFilters": [
      {
        "matchType": "Equals",
        "ruleId": 0,
        "type": 1,
        "value": "string"
      }
    ],
    "recipients": [
      "string"
    ],
    "tags": [
      {
        "account": "string",
        "clause": "If",
        "matchType": "Equals",
        "ruleId": 0,
        "statusCode": {
          "matchType": "Equals",
          "value": 0,
          "valueType": "Specific"
        },
        "tagId": 0,
        "validationDescription": "string",
        "variables": [
          {
            "matchType": "Equals",
            "ruleTagId": 0,
            "selectorType": "String",
            "validationDescription": "string",
            "value": "string",
            "valueTagId": 0,
            "variable": "string"
          }
        ]
      }
    ]
  }'

Responses

successful operation

Bodyapplication/json
accountIdinteger, (int32)required
checkTimesinteger, (int32)required
createdAtstring, (date-time)required
createdByinteger, (int32)required
fromTemplatebooleanrequired
idinteger, (int32)required
isDefaultRulebooleanrequired
labelsArray of objects
matchAllFiltersbooleanrequired
namestringrequired
notesstring
pageFiltersArray of objects
recipientsArray of strings
tagsArray of objects
updatedAtstring, (date-time)required
Response
{ "accountId": 0, "checkTimes": 0, "createdAt": "2019-08-24T14:15:22Z", "createdBy": 0, "fromTemplate": true, "id": 0, "isDefaultRule": true, "labels": [ {} ], "matchAllFilters": true, "name": "string", "notes": "string", "pageFilters": [ {} ], "recipients": [ "string" ], "tags": [ {} ], "updatedAt": "2019-08-24T14:15:22Z" }