Current generated contract

Content Alpha API contract

This static customer contract is deterministically generated from the tracked serviceDescriptor() source for the pending implementation. Its complete table contains 45 descriptor entries and all 47 method/path operations, including compatibility aliases. A production deployment may lag these tracked bytes; its own descriptor and the implementation evidence summary are the deployment truth.

Current test_spec create and list contract

List: GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items?content_kind=test_spec.

Write: POST /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items with Bearer authorization, Content-Type: application/json, and Idempotency-Key. Set content_kind to test_spec; Content derives assessment_role=spec.

Seven required blueprint fields: kc_coverage, item_type_mix, difficulty_constraints, passing_rule, min_forms, max_item_overlap, enemy_item_rule.

Read: GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/blueprint. The POST response's native content_id is the GET response's spec_id. AlphaTest stores no shadow blueprint row.

{
  "content_kind": "test_spec",
  "title": "Grade 7 equations mastery blueprint",
  "language": "en-US",
  "subject_id": "math",
  "target_grade_id": "7",
  "expected_xp": 0,
  "kc_coverage": {
    "case:math:7.ee.b.4": {
      "dok1": 2,
      "dok2": 4
    }
  },
  "item_type_mix": {
    "multiple_choice": 4,
    "numeric_entry": 2
  },
  "difficulty_constraints": {
    "target_mastery_probability": 0.9
  },
  "passing_rule": {
    "policy_ref": "alpha.policy.mastery_cutoff",
    "false_pass_cost": "higher"
  },
  "min_forms": 5,
  "max_item_overlap": 0.2,
  "enemy_item_rule": {
    "no_two_items_on_same_kc_in_one_form": true
  },
  "status": "draft"
}

The Content identity, assessment_role=spec compatibility row, complete seven-field sidecar, initial version, and completed idempotency response commit in one transaction. An identical completed replay returns the same content_id; a changed-body replay returns 409 content.idempotency_conflict.

Assessment publication and trust contract

Integrator authority: An app integrator may invoke the governed paths directly with a Platform-issued tenant-scoped credential. Ordinary publication does not require a per-course owner ruling or a #1769-class trust grant.

Route by artifact kind: Import QTI assessmentItem resources as question and QTI assessmentTest resources as content_kind=test, assessment_role=form through the QTI package endpoint. Author test_spec, test_bank, and article/video as drafts through the Alpha item/version/graph endpoints, then publish each exact immutable version through the governed publication endpoint. Video first uses the narrow first-party Incept media handoff and exact-version interactive_video composition. The generic publish endpoint intentionally does not accept question or form artifacts. The auth asymmetry is deliberate: Content semantically parses and receipts standardized QTI package materialization, while authored graphs, article bodies, and videos require the stronger publisher role and automatic kind-owned QC.

QTI question/form import: POST /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/imports/qti-package. Platform-issued tenant-scoped Bearer JWT with author:content; send application/zip and Idempotency-Key. A successful import materializes the returned exact QTI versions as published and trusted with Content-owned receipts.

test_spec/test_bank/article/video publication: POST /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/publish. Platform-issued tenant-scoped Bearer JWT with publish:content and a service, reviewer, or operator role; send Idempotency-Key and body {"content_version_id":"{contentVersionId}"}.

Trust readback: GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/trust.

Exact-version eligibility readback: GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/versions/{contentVersionId}/release-eligibility?producer_surface={producerSurface}. Require the exact version readback to return matching content_id/content_version_id, trust_status trusted or degraded, serveable=true, release_eligible=true, and problem_code=null. release_eligible is exactly serveable; producer_surface is query-only compatibility, not caller evidence.

Trust boundary: Never POST or PATCH trust_status, a verdict, or an evidence URL. Content computes trust and the exact-version QC receipt. A later version cannot inherit an earlier receipt.

Failure and turnaround: Authorized import/publication is synchronous. A failed QC check changes no lifecycle, trust, graph, receipt, or fresh idempotency claim; correct the graph and retry with a new key. If the integrator token lacks the documented role/scope, request that narrow tenant credential through Platform credential onboarding; the repository defines no credential-provisioning SLA and there is no content-by-content owner approval queue.

Complete operation catalog

Paths are root-absolute and can be called exactly as printed only on a deployment whose served descriptor matches this tracked revision.

MethodPathContract
POST /content/alpha/implementation/api/dev/mint?tenantId=demo endpoint-mint-demo-token
Mint a public demo JWT scoped to tenantId=demo. Auth: none. Response: demo_token.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items endpoint-list-content-items
List student-touchable Content items with typed filters, catalog facet filters, and cursor paging. Auth: role:service|demo|operator. Filters: content_kind, subtype, dok, assessment_role, subject_id, alpha_subject_id, target_grade_id, curriculum_node_id, usage_scope, test_type, is_mastery_gate, source_system, source_record_id, source_activity_ref, facet, modifiedSince, subject, grade_band, language, accessibility_profile, rights_license, provenance, quality_rating, kc_refs, standards_framework_refs, expected_xp_band, modality. Response: page<content_item>.
POST /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items endpoint-create-content-item
Create a non-QTI Content item; content_kind=test_spec atomically creates the complete seven-field blueprint sidecar and returns its native content_id. Auth: author:content. test_spec fields: kc_coverage, item_type_mix, difficulty_constraints, passing_rule, min_forms, max_item_overlap, enemy_item_rule. Response: content_item.
POST /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/imports/timeback-production endpoint-import-timeback-production
Accept source-shaped TimeBack production content rows and normalize them server-side into flat Content assets. Auth: author:content. Response: timeback_production_import.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId} endpoint-get-content-item
Read one Content item and its ETag. Auth: role:service|demo|operator. Response: content_item.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/blueprint endpoint-get-test-spec-blueprint
Read the first-class test_spec blueprint sidecar. Auth: read:content. Response: test_spec.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/bank-members endpoint-list-test-bank-members
List test-bank forms with exact-form-version question-level canonical KC attribution and explicit readiness counts. Auth: read:content. Response: test_bank_members.
PATCH /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId} endpoint-update-content-item
Update editable Content metadata using If-Match. Auth: author:content. Response: content_item.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/versions endpoint-list-content-versions
List append-only exact versions for one Content item, including immutable TimeBack source revisions and deployed legacy v1 history. Auth: read:content. Response: page<content_version>.
POST /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/versions endpoint-create-content-version
Create an append-only student-view or authoring version; article bodies use student_view.blocks, while question canonical_xml atomically regenerates that version's QTI choices, answer slots, answer keys, and scoring projection. Auth: author:content. Response: content_version.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/versions/{versionId} endpoint-get-content-version
Read one immutable Content exact version, including historical TimeBack source revisions. Auth: read:content. Response: content_version.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/versions/{versionId}/release-eligibility endpoint-get-release-eligibility
Read Content's current fail-closed exact-version release answer for one governed producer surface. Auth: read:content. Filters: producer_surface. Response: content_release_eligibility or typed Content Problem.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/versions/{versionId}/test-serve-eligibility endpoint-get-test-serve-eligibility
Check the separately governed demo/test-cohort authority for one exact draft or untrusted bank/form version without changing ordinary release eligibility. Auth: read:content. Filters: producer_surface, test_identity_id. Response: content_test_serve_eligibility or typed Content Problem.
POST /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/test-serve-authorizations endpoint-authorize-test-serve
Atomically revalidate one exact draft bank-to-form selection and append its immutable test-serve audit receipt. Auth: read:content. Response: content_test_serve_authorization.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/student-view endpoint-get-student-view
Read the blank student-safe projection for the latest version or an immutable exact version_id; answer keys require includeAnswerKeys=true plus read:answer_key. Auth: read:content. Filters: version_id, includeAnswerKeys. Response: student_view.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/answer-slots endpoint-list-answer-slots
List blank answer slots for the latest effective grading version or an exact version_id, optionally with scoped answer keys. Auth: read:content. Filters: includeAnswerKeys, version_id. Response: page<answer_slot>.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/answer-keys endpoint-list-answer-keys
List teacher-only answer keys for the latest effective grading version or an exact version_id. Requires read:answer_key and delegates to the QTI answer-key view; string text-entry keys stay in correct_response.values. Auth: read:answer_key. Filters: version_id. Response: page<answer_key>.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/assessment-components endpoint-list-assessment-components
List first-class QTI structure for the latest effective grading version or an exact version_id, including choice/text-entry/extended-text part rows, question refs, distractors, rubrics, and preauthored feedback. Auth: read:content. Filters: component_role, version_id. Response: page<assessment_component>.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/interactive-composition endpoint-get-interactive-composition
Read Content-owned typed interactive article/video composition without parsing tb-* HTML. Auth: read:content. Response: interactive_composition.
PUT /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/interactive-composition endpoint-set-interactive-composition
Replace ordered article segment/question bindings or video cue/question bindings for one Content object. Auth: author:content. Response: interactive_composition.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/scoring-plan endpoint-get-scoring-plan
Read QTI scoring-plan provenance for the latest effective grading version or an exact version_id. Auth: read:content. Filters: version_id. Response: page<scoring_plan>.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/media endpoint-list-media
List first-party media assets attached to one Content item. Auth: read:content. Filters: limit, cursor. Response: page<media_asset>.
POST /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/media endpoint-attach-media
Attach media; primary Incept video uses the closed fetch-once source_asset contract and returns an authenticated first-party delivery_url. Auth: author:content. Response: media_asset.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentLocator}/media/{mediaLocator} endpoint-deliver-media
Fetch bytes for a media_asset.delivery_url value. Auth: read:content. Response: media bytes.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/references endpoint-list-content-references
List uniform references from one Content asset to other Content assets; Content references never nest payloads. Auth: read:content. Response: page<content_reference>.
POST /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/references endpoint-create-content-reference
Create a typed reference from one Content asset to another Content asset. Auth: author:content. Response: content_reference.
DELETE /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/references/{referenceId} endpoint-retire-content-reference
Soft-retire a Content-to-Content reference without deleting the retained audit row. Auth: author:content. Response: content_reference.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/kc-tags endpoint-list-kc-tags
List canonical weighted links from one Content item to governed registry KCs. Auth: read:content. Response: page<content_kc_tag>.
POST /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/kc-tags endpoint-upsert-kc-tag
Create or replace a weighted Content-to-registry-KC relationship. Auth: link:kc. Response: content_kc_tag.
DELETE /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/kc-tags/{kcId} endpoint-retire-kc-tag
Soft-retire one weighted Content-to-registry-KC relationship while retaining its evidence. Auth: link:kc. Response: content_kc_tag.
POST /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/exports/common-cartridge endpoint-export-common-cartridge
Generate a transport-only Common Cartridge or IMSCP package from Curriculum plus Content references. Auth: read:content. Response: common_cartridge_export.
POST /content/alpha/implementation/api/tenants/{tenantId}/alpha/exports/common-cartridge endpoint-export-common-cartridge
Compatibility alias of /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/exports/common-cartridge. Generate a transport-only Common Cartridge or IMSCP package from Curriculum plus Content references. Auth: read:content. Response: common_cartridge_export.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/exports/common-cartridge/{exportId}/download endpoint-download-common-cartridge
Download generated Common Cartridge transport bytes. Auth: read:content. Response: imscc bytes.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/exports/common-cartridge/{exportId}/download endpoint-download-common-cartridge
Compatibility alias of /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/exports/common-cartridge/{exportId}/download. Download generated Common Cartridge transport bytes. Auth: read:content. Response: imscc bytes.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/catalog-facets endpoint-list-catalog-facets
List the twelve named governed catalog discovery facets. Auth: read:content. Response: page<content_catalog_facet>.
POST /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/catalog-facets endpoint-create-catalog-facet
Create one of the twelve named governed catalog discovery facets in an unseeded tenant. Auth: author:content. Response: content_catalog_facet.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/catalog-facets endpoint-list-catalog-facet-assignments
List sidecar catalog facet assignments for a Content item. Auth: read:content. Response: page<content_catalog_facet_assignment>.
POST /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/catalog-facets endpoint-create-catalog-facet-assignment
Assign a governed sidecar catalog facet value. Auth: author:content. Response: content_catalog_facet_assignment.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/effectiveness endpoint-get-effectiveness
Read derived content-effectiveness rollup; apps do not increment it. Auth: read:content. Response: content_effectiveness.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/trust endpoint-get-trust
Read safe trust and validation evidence. Auth: read:content. Response: content_trust_evidence.
POST /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/items/{contentId}/publish endpoint-publish-content
Publish one exact immutable test_spec, test_bank, article, or verified interactive video after server-owned kind checks; callers cannot set trust. Auth: publish:content plus service, reviewer, or operator role. Response: content_publication.
POST /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/imports/qti-package endpoint-import-qti-package
Import QTI package bytes through the approved QTI-backed path, materializing assessment items as questions, assessment tests as test forms, scoped answer keys/components, and referenced assessmentStimulus question anatomy. Auth: author:content. Response: qti_import.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/trust-status endpoint-get-trust-status
List trust evidence rows by trust_status. Auth: read:content. Response: page<content_trust_evidence>.
GET /content/alpha/implementation/api/tenants/{tenantId}/alpha/content/policies endpoint-list-policies
List provisioned tenant policy rows. This read projection is not the runtime authority for the bundled source-adapter policy. Auth: read:content. Response: page<content_policy>.