{
  "id": "ciq-18",
  "title": "ContX IQ: How do I fetch all properties of a node with a wildcard?",
  "description": "Use wildcard syntax to retrieve all properties of a node or relationship without explicitly listing each one. Simplifies queries when you need complete data snapshots or don't know all property names in advance.",
  "category": "ContX IQ",
  "tags": [
    "ContX IQ Policy",
    "ContX IQ Query",
    "Wildcard Properties",
    "Dynamic Schema",
    "All Properties",
    "Flexible Queries"
  ],
  "api": "ContX IQ",
  "language": "Json",
  "lastUpdated": "2026-03-20",
  "openApiEndpoints": [
    "/capture/v1/nodes",
    "/capture/v1/relationships",
    "/configs/v1/authorization-policies",
    "/configs/v1/knowledge-queries",
    "/contx-iq/v1/execute"
  ],
  "relatedGuides": [
    "/guides/guide-contx-iq",
    "/guides/guide-sandbox"
  ],
  "commonErrors": [
    {
      "code": "401",
      "message": "UNAUTHENTICATED",
      "solution": "Check credentials: ServiceAccount Bearer token for config APIs, X-IK-ClientKey for execution"
    },
    {
      "code": "404",
      "message": "NOT_FOUND",
      "solution": "Verify the query/policy ID exists and belongs to your project"
    }
  ],
  "summary": "This example demonstrates wildcard property retrieval:\n\nTraditional approach (explicit):\nRETURN car.model, car.vin, car.color, car.year\n\nWildcard approach:\nRETURN car.* (returns ALL properties)\n\nMixed approach in this example:\n- LicenseNumber: Retrieve specific property (number)\n- Car: Retrieve ALL properties (using wildcard)\n- OWNS relationship: Retrieve ALL properties (using wildcard)\n\nBenefits:\n- Handles dynamic/evolving schemas\n- Simpler queries for complete data exports\n- No need to update queries when properties are added",
  "usecase": "Scenario: Export complete vehicle data without knowing all property names.\n\nGraph data:\nPerson(Alice) -[OWNS {weight: \"100kg\", since: \"2020\"}]-> Car(model: \"Mustang\", vin: \"ABC\", color: \"red\", year: 2020)\nCar -[HAS]-> LicenseNumber(number: \"ABC-123\")\n\nQuery returns:\n{\n  license: \"ABC-123\",           // Specific property\n  car: {model, vin, color, year, ...any_future_properties},  // All Car properties\n  owns: {weight, since, ...any_future_properties}  // All OWNS properties\n}\n\nFuture-proof: If Car gains new properties (mileage, insurance), query automatically includes them.",
  "requirements": "Prerequisites:\n- ServiceAccount credentials: For creating policies and queries (Bearer token)\n- AppAgent credentials: For data ingestion and query execution (X-IK-ClientKey)\n- User access token: For authorized read operations\n\nPolicy considerations:\n- Wildcard read access must be authorized in policy\n- Policy can still restrict which node types allow wildcard reads",
  "steps": "Step 1: Ingest Nodes with Multiple Properties\n- Authentication: AppAgent credential (X-IK-ClientKey header)\n- Action: POST nodes with various properties\n- Result: Graph with rich property data\n\nStep 2: Create Wildcard Read Policy\n- Authentication: ServiceAccount credential (Bearer token)\n- Action: POST policy allowing:\n  - READ specific properties on some nodes\n  - READ all properties (*) on others\n- Result: Policy ID returned\n\nStep 3: Create Wildcard Query\n- Authentication: ServiceAccount credential (Bearer token)\n- Action: POST query using:\n  - Specific: licenseNumber.number\n  - Wildcard: car.*, owns.*\n- Result: Query ID returned\n\nStep 4: Execute Query\n- Authentication: AppAgent credential + User token\n- Action: POST to /contx-iq/v1/execute\n- Result: Complete property data for Car and OWNS, specific property for LicenseNumber",
  "graph": {
    "caption": "The graph the example runs on: 9 nodes (3 Person, 2 Car, 1 Bus, 3 LicenseNumber) and 7 relationships (OWNS, HAS). Hover a node for its properties, click it to highlight its neighbourhood.",
    "nodes": [
      {
        "external_id": "alice",
        "type": "Person",
        "is_identity": true,
        "properties": [
          {
            "type": "email",
            "value": "alice@email.com"
          },
          {
            "type": "name",
            "value": "Alice Smith"
          }
        ]
      },
      {
        "external_id": "satchmo",
        "type": "Person",
        "is_identity": true,
        "properties": [
          {
            "type": "email",
            "value": "satchmo@demo.com"
          },
          {
            "type": "name",
            "value": "Louis Armstrong"
          }
        ]
      },
      {
        "external_id": "karel",
        "type": "Person",
        "is_identity": true,
        "properties": [
          {
            "type": "email",
            "value": "karel@demo.com"
          },
          {
            "type": "name",
            "value": "Karel Plihal"
          }
        ]
      },
      {
        "external_id": "kitt",
        "type": "Car",
        "is_identity": false,
        "properties": [
          {
            "type": "manufacturer",
            "value": "pontiac"
          },
          {
            "type": "model",
            "value": "Firebird"
          }
        ]
      },
      {
        "external_id": "caddilacv16",
        "type": "Car",
        "is_identity": false,
        "properties": [
          {
            "type": "manufacturer",
            "value": "Caddilac"
          },
          {
            "type": "model",
            "value": "V-16"
          }
        ]
      },
      {
        "external_id": "harmonika",
        "type": "Bus",
        "is_identity": false,
        "properties": [
          {
            "type": "manufacturer",
            "value": "Ikarus"
          },
          {
            "type": "model",
            "value": "280"
          }
        ]
      },
      {
        "external_id": "ln-xxx",
        "type": "LicenseNumber",
        "is_identity": false,
        "properties": [
          {
            "type": "license",
            "value": "ln-xxx-value"
          }
        ]
      },
      {
        "external_id": "ln-yyy",
        "type": "LicenseNumber",
        "is_identity": false,
        "properties": [
          {
            "type": "license",
            "value": "ln-yyy-value"
          }
        ]
      },
      {
        "external_id": "ln-zzz",
        "type": "LicenseNumber",
        "is_identity": false,
        "properties": [
          {
            "type": "license",
            "value": "ln-zzz-value"
          }
        ]
      }
    ],
    "relationships": [
      {
        "source": "alice",
        "target": "kitt",
        "type": "OWNS",
        "properties": [
          {
            "type": "weight",
            "value": 1
          }
        ]
      },
      {
        "source": "alice",
        "target": "caddilacv16",
        "type": "OWNS",
        "properties": [
          {
            "type": "weight",
            "value": 2
          }
        ]
      },
      {
        "source": "satchmo",
        "target": "caddilacv16",
        "type": "OWNS",
        "properties": []
      },
      {
        "source": "karel",
        "target": "harmonika",
        "type": "OWNS",
        "properties": []
      },
      {
        "source": "kitt",
        "target": "ln-xxx",
        "type": "HAS",
        "properties": [
          {
            "type": "weight",
            "value": 3
          }
        ]
      },
      {
        "source": "caddilacv16",
        "target": "ln-zzz",
        "type": "HAS",
        "properties": []
      },
      {
        "source": "harmonika",
        "target": "ln-yyy",
        "type": "HAS",
        "properties": []
      }
    ]
  },
  "code": [
    {
      "step": "Step 1",
      "description": "Capture the nodes needed for this use case.",
      "filename": "POST https://eu.api.indykite.com/capture/v1/nodes/",
      "language": "Json",
      "ingest": {
        "nodes": [
          {
            "external_id": "alice",
            "type": "Person",
            "is_identity": true,
            "properties": [
              {
                "type": "email",
                "value": "alice@email.com"
              },
              {
                "type": "name",
                "value": "Alice Smith"
              }
            ]
          },
          {
            "external_id": "satchmo",
            "type": "Person",
            "is_identity": true,
            "properties": [
              {
                "type": "email",
                "value": "satchmo@demo.com"
              },
              {
                "type": "name",
                "value": "Louis Armstrong"
              }
            ]
          },
          {
            "external_id": "karel",
            "type": "Person",
            "is_identity": true,
            "properties": [
              {
                "type": "email",
                "value": "karel@demo.com"
              },
              {
                "type": "name",
                "value": "Karel Plihal"
              }
            ]
          },
          {
            "external_id": "kitt",
            "type": "Car",
            "is_identity": false,
            "properties": [
              {
                "type": "manufacturer",
                "value": "pontiac"
              },
              {
                "type": "model",
                "value": "Firebird"
              }
            ]
          },
          {
            "external_id": "caddilacv16",
            "type": "Car",
            "is_identity": false,
            "properties": [
              {
                "type": "manufacturer",
                "value": "Caddilac"
              },
              {
                "type": "model",
                "value": "V-16"
              }
            ]
          },
          {
            "external_id": "harmonika",
            "type": "Bus",
            "is_identity": false,
            "properties": [
              {
                "type": "manufacturer",
                "value": "Ikarus"
              },
              {
                "type": "model",
                "value": "280"
              }
            ]
          },
          {
            "external_id": "ln-xxx",
            "type": "LicenseNumber",
            "is_identity": false,
            "properties": [
              {
                "type": "license",
                "value": "ln-xxx-value"
              }
            ]
          },
          {
            "external_id": "ln-yyy",
            "type": "LicenseNumber",
            "is_identity": false,
            "properties": [
              {
                "type": "license",
                "value": "ln-yyy-value"
              }
            ]
          },
          {
            "external_id": "ln-zzz",
            "type": "LicenseNumber",
            "is_identity": false,
            "properties": [
              {
                "type": "license",
                "value": "ln-zzz-value"
              }
            ]
          }
        ]
      }
    },
    {
      "description": "Capture the relationships needed for this use case.",
      "filename": "POST https://eu.api.indykite.com/capture/v1/relationships/",
      "language": "Json",
      "ingest": {
        "relationships": [
          {
            "source": {
              "external_id": "alice",
              "type": "Person"
            },
            "target": {
              "external_id": "kitt",
              "type": "Car"
            },
            "type": "OWNS",
            "properties": [
              {
                "type": "weight",
                "value": 1
              }
            ]
          },
          {
            "source": {
              "external_id": "alice",
              "type": "Person"
            },
            "target": {
              "external_id": "caddilacv16",
              "type": "Car"
            },
            "type": "OWNS",
            "properties": [
              {
                "type": "weight",
                "value": 2
              }
            ]
          },
          {
            "source": {
              "external_id": "satchmo",
              "type": "Person"
            },
            "target": {
              "external_id": "caddilacv16",
              "type": "Car"
            },
            "type": "OWNS"
          },
          {
            "source": {
              "external_id": "karel",
              "type": "Person"
            },
            "target": {
              "external_id": "harmonika",
              "type": "Bus"
            },
            "type": "OWNS"
          },
          {
            "source": {
              "external_id": "kitt",
              "type": "Car"
            },
            "target": {
              "external_id": "ln-xxx",
              "type": "LicenseNumber"
            },
            "type": "HAS",
            "properties": [
              {
                "type": "weight",
                "value": 3
              }
            ]
          },
          {
            "source": {
              "external_id": "caddilacv16",
              "type": "Car"
            },
            "target": {
              "external_id": "ln-zzz",
              "type": "LicenseNumber"
            },
            "type": "HAS"
          },
          {
            "source": {
              "external_id": "harmonika",
              "type": "Bus"
            },
            "target": {
              "external_id": "ln-yyy",
              "type": "LicenseNumber"
            },
            "type": "HAS"
          }
        ]
      }
    },
    {
      "step": "Step 2",
      "description": "Create a CIQ Policy which designates the Subject node, the cypher, the nodes allowed to be upserted and the nodes allowed to be read. ",
      "filename": "policy.json",
      "language": "Json",
      "ingest": {
        "meta": {
          "policy_version": "1.0-ciq"
        },
        "subject": {
          "type": "Person"
        },
        "condition": {
          "cypher": "MATCH (subject:Person)-[owns:OWNS]->(car:Car)-[:HAS]->(ln:LicenseNumber)",
          "filter": [
            {
              "app": "app1",
              "operator": "=",
              "attribute": "subject.external_id",
              "value": "$token.sub"
            }
          ]
        },
        "allowed_reads": {
          "nodes": [
            "car",
            "ln",
            "car.*",
            "ln.property.license"
          ],
          "relationships": [
            "owns.*"
          ]
        },
        "allowed_upserts": {
          "nodes": {
            "existing_nodes": [
              "car"
            ]
          }
        }
      }
    },
    {
      "description": "Request to create the CIQ Policy configuration using REST.",
      "filename": "POST https://eu.api.indykite.com/configs/v1/authorization-policies",
      "language": "Json",
      "ingest": {
        "project_id": "your_project_gid",
        "description": "description of policy",
        "display_name": "policy name",
        "name": "policy-name",
        "policy": "{\"meta\":{\"policy_version\":\"1.0-ciq\"},\"subject\":{\"type\":\"Person\"},\"condition\":{\"cypher\":\"MATCH (subject:Person)-[owns:OWNS]->(car:Car)-[:HAS]->(ln:LicenseNumber)\",\"filter\":[{\"app\":\"app1\",\"operator\":\"=\",\"attribute\":\"subject.external_id\",\"value\":\"$token.sub\"}]},\"allowed_reads\":{\"nodes\":[\"car\",\"ln\",\"car.*\",\"ln.property.license\"],\"relationships\":[\"owns.*\"]},\"allowed_upserts\":{\"nodes\":{\"existing_nodes\":[\"car\"]}}}",
        "status": "ACTIVE",
        "tags": []
      }
    },
    {
      "description": "Request to read the CIQ Policy configuration using REST.",
      "filename": "policy_request.json",
      "language": "Json",
      "ingest": {
        "id": "your_policy_configuration_gid"
      }
    },
    {
      "step": "Step 3",
      "description": "Create a CIQ Query in the context of the policy to retrieve the designated properties. ",
      "filename": "knowledge_query.json",
      "language": "Json",
      "ingest": {
        "nodes": [
          "car.property.*",
          "ln.property.license"
        ],
        "relationships": [
          "owns.*"
        ],
        "filter": {
          "attribute": "ln.property.license",
          "operator": "=",
          "value": "$ln_value"
        }
      }
    },
    {
      "description": "Request to create a CIQ Query configuration using REST.",
      "filename": "POST https://eu.api.indykite.com/configs/v1/knowledge-queries",
      "language": "Json",
      "ingest": {
        "project_id": "your_project_gid",
        "description": "description of knowledge query",
        "display_name": "knowledge query name",
        "name": "knowledge-query-name",
        "policy_id": "your_policy_gid",
        "query": "{\"nodes\":[\"car.property.*\",\"ln.property.license\"],\"relationships\":[\"owns.*\"],\"filter\":{\"attribute\":\"ln.property.license\",\"operator\":\"=\",\"value\":\"$ln_value\"}}",
        "status": "ACTIVE"
      }
    },
    {
      "description": "Read the CIQ Query Configuration.",
      "filename": "GET https://eu.api.indykite.com/configs/v1/knowledge-queries/{id}",
      "language": "Json",
      "ingest": {
        "id": "your_knowledge_query_configuration_gid"
      }
    },
    {
      "step": "Step 4",
      "description": "Run a CIQ Execution to get the designated information. ",
      "filename": "POST https://eu.api.indykite.com/contx-iq/v1/execute",
      "language": "Json",
      "ingest": {
        "id": "knowledge_query_gid",
        "input_params": {
          "ln_value": "ln-xxx-value"
        },
        "page_token": 1
      }
    },
    {
      "description": "CIQ Execution response.",
      "filename": "response.json",
      "language": "Json",
      "ingest": {
        "data": [
          {
            "nodes": {
              "car.property.*": [
                {
                  "type": "manufacturer",
                  "value": "pontiac"
                },
                {
                  "type": "model",
                  "value": "Firebird"
                }
              ],
              "ln.property.license": "ln-xxx-value"
            },
            "relationships": {
              "owns.*": {
                "create_time": "2025-09-26T20:41:30.318Z",
                "id": "Wb01b9HYQgKbGkpQl4FDeA",
                "type": "OWNS",
                "update_time": "2025-09-26T20:41:30.318Z",
                "weight": 1
              }
            }
          }
        ]
      }
    }
  ],
  "links": {
    "html": "/resources/ciq-18",
    "markdown": "/resources/ciq-18.md",
    "openApi": "https://openapi.indykite.com/"
  }
}