Data Machine REST API
Complete REST API reference for Data Machine
Overview
Base URL: /wp-json/datamachine/v1/
Authentication: WordPress application password or cookie authentication
Permissions: Most endpoints require manage_options capability
Implementation: All endpoints are implemented in data-machine/inc/Api/. The project is migrating business logic to the WordPress 6.9 Abilities API; REST handlers should prefer calling abilities (via wp_get_ability() / wp_ability_execute) where available. Service managers may still be instantiated as a transitional implementation during migration.
Endpoint Categories
Workflow Execution
- Execute: Trigger flows and ephemeral workflows
- Scheduling Intervals: Available scheduling intervals and configuration
Pipeline & Flow Management
Content & Data
AI & Chat
Configuration
Monitoring
Common Patterns
Authentication
Data Machine supports two authentication methods:
- Application Password (Recommended for external integrations)
- Cookie Authentication (WordPress admin sessions)
See Authentication.
Error Handling
All endpoints return standardized error responses following WordPress REST API conventions. Common error codes include:
rest_forbidden(403) – Insufficient permissionsrest_invalid_param(400) – Invalid parameters- Resource-specific errors (404, 500)
See Error Handling Reference for complete error code documentation.
Pagination
Endpoints returning lists support pagination parameters:
per_page– Number of items per pageoffsetorpage– Pagination offset
Implementation Guide
All endpoints are implemented in data-machine/inc/Api/ using the services layer architecture for direct method calls, with automatic registration via rest_api_init:
// Example endpoint registration using services layer
register_rest_route('datamachine/v1', '/pipelines', [
'methods' => 'GET',
'callback' => [Pipelines::class, 'get_pipelines'],
'permission_callback' => [Pipelines::class, 'check_permission']
]);
// Abilities API usage in endpoint callbacks
public function create_pipeline($request) {
$ability = wp_get_ability( 'datamachine/create-pipeline' );
return $ability->execute( [
'pipeline_name' => $request['name'],
'options' => $request['options'] ?? [],
] );
}For detailed implementation patterns, see the Development section for hooks and extension guides.
Related Documentation
- Authentication
- Errors
- Engine Execution
- Settings
- Development Guides – Extension development and hooks
API Version: v1 Last Updated: 2026-01-18