What is the difference between Draft API and Content API
Question
What is the difference in function of Draft API and Content API, and how should they be used?
Answer
The Draft API and Content API in Arc XP serve distinct roles and are optimized for difference use cases. The Draft API focuses on internal editorial operations and content management workflows, while the Content API is tailored for delivering reader-facing data with rich filtering and query capabilities.
Draft API
The Draft API powers content creation within Arc XP and is the foundational service behind tools like Composer and Migration Center. It standardizes publishing workflows by providing core document save and publish operations.
The Draft API is designed for editorial operations to manage content within Arc XP and handle its display. Its capabilities include:
Document Management - creating, editing, publishing, unpublishing, and reverting documents and revisions
Circulation - accessing and updating document circulations
Redirect Management - viewing, creating, updating, and removing document redirects
URL Format Rules - viewing, editing, and creating URL format rules
Lock Management - handling document locks
Content API
The Content API is the preferred mechanism for querying reader-facing data in Arc XP and is optimized for performance. It provides a "denormalized" view of documents created in Arc XP applications, combining related metadata into a single resource. For example, a story saved in Composer includes metadata for all embedded photos from Photo Center when viewed in the Content API.
Key features of the Content API include:
Fetch - retrieving Arc XP content by URL and ID
Search - querying and scanning for Arc XP documents
Related Content - fetching content related to a specific document
Tags - querying content tag usage within Arc XP
Additionally, the Content API supports parameterized filtering, enabling precise data retrieval, such as fetching the top 20 most recently published stories tagged "news". However, it is not designed to replace site search functionality.