Skip to content

Export an Answer for Reuse

Before you begin

Audience: Technical writer, content strategist, API consumer

You need the answer_id of the answer you want to export. Retrieve it from a search result, a readout, or by browsing the registry. The answer must be in APPROVED status — export is not available for answers in draft, disputed, or retired states.

Two export formats are available. Choose the format that matches your downstream use:

Format Content-Type Best for
markdown text/markdown Documentation, human-readable sharing, CMS paste-in
jsonld application/ld+json Semantic publishing pipelines, LLM context injection, knowledge graph population, CMS API import

Steps

1. Export as Markdown

curl -s "http://localhost:8000/v1/retrieval/answers/ans-2a3b4c5d/export?format=markdown" \
  -o answer-ans-2a3b4c5d.md

The response includes a Content-Disposition: attachment header with a suggested filename. If you prefer to capture the filename from the header automatically:

curl -s -OJ "http://localhost:8000/v1/retrieval/answers/ans-2a3b4c5d/export?format=markdown"

Markdown export structure:

# [FACT] Integration Settings — Maximum Webhook Payload

**Horn type:** fact
**Grammar subject:** v3 API webhook delivery
**Review due:** 2026-12-01

## Answer

The maximum payload size for a webhook delivery in the v3 API is 5 MB.
Payloads exceeding this limit are rejected with HTTP 413.

## Assertion Grammar

- **Subject:** v3 API webhook delivery
- **Predicate:** has_maximum_payload_size
- **Object:** 5 MB

## Provenance

- **Validation record:** val-rec-1c2d3e4f
- **Evidence:** https://confluence.example.com/wiki/spaces/APIDOCS/pages/123456
- **Evidence:** https://jira.example.com/browse/API-8812
- **Published:** 2026-05-20T10:14:00Z
- **Version:** 3

2. Export as JSON-LD

curl -s "http://localhost:8000/v1/retrieval/answers/ans-2a3b4c5d/export?format=jsonld" \
  -o answer-ans-2a3b4c5d.jsonld

JSON-LD export structure:

{
  "@context": {
    "@vocab": "https://schema.org/",
    "raw_to_knowledge": "https://raw-to-knowledge.example/vocab#"
  },
  "@type": "raw_to_knowledge:ApprovedAnswer",
  "@id": "https://raw-to-knowledge.example/answers/ans-2a3b4c5d",
  "identifier": "ans-2a3b4c5d",
  "raw_to_knowledge:hornType": "fact",
  "raw_to_knowledge:assertionSubtype": "quantitative_constraint",
  "name": "Maximum Webhook Payload — v3 API",
  "text": "The maximum payload size for a webhook delivery in the v3 API is 5 MB. Payloads exceeding this limit are rejected with HTTP 413.",
  "raw_to_knowledge:grammarSubject": "v3 API webhook delivery",
  "raw_to_knowledge:grammarPredicate": "has_maximum_payload_size",
  "raw_to_knowledge:grammarObject": "5 MB",
  "raw_to_knowledge:customerScope": "acme-corp",
  "raw_to_knowledge:validationRecordId": "val-rec-1c2d3e4f",
  "raw_to_knowledge:version": 3,
  "raw_to_knowledge:reviewDue": "2026-12-01",
  "dateCreated": "2026-05-20T10:14:00Z",
  "subjectOf": [
    {
      "@type": "CreativeWork",
      "url": "https://confluence.example.com/wiki/spaces/APIDOCS/pages/123456",
      "name": "Webhook Configuration Guide — v3"
    },
    {
      "@type": "CreativeWork",
      "url": "https://jira.example.com/browse/API-8812",
      "name": "Increase webhook payload limit to 5 MB"
    }
  ]
}

Note: JSON-LD uses the raw_to_knowledge: namespace at https://raw-to-knowledge.example/vocab#. Consuming systems should dereference the context document or map raw_to_knowledge: terms to their own ontology before importing. Do not assume raw_to_knowledge: terms are natively understood by generic JSON-LD processors.

The subjectOf URLs in JSON-LD (and the Evidence lines in Markdown) are the raw URIs captured when the answer was published into the registry. They point to Confluence pages and Jira tickets as they existed at publication time.

Before embedding these links in downstream documents or content systems:

  1. Open each URL and confirm the page or ticket is still accessible.
  2. Confirm the content at the URL still matches the evidence cited in the answer.
  3. If a page has moved, been archived, or significantly changed, flag the answer for review before reusing it.

Note: Evidence links are frozen at publication time. A Confluence page that has been restructured or deleted since the answer was published will produce a broken link in the export. Check the review_due date — if the answer is past its review cycle, the evidence is more likely to be stale.

4. Handle versioned answers

The export endpoint returns the latest APPROVED version by default. If you need a specific historical version, retrieve the answer_id of that version from the supersession chain first:

curl -s http://localhost:8000/v1/graph/answers/ans-2a3b4c5d/supersessions

Then export the specific version using its answer_id:

curl -s "http://localhost:8000/v1/retrieval/answers/ans-0z9y8x7w/export?format=jsonld" \
  -o answer-v2-ans-0z9y8x7w.jsonld

Note: Export reflects the answer state at the time of the request. The raw_to_knowledge:version field in the JSON-LD and the Version line in Markdown tell you which version of the answer is contained in the file. Archive the export file if you need a point-in-time record, as the registry may be updated in a future review cycle.


Result

You have a well-structured document suitable for documentation, content operations, or system integration. The Markdown format is ready for human review and direct embedding in documentation platforms. The JSON-LD format is ready for ingestion into semantic publishing pipelines, knowledge graphs, or as structured context for LLM-augmented applications.