Request error while creating a Custom URL Rule via the checkmk API

CMK version:
Checkmk Raw Edition 2.1.0p9

OS version:
Debian 11 on both checkmk server and monitored system

Description of the problem:

I want to implement a custom URL rule via the checkmk API but no matter what I do I get the same error and I have no idea how to resolve it. I’ve made the same rule via the web interface and copied the Rule Value Representation in “value_raw”, but it still doesn’t work and I still have the same error.

Error message:

  "title": "Bad Request",
  "status": 400,
  "detail": "These fields have problems: value_raw",
  "fields": {
    "value_raw": [
      "Syntax Error: invalid syntax in ''"

API request:


# NOTE: We recommend all shell users to use the "httpie" examples instead.



  curl \
    --request POST \
    --write-out "\nxxx-status_code=%{http_code}\n" \
    --header "Authorization: Bearer $USERNAME $PASSWORD" \
    --header "Accept: application/json" \
    --header "Content-Type: application/json" \
    --data '{
          "conditions": {},
          "folder": "/",
          "properties": {
            "disabled": false
          "ruleset": "extra_host_conf:notes_url",
          "value_raw": "''",
          "conditions": {
            "host_name": {
              "match_on": [
              "operator": "one_of"
           "host_tags": [],
           "host_labels": [],
           "service_labels": []

        }' \

resp=$( echo "${out}" | grep -v "xxx-status_code" )
code=$( echo "${out}" | awk -F"=" '/^xxx-status_code/ {print $2}')

# For indentation, please install 'jq' (JSON query tool)
echo "$resp" | jq
# echo "$resp"

if [[ $code -lt 400 ]]; then
    echo "OK"
    exit 0
    echo "Request error"

Have you tried removing the single quotation marks around the URL?

Yes, I also get the exact same error.