Test Data API: approved test data for code, pipelines and AI agents
Administrators approve versioned profiles once. Developers, CI/CD jobs and agents then request repeatable datasets within those bounds — and always release them.
How it fits together
Text description
- Human and machine consumers: Human console → YAML / JSON profiles (schema-validated) → Developer CLI → Python / TypeScript SDK
Connection: Same API for every consumer
- Automation: GitHub / GitLab / Jenkins → Azure DevOps / CircleCI / Blacksmith → QA frameworks → AI coding & QA agents (MCP)
Connection: Metadata-only requests (no rows, no credentials)
- Versioned REST / OpenAPI (DataNivra Cloud): AuthN / AuthZ / tenant isolation → Conditional approval / human review → Idempotency / quotas / cost / audit → Profile versions / certification gates
Connection: Signed outbound agent lease — The agent connects out; raw data and target credentials never transit SaaS.
- Customer-resident data plane (Your environment): Approved sources → Discover, subset, mask, synthesize → Validate & certify → Approved target
Connection: Tests run in your network
- Your test run: Authorized tests reach the target → Release / TTL / cleanup / evidence
Examples in every format
# yaml-language-server: $schema=../schemas/test-data-profile.schema.json
apiVersion: datanivra.io/v1alpha1
kind: TestDataProfile
metadata:
name: healthcare-integration
description: Masked patients with synthetic appointments for integration tests
spec:
fulfilment: BUILD_DATASET
build:
business_domain: patient appointments
pack_id: healthcare
dataset_kind: HYBRID
source_ids: [00000000-0000-4000-8000-000000000011] # approved PostgreSQL source (synthetic id)
subset:
id: 00000000-0000-4000-8000-000000000021
name: patients-with-appointments
root_entity: {schema_name: clinic, table_name: patients}
strategy: FIXED_COUNT
fixed_count: 500 # relationships are preserved by closure
masking_policy:
policy_id: 00000000-0000-4000-8000-000000000031
kind: MASKING
version: 3
checksum: 2c9f7a1e0b8d6c4f3e2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e
target_environment_id: 00000000-0000-4000-8000-000000000041 # the approved QA target
retention_days: 1
max_total_records: 2500
scenarios: # real healthcare-pack scenarios
- {pack_id: healthcare, scenario_code: HC_ROUTINE_CARE, kind: NORMAL, default_count: 500, max_count: 500}
- {pack_id: healthcare, scenario_code: HC_CHRONIC_CARE, kind: HIGH_VOLUME, default_count: 2000, max_count: 2000}
automation: # used only if automatic approval is enabled
workload_identity_ids: [00000000-0000-4000-8000-0000000000a1]
max_live_requests: 10
escalate_out_of_envelope: true
audit_tags: [HEALTHCARE_CI]
Created as a draft version and approved by a second person who confirms its checksum.
Ids, checksums, tenant names and URLs are synthetic placeholders.
Conditional automatic approval
People define and approve policies in advance. A qualifying workload identity — for example the customer’s trusted GitHub Actions workload identity for one repository — may then invoke the approved healthcare-integration profile only within a bounded envelope:
- at most 500 patients and 2,000 appointments per request
- masking policy version 3, pinned by checksum in the approved profile
- only the approved QA target (no target can be named in a request)
- a lease of at most two hours (lease profile over the certified version)
AUTO_APPROVEDInside the envelope, the identity is named by the profile, quotas are not exceeded, and both the operator and the tenant enabled automatic approval.
1,500 synthetic appointments, or a 1-hour lease of the certified version → provisioned, recorded as approved by the profile’s approver.
PENDING_HUMAN_APPROVALInside the profile’s own bounds but outside the automation envelope — or automatic approval is switched off.
A 3-hour lease when the envelope allows 2 hours → waits for a person who is not the requester.
DENIEDOutside the profile, an identity the profile does not name, a revoked or unpinned profile version, or a quota is exceeded.
2,500 appointments (above the profile maximum), another repository’s identity, or any attempt to name a target → refused with reason codes; nothing is created.
Preview, off by default. Automatic approval needs the DataNivra operator’s switch and your tenant administrator’s switch; until then every workload request waits for a person. Preapproval is not carte blanche: profiles, sources, target references, masking policies, quotas, identity, revocation and certification are enforced by the server and by your agent, and no CI runner or AI model can approve its own request or widen its envelope.
The CI lifecycle
Text description
- CI pipeline: Pull request → Authenticate → Pin profile version → Run tests → Release (always)
Connection: Metadata-only API calls
- DataNivra Cloud: Decision: approve / wait / deny → Lease with TTL → Evidence & audit
Connection: Signed outbound agent lease
- Your environment: Isolated copy of a certified version → Approved target → Teardown confirmed
- Pull request. A pipeline starts on the customer’s runner.
- Authenticate. The job exchanges its own short-lived CI OIDC token for a workload session (or uses a user session).
- Pin the profile. The manifest names an approved profile version and its checksum.
- Decide. The control plane checks bounds, identity, quotas and switches: approved, waiting for a person, or denied.
- Lease or build. The customer-resident agent hydrates an isolated copy of a certified version, or builds and certifies a new dataset.
- Run tests. Tests reach the approved target from the customer’s network; credentials never pass through DataNivra.
- Release. Always run on success, failure or cancel; TTL expiry cleans up a runner that died.
- Evidence. Value-free lease evidence and audit events record what happened.
Who uses it
| Consumer | Value | Demonstration |
|---|---|---|
| Human developers | Request realistic datasets with a YAML/JSON manifest, the CLI, Python or TypeScript. | Local setup: request → wait → test → release. |
| QA engineers / SDETs | Reproducible, DataNivra-certified datasets for regression, integration, performance, negative and edge-case tests. | Pytest, Playwright, JUnit and Cypress examples in the example gallery. |
| GitHub Actions and GitLab CI | Acquire approved test data for each pull or merge request and release it afterwards. | Pipeline YAML in the repository; CI workload identity must be enabled first. |
| Jenkins, Azure DevOps, CircleCI, Blacksmith and other compatible runners | The same standard API and CLI through thin, illustrative recipes — no vendor-specific engine. | Generic runner recipe plus illustrative provider examples. |
| Autonomous QA agents | Discover approved profiles, request data, poll and release through bounded tools. | Local MCP adapter (Preview) with permission-denied, needs-approval and approved flows. |
| AI coding agents | Obtain a reproducible, approved test environment to validate generated code. | An agent requests a pre-approved regression profile pinned by version and checksum. |
| Enterprise data / TDM teams | Keep managing sources, classification, policies, subsetting, masking, certification, refresh, approvals and audit in the console. | The existing TDM console walkthrough and synthetic playground. |
| Healthcare, banking, insurance, retail, SaaS, manufacturing and other sectors | Domain policy constraints and synthetic scenarios for automated testing. | Fully synthetic industry examples; no compliance assurances are implied. |
CI/CD platforms and runners
| Runner or platform | Status | Repository path |
|---|---|---|
| GitHub Actions | Examples in the repository; workload identity requires enablement | examples/integrations/github-actions |
| GitLab CI | Examples in the repository; workload identity requires enablement | examples/integrations/gitlab-ci |
| Jenkins | Compatible via the standard API/CLI — illustrative example | examples/integrations/jenkins |
| Azure DevOps | Compatible via the standard API/CLI — illustrative example | examples/integrations/azure-devops |
| CircleCI | Compatible via the standard API/CLI — illustrative example | examples/integrations/circleci |
| Generic shell (curl / CLI) | Compatible via the standard API/CLI — illustrative example | examples/integrations/generic-shell |
| Blacksmith | GitHub Actions-compatible runner example, illustrative; no partnership | examples/integrations/blacksmith |
| Self-hosted runners and ephemeral Kubernetes | Illustrative examples; the runner must reach the approved target | examples/integrations/self-hosted-runner |
Status
| Capability | Status | Details |
|---|---|---|
| TDM console, agent, connectors and industry packs | Available | The existing TDM product: discovery, subsetting, masking, synthesis, certification and provisioning. |
| Test-data profiles, plan, request, wait and release (REST, CLI) | In repository | Implemented and tested in the repository; not yet deployed to the hosted service. |
| YAML/JSON manifests (TestDataProfile, TestDataRequest) | In repository | Safe parser, strict validation and canonical checksums in the CLI and both SDKs. |
| Python and TypeScript SDK helpers | Not published | Not yet published to PyPI or npm; install from the repository or release assets. |
| CI workload identity (GitHub Actions, GitLab CI OIDC) | Off by default | Implemented and tested; a deployment must enable it before any pipeline can sign in. |
| Automatic approval inside a human-approved envelope | Off by default | Preview: needs the operator switch and the tenant switch; otherwise a person approves. |
| MCP adapter for AI agents | Local only | Preview: a local stdio adapter that calls the same API with your own session; no hosted MCP endpoint. |
Questions and limitations
- Is DataNivra still a Test Data Management system?
- Yes. The console, agent, connectors, policies, certification and industry packs stay the product. The Test Data API is a second way to use the same customer-resident engine.
- Does DataNivra run our tests?
- No. Your QA tools and runners execute tests. DataNivra prepares and governs the data and the approved targets those tests use.
- Can a pipeline or AI agent give itself access?
- No. People define and approve profiles and envelopes with separation of duties; a request can only choose within an approved profile, and the server enforces it.
- Do production rows or database credentials reach CI logs or DataNivra Cloud?
- No. Row-level work runs in your network, targets are secret references resolved by your agent, and API responses carry metadata only.
- Can any hosted runner reach our databases?
- Not by default. Tests must run on a runner that can reach the approved target, such as a self-hosted or network-connected runner.
- Are the SDKs on npm and PyPI?
- Not yet. They are not yet published; install from the repository or release assets.
Test Data API overview · Profiles and manifests · CI workload identity · Automatic approval · CI recipes · MCP adapter · Troubleshooting