Reference
Complete API, package, and configuration reference for DCS integration.
NPM Packages
Official packages for DCS integration:
| Package | Description |
|---|---|
| @duffcloudservices/cms | Vue 3 composables and Vite plugins |
| @duffcloudservices/cli | CLI for site onboarding and configuration |
Hosting & Deployment
- Blob Static Hosting — Azure Storage static website architecture
- Visual Editor Annotations — HTML attributes for page editor
API Reference
Text Content API
Public API for fetching text overrides.
- Text Content API — Fetch and manage text overrides
Configuration Files
Reference for all DCS configuration files.
- DCS Configuration —
.dcs/config.yamlschema - Site Configuration —
.dcs/site.yamlschema - Pages Configuration —
.dcs/pages.yamlschema - Content Configuration —
.dcs/content.yamlschema (portal-managed) - SEO Configuration —
.dcs/seo.yamlschema (portal-managed)
Quick Links
| Resource | Description |
|---|---|
| Text Content API | Fetch text overrides |
| DCS Config | Main configuration file |
| site.yaml | Site identity configuration |
| Blob Static Hosting | Azure blob hosting architecture |
| Visual Editor | Page editor HTML annotations |
| pages.yaml | Page definitions |
| content.yaml | Text content overrides |
| seo.yaml | SEO metadata configuration |
Environment Variables
Frontend (Vite)
| Variable | Required | Description |
|---|---|---|
VITE_DCS_API | Yes | DCS API endpoint |
VITE_SITE_ID | Yes | Site identifier |
VITE_ANALYTICS_ID | No | Analytics tracking ID |
Build
| Variable | Required | Description |
|---|---|---|
NODE_ENV | No | Environment mode |
VITE_BUILD_MODE | No | Production/development |
File Structure
.dcs/
├── config.yaml # Main configuration (optional)
├── site.yaml # Site identity
├── pages.yaml # Page definitions
├── content.yaml # Text content (portal-managed)
└── seo.yaml # SEO metadata (portal-managed)Editor Schema Support
DCS provides JSON schemas for all configuration files, enabling autocompletion and validation in VS Code and other editors.
VS Code Setup
Add to your workspace .vscode/settings.json:
json
{
"yaml.schemas": {
"https://schema.duffcloudservices.com/1.0.0/site.json": "/.dcs/site.yaml",
"https://schema.duffcloudservices.com/1.0.0/pages.json": "/.dcs/pages.yaml",
"https://schema.duffcloudservices.com/1.0.0/content.json": "/.dcs/content.yaml",
"https://schema.duffcloudservices.com/1.0.0/seo.json": "/.dcs/seo.yaml"
}
}TIP
The YAML extension by Red Hat is required for schema validation.
Status Codes
Success
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 204 | No Content |
| 304 | Not Modified |
Client Errors
| Code | Meaning |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Rate Limited |
Server Errors
| Code | Meaning |
|---|---|
| 500 | Server Error |
| 503 | Service Unavailable |
