Control Ingestion
Data source ingestion can be controlled through various API endpoints that allow you to start, stop, and manage data collection processes. These controls provide immediate management of data ingestion while maintaining scheduled operations and configuration integrity.
Activate and Pause Source
Data sources can be activated to start immediate data ingestion or paused to stop ongoing collection. These controls work alongside scheduled ingestion to provide flexible data collection management.
Activate Source
Trigger immediate data ingestion by activating a data source:
- Nexla API
PUT /data_sources/{source_id}/activate
Example with curl:
curl -X PUT https://api.nexla.io/data_sources/5001/activate \
-H "Authorization: Bearer <Access-Token>" \
-H "Accept: application/vnd.nexla.api.v1+json"
Pause Source
Stop ongoing data ingestion by pausing a data source:
- Nexla API
PUT /data_sources/{source_id}/pause
Example with curl:
curl -X PUT https://api.nexla.io/data_sources/5001/pause \
-H "Authorization: Bearer <Access-Token>" \
-H "Accept: application/vnd.nexla.api.v1+json"
Activation Behavior
When you activate or pause a source:
- Immediate Effect: Changes take effect immediately
- Scheduled Operations: Scheduled ingestion continues based on configuration
- Flow Integration: Affects all downstream data flows
- Status Updates: Source status changes to reflect current state
Re-ingest Files
For file-based data sources, you can trigger re-ingestion of specific files. This is useful for reprocessing files that failed ingestion or for handling updated files.
Re-ingest Endpoint
- Nexla API
POST /data_sources/{source_id}/file/ingest
Example Request Body:
{
"file": "daily/customer_data_2023-01-15.csv"
}
File Path Requirements
The file path must:
- Start from Source Root: Begin with the location specified in source configuration
- Match File Patterns: Conform to any file pattern filters in source_config
- Be Accessible: Exist and be readable by the source credentials
Response Structure
- Nexla API
{
"status": "ok",
"message": "File ingestion initiated",
"file": "daily/customer_data_2023-01-15.csv",
"source_id": 5001
}
Validate Source Configuration
Source configuration validation ensures that your data source settings are complete and correct before attempting data ingestion. This helps prevent ingestion failures and configuration errors.
Validation Endpoint
- Nexla API
POST /data_sources/{source_id}/config/validate
Example with curl:
curl -X POST https://api.nexla.io/data_sources/5001/config/validate \
-H "Authorization: Bearer <Access-Token>" \
-H "Content-Type: application/json"