Developer Resources

Explore our collection of code samples, tutorials, and guides to help you connect your applications with the IndyKite platform.

ContX IQ 28 resources

ContX IQ: Which license numbers can a person access?ContX IQPython

ContX IQ: Which license numbers can a person access?

Query the IndyKite Knowledge Graph (IKG) to retrieve all vehicle license numbers that a specific person is authorized to view based on their contractual relationships.

ContX IQ PolicyContX IQ QueryContX IQ Execution+2 more
View the resourceContX IQ
ContX IQ: Which payment methods do contracted vehicle users have?ContX IQPython

ContX IQ: Which payment methods do contracted vehicle users have?

Query the IndyKite Knowledge Graph to list all payment methods belonging to people who have active contracts for vehicles. This demonstrates linking an Application to graph data and querying through authorized relationships.

ContX IQ PolicyContX IQ QueryContX IQ Execution+3 more
View the resourceContX IQ
ContX IQ: How do I grant unrestricted READ access to a node category?ContX IQJson

ContX IQ: How do I grant unrestricted READ access to a node category?

Create a policy that allows any authenticated request to READ all nodes of a specific type (e.g., all LicenseNumber nodes) without requiring relationship-based authorization.

ContX IQ PolicyContX IQ QueryContX IQ Execution+2 more
View the resourceContX IQ
ContX IQ: How do I create nodes and relationships with an authorized write query?ContX IQJson

ContX IQ: How do I create nodes and relationships with an authorized write query?

Demonstrates how to create new Contract nodes and relationships (COVERS, ACCEPTED) through an authorized ContX IQ write query. The Application can only create contracts for vehicles owned by companies it has agreements with.

ContX IQ PolicyContX IQ QueryContX IQ Execution+3 more
View the resourceContX IQ
ContX IQ: How do I upsert relationships between existing nodes?ContX IQJson

ContX IQ: How do I upsert relationships between existing nodes?

Create or update (upsert) relationships between existing nodes in the graph. This example demonstrates using the allowed_upserts.relationships policy directive to authorize ACCEPTED relationships between Person and Contract nodes.

ContX IQ PolicyContX IQ QueryContX IQ Execution+3 more
View the resourceContX IQ
ContX IQ: How do I delete nodes and their relationships with an authorized query?ContX IQJson

ContX IQ: How do I delete nodes and their relationships with an authorized query?

Demonstrates authorized node deletion in the IndyKite Knowledge Graph. When a node is deleted, all its relationships are automatically removed. This example shows deleting Contract nodes for a specific Person.

ContX IQ PolicyContX IQ QueryContX IQ Execution+3 more
View the resourceContX IQ
ContX IQ: Loyalty Program - Which payment method belongs to this license plate?ContX IQJson

ContX IQ: Loyalty Program - Which payment method belongs to this license plate?

Real-world loyalty program scenario: Given a vehicle's license plate number, retrieve the credit card associated with an authorized user. Demonstrates multi-condition authorization with consent validation and loyalty plan membership checks.

ContX IQ PolicyContX IQ QueryContX IQ Execution+3 more
View the resourceContX IQ
ContX IQ: How do I list the Knowledge Queries of a project?ContX IQBash

ContX IQ: How do I list the Knowledge Queries of a project?

List the Knowledge Queries of a project with GET /configs/v1/knowledge-queries: a metadata-only list by default, with each query's id, name, display name, description and status, full_fetch=true to include the query text and policy_id, and search= to filter by name, display name or description.

ContX IQKnowledge QueryConfig API+3 more
View the resourceContX IQ
ContX IQ: How do I connect system nodes (_Application) to business data?ContX IQJson

ContX IQ: How do I connect system nodes (_Application) to business data?

Learn how to link auto-generated system nodes (_Application, _AppAgent) to your business data in the knowledge graph. This is essential for using the Application as an authorized subject in ContX IQ queries.

ContX IQ PolicyContX IQ QueryApplication Linking+3 more
View the resourceContX IQ
ContX IQ: Complete CRUD Workflow with _Application as SubjectContX IQJson

ContX IQ: Complete CRUD Workflow with _Application as Subject

Comprehensive example showing how an Application can read resources, create relationships to those resources, and then create new nodes. Demonstrates progressive authorization as the graph structure changes.

ContX IQ PolicyContX IQ QueryCRUD Operations+3 more
View the resourceContX IQ
ContX IQ: How do I create a user node from an access token and authorize through organization membership?ContX IQJson

ContX IQ: How do I create a user node from an access token and authorize through organization membership?

Create a User node from the caller's access token, link it to an ingested UserProfile, then read and upsert Event nodes according to the UserProfile's BELONGS_TO relationship with its Organization. The policy filter reads the token's sub claim and the role property stored on the relationship.

ContX IQ PolicyContX IQ QueryUser Subject+3 more
View the resourceContX IQ
ContX IQ: User Consent Management - How does a user grant and revoke payment access?ContX IQJson

ContX IQ: User Consent Management - How does a user grant and revoke payment access?

Demonstrates user-controlled consent workflows where a Person can authorize a Company to access their payment method, and later revoke that access. Uses user tokens as subjects for self-service data governance.

ContX IQ PolicyContX IQ QueryConsent Management+5 more
View the resourceContX IQ
ContX IQ: How do I require step-up authentication based on the auth_time claim?ContX IQJson

ContX IQ: How do I require step-up authentication based on the auth_time claim?

Enforce re-authentication for sensitive operations by checking the token's auth_time claim. If the user authenticated more than one hour ago, return an advice requesting fresh authentication.

ContX IQ PolicyContX IQ QueryStep-Up Authentication+4 more
View the resourceContX IQ
ContX IQ: How do I require step-up authentication based on the token issue time (iat claim)?ContX IQJson

ContX IQ: How do I require step-up authentication based on the token issue time (iat claim)?

Enforce token freshness by checking the iat (issued at) claim. If the token was issued more than one hour ago, return an advice requesting a new token. Different from auth_time - this checks token age, not authentication age.

ContX IQ PolicyContX IQ QueryStep-Up Authentication+4 more
View the resourceContX IQ
ContX IQ: How do I query external data sources via Data Resolver?ContX IQJson

ContX IQ: How do I query external data sources via Data Resolver?

Demonstrates fetching data from external systems (APIs, databases) during ContX IQ query execution. The External Data Resolver retrieves information not stored in the IKG, combining graph data with real-time external lookups.

ContX IQ PolicyContX IQ QueryExternal Data+4 more
View the resourceContX IQ
ContX IQ: Manage Node Property MetadataContX IQJson

ContX IQ: Manage Node Property Metadata

Add, update, and query metadata on node properties. Metadata provides additional context like timestamps, sources, confidence scores, or audit information for individual property values.

ContX IQ PolicyContX IQ QueryMetadata+3 more
View the resourceContX IQ
ContX IQ: Delete Node Properties and Relationship PropertiesContX IQJson

ContX IQ: Delete Node Properties and Relationship Properties

Demonstrates granular delete operations: delete entire nodes, specific properties from nodes, and specific properties from relationships. Useful for data cleanup, GDPR right-to-erasure, and selective data removal.

ContX IQ PolicyContX IQ QueryDelete Properties+3 more
View the resourceContX IQ
ContX IQ: Application as Service - How do I create a Person linked to multiple nodes?ContX IQJson

ContX IQ: Application as Service - How do I create a Person linked to multiple nodes?

Demonstrates service-to-service data creation where an Application (not a user) creates new Person nodes and links them to existing Country and Company nodes. Common pattern for system integrations and automated data pipelines.

ContX IQ PolicyContX IQ QueryService Account+3 more
View the resourceContX IQ
ContX IQ: How do I fetch all properties of a node with a wildcard?ContX IQJson

ContX IQ: How do I fetch all properties of a node with a wildcard?

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.

ContX IQ PolicyContX IQ QueryWildcard Properties+3 more
View the resourceContX IQ
ContX IQ: Which nodes are directly connected to a user?ContX IQJson

ContX IQ: Which nodes are directly connected to a user?

Query all nodes that have a direct relationship with a specified User node, regardless of relationship type or direction. Useful for user profile views, data export, or understanding a user's complete data footprint.

ContX IQ PolicyContX IQ QueryGraph Traversal+3 more
View the resourceContX IQ
ContX IQ: How do I filter data with the IN array operator and a user subject?ContX IQJson

ContX IQ: How do I filter data with the IN array operator and a user subject?

Query Contract nodes using the IN operator to filter by array values in policy conditions. Demonstrates how to check if a value exists within an array property during authorization.

ContX IQ PolicyContX IQ QueryContX IQ Execution+3 more
View the resourceContX IQ
ContX IQ: How do I aggregate data with WHERE, WITH and COUNT?ContX IQJson

ContX IQ: How do I aggregate data with WHERE, WITH and COUNT?

Demonstrates advanced Cypher query patterns including WHERE filtering, WITH for intermediate results, and COUNT for aggregation. Returns Person data with contract counts.

ContX IQ PolicyContX IQ QueryContX IQ Execution+4 more
View the resourceContX IQ
ContX IQ: Is this resource available? OPTIONAL MATCH and CASE expressionsContX IQJson

ContX IQ: Is this resource available? OPTIONAL MATCH and CASE expressions

Demonstrates OPTIONAL MATCH for pattern matching that doesn't fail when no match exists, combined with CASE expressions for conditional logic. Example: Check if a subdomain is available for registration.

ContX IQ PolicyContX IQ QueryContX IQ Execution+4 more
View the resourceContX IQ
ContX IQ: Paginated Query Execution with page_token and page_sizeContX IQJson

ContX IQ: Paginated Query Execution with page_token and page_size

Walk a large CIQ result set across multiple /contx-iq/v1/execute calls using the page_token and page_size request fields. Demonstrates client-side pagination of an authorized read query.

ContX IQ ExecutionPaginationpage_token+2 more
View the resourceContX IQ
ContX IQ: Resolve the Caller's IKG Subject with GET /contx-iq/v1/whoamiContX IQPython

ContX IQ: Resolve the Caller's IKG Subject with GET /contx-iq/v1/whoami

Ask IndyKite which IKG node an end-user token resolves to. GET /contx-iq/v1/whoami returns the subject type and external ID that Token Introspect derived from the bearer token - and nothing else - so a client can build subject-bound AuthZEN and CIQ requests without decoding the token itself.

ContX IQ ExecutionWhoAmIToken Introspect+2 more
View the resourceContX IQ
ContX IQ: Keep a Slow Condition on the Node-Type Indexes with condition.skip_resource_labelContX IQJson

ContX IQ: Keep a Slow Condition on the Node-Type Indexes with condition.skip_resource_label

A read policy whose condition is matched on the node type labels only: condition.skip_resource_label leaves out the :Resource system label the platform otherwise adds to every named node, so the query planner works from :Person, :Bus and :LicenseNumber alone. Same Knowledge Query, same results, different plan. The example captures a three-node graph, saves the policy and the query, executes as the owner, and shows the Cypher the platform derives with and without the flag.

ContX IQCIQ PolicyKnowledge Query+3 more
View the resourceContX IQ
ContX IQ v2: Write Values Read from the Graph with @ ReferencesContX IQJson

ContX IQ v2: Write Values Read from the Graph with @ References

A CIQ v2 (2.0-ciq) write: one Knowledge Query copies the caller's email and a licence number value onto the bus the caller owns, with @ references in its upsert values, so the client sends no values at all. The example captures a three-node graph, saves the 2.0-ciq policy and the query, executes as the owner, and reads the written values back in the same call.

ContX IQCIQ v22.0-ciq+4 more
View the resourceContX IQ
ContX IQ v2: Read a Whole Relationship with Its EndpointsContX IQJson

ContX IQ v2: Read a Whole Relationship with Its Endpoints

A CIQ v2 (2.0-ciq) read that returns a whole relationship: it comes back as its two endpoints, each with its external_id and type, and its properties. The example captures a three-node graph with a property on OWNS, saves the 2.0-ciq policy and the query, and executes as the owner.

ContX IQCIQ v22.0-ciq+3 more
View the resourceContX IQ

Token Introspect 2 resources

KBAC 10 resources

KBAC: Can this person act on that resource? Relationship-based authorization with the AuthZEN APIKBACPython

KBAC: Can this person act on that resource? Relationship-based authorization with the AuthZEN API

Create a Knowledge-Based Access Control (KBAC) policy and execute authZEN-compliant authorization queries. This example demonstrates evaluation (can X do Y to Z?) and search operations (who can? what can? which resources?).

KBAC PolicyauthZENAuthorization+5 more
View the resourceKBAC
KBAC: Batch Authorization with Multiple Evaluations (Boxcarring)KBACPython

KBAC: Batch Authorization with Multiple Evaluations (Boxcarring)

Evaluate multiple authorization decisions in a single API call using the authZEN Access Evaluations endpoint. This pattern, known as 'boxcarring', reduces network overhead when checking many permissions at once.

KBAC PolicyauthZENBatch Evaluation+3 more
View the resourceKBAC
KBAC: How do I return step-up authentication advice in an authorization response?KBACPython

KBAC: How do I return step-up authentication advice in an authorization response?

Demonstrates authZEN 'advice' - when authorization is denied due to insufficient authentication level, the response includes guidance on what authentication step-up is needed to gain access.

KBAC PolicyauthZENStep-Up Authentication+4 more
View the resourceKBAC
KBAC: How do I parameterize an authorization decision with input params (max_price)?KBACPython

KBAC: How do I parameterize an authorization decision with input params (max_price)?

Drive authZEN evaluation and resource-search decisions using runtime input_params. The policy condition compares a graph property against $max_price provided at execution time, so the same policy answers different shopping-budget questions per call.

KBAC PolicyauthZENInput Params+4 more
View the resourceKBAC
KBAC: What can one subject do across many resources? A permission grid with AuthZEN evaluations (boxcar)KBACJson

KBAC: What can one subject do across many resources? A permission grid with AuthZEN evaluations (boxcar)

Use the authZEN /access/v1/evaluations endpoint to check, in a single call, whether one subject is allowed across a grid of (resource, action) cells. The response returns one decision per cell, in order; the client keeps the cells whose decision is true.

KBAC PolicyauthZENEvaluations+4 more
View the resourceKBAC
KBAC: Token-Scope-Gated Read/Write PermissionsKBACJson

KBAC: Token-Scope-Gated Read/Write Permissions

Gate KBAC actions on the bearer token's scope claim. CAN_READ requires scope 'cars.read', CAN_WRITE requires scope 'cars.write'. The graph relationship grants the base capability; the token scope decides which verbs are exercisable on this request.

KBAC PolicyauthZENToken Scope+3 more
View the resourceKBAC
KBAC 3.0: Raw-Cypher Policies with CALL { } Subqueries and USE RoutingKBACJson

KBAC 3.0: Raw-Cypher Policies with CALL { } Subqueries and USE Routing

Author 3.0-kbac policies using the Cypher keywords that only this version accepts: USE graph.byName() database routing and CALL { } subqueries with inner RETURNs. The condition runs as raw Cypher - the platform only pins the subject/resource and appends the projection; the USE routing shown here targets a composite IKG.

KBAC Policy3.0-kbacRaw Cypher+4 more
View the resourceKBAC
KBAC 3.0: Data Residency - How do I route AuthZEN decisions by location?KBACJson

KBAC 3.0: Data Residency - How do I route AuthZEN decisions by location?

Route authorization decisions to a specific location of a composite IKG at request time. A 3.0-kbac policy declares USE graph.byName($region); each AuthZEN call supplies a logical location (an alias_mapping key) in context.input_params, and IndyKite translates it to the physical constituent database.

KBAC Policy3.0-kbacData Residency+4 more
View the resourceKBAC
KBAC: List the Active Authorization Policies of a Project with GET /access/v1/policiesKBACPython

KBAC: List the Active Authorization Policies of a Project with GET /access/v1/policies

Read the active KBAC policies of the calling application agent's project at runtime. GET /access/v1/policies returns each policy exactly as stored, inlined as a JSON object, together with its tags; the optional subject_type query parameter narrows the list to the policies written for one subject type. Requires the ReadAuthZConfigs API permission on the agent.

KBAC PolicyauthZENPolicy Listing+3 more
View the resourceKBAC
KBAC: Decide on a Delegation Chain with the X-IK-Token Header and $ik_token ClaimsKBACBash

KBAC: Decide on a Delegation Chain with the X-IK-Token Header and $ik_token Claims

Let a policy decide not only who the user is but through which agent the user is acting: a delegation token in X-IK-Token, minted by the IndyKite Token Service with an RFC 8693 exchange, is bound as $ik_token in the policy, next to the user token's claims as $token. The example grants CAN_SHARE on a managed document only when the call comes through the knightrider agent, shows the decision flip to false without the delegation token, proves that input_params cannot impersonate either token, and lists the 401 and 422 the platform returns for a mismatched subject and a mistyped prefix.

KBAC PolicyauthZENDelegation+4 more
View the resourceKBAC

Outbound Events 4 resources

TrustScore 2 resources

Environment 3 resources

Capture 1 resource

Data Schema 1 resource

External Data Resolver 2 resources

MCP 2 resources

Audit Signing 1 resource

Audit Log 1 resource