FAQ问
How do I use the xaicms API?
FAQ答
<p>Follow these steps to use the xaicms API:</p><ol><li>Confirm the site's <code>XAICMS_BASE_URL</code> and obtain a <code>CMS_MANAGER_TOKEN</code> from an administrator.</li><li>Store the token in a local environment variable or secret manager; never put it in chat, frontend code, or source files.</li><li>Send <code>Authorization: Bearer <CMS_MANAGER_TOKEN></code> and <code>Accept: application/json</code> with every request.</li><li>Start with <code>GET {XAICMS_BASE_URL}/api/cms-manager/v1/health</code> to verify the connection.</li><li>Use the categories, posts, page templates, and single pages endpoints to manage content. Read the required category or template before creating content.</li><li>Create posts as <code>draft</code> by default. Verify the target and obtain explicit approval before publishing, updating, or deleting.</li></ol><p>Common status codes: <code>400</code> invalid input, <code>401</code> authentication failure, <code>403</code> permission restriction, <code>404</code> resource not found, and <code>503</code> service not configured.</p>