Zum Inhalt
HALOWERK

Technische Prüfungen & Formate

api / api jsonpath nodelist cardinality

An agent that hands over a bounded JSONPath projection needs its claimed result multiplicity and distinct-node count checked through descendant segments selector unions and signed slices.

POST https://detect.halowerk.com/v1/api/api-jsonpath-nodelist-cardinality

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
artifactobjectJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "properties": {
    "artifact": {
      "type": "object",
      "properties": {
        "document": {},
        "segments": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "descendant": {
                "type": "boolean"
              },
              "selectors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "name",
                        "index",
                        "wildcard",
                        "slice"
                      ],
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "name": {
                      "type": "string",
                      "minLength": 0,
                      "maxLength": 128
                    },
                    "index": {
                      "type": "integer",
                      "minimum": -1000000,
                      "maximum": 1000000
                    },
                    "start": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "integer",
                          "minimum": -1000000,
                          "maximum": 1000000
                        }
                      ]
                    },
                    "end": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "integer",
                          "minimum": -1000000,
                          "maximum": 1000000
                        }
                      ]
                    },
                    "step": {
                      "type": "integer",
                      "minimum": -1000000,
                      "maximum": 1000000
                    }
                  },
                  "required": [
                    "kind",
                    "name",
                    "index",
                    "start",
                    "end",
                    "step"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1,
                "maxItems": 32
              }
            },
            "required": [
              "descendant",
              "selectors"
            ],
            "additionalProperties": false
          },
          "minItems": 0,
          "maxItems": 32
        },
        "claimed_occurrences": {
          "type": "integer",
          "minimum": 0,
          "maximum": 25000
        },
        "claimed_distinct": {
          "type": "integer",
          "minimum": 0,
          "maximum": 25000
        }
      },
      "required": [
        "document",
        "segments",
        "claimed_occurrences",
        "claimed_distinct"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "artifact"
  ],
  "additionalProperties": false
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "artifact": {
    "document": {
      "a": [
        {
          "x": [
            0,
            1
          ]
        },
        {
          "x": [
            1,
            2
          ]
        },
        {
          "x": [
            2,
            3
          ]
        },
        {
          "x": [
            3,
            4
          ]
        }
      ],
      "b": [
        0,
        1,
        2
      ]
    },
    "segments": [
      {
        "descendant": false,
        "selectors": [
          {
            "kind": "index",
            "name": "b",
            "index": 4,
            "start": -8,
            "end": 8,
            "step": -3
          },
          {
            "kind": "wildcard",
            "name": "absent",
            "index": 4,
            "start": 2,
            "end": -1,
            "step": 1
          },
          {
            "kind": "wildcard",
            "name": "a",
            "index": -2,
            "start": 2,
            "end": -1,
            "step": -3
          }
        ]
      },
      {
        "descendant": true,
        "selectors": [
          {
            "kind": "name",
            "name": "a",
            "index": 1,
            "start": 2,
            "end": 3,
            "step": 2
          },
          {
            "kind": "index",
            "name": "absent",
            "index": -7,
            "start": -3,
            "end": -8,
            "step": -3
          },
          {
            "kind": "index",
            "name": "x",
            "index": 3,
            "start": -3,
            "end": null,
            "step": 1
          }
        ]
      },
      {
        "descendant": true,
        "selectors": [
          {
            "kind": "index",
            "name": "b",
            "index": 5,
            "start": null,
            "end": 8,
            "step": 2
          },
          {
            "kind": "wildcard",
            "name": "a",
            "index": 1,
            "start": -8,
            "end": 8,
            "step": 2
          },
          {
            "kind": "index",
            "name": "absent",
            "index": -8,
            "start": -3,
            "end": 3,
            "step": -3
          }
        ]
      }
    ],
    "claimed_occurrences": 6,
    "claimed_distinct": 3
  }
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-01, 15:19 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →