Appearance
POST /pipelines
Description
Create a new pipeline with specified configurations for input and output storage.
Authentication
- Required: Yes
- Method: Bearer token
Headers
- Authorization:
Bearer [token] - Content-Type:
application/json
Parameters
Query Parameters
- format:
string(Optional)
Values:json,xml
Overrides the Request Accept header. - human:
boolean(Optional)
Values:true,false
Causes the response to be in a structured, more human-readable form. - show_null:
boolean(Optional)
Values:true,false
If set to "true", the response will contain keys that are not set to a value. - expand_all:
boolean(Optional)
Values:true,false
Recursively look up referenced objects and embed the respective JSON as nested objects directly into the response.
Body Parameters
- pipeline:
object(Required)- name:
string(Required)
Name of the new pipeline. Should be unique but not enforced. - description:
string(Required)
Human-readable description of the pipeline. - cancel_timeout:
int(Optional)
Upper limit in seconds for how long a job can remain in the "QUEUED" state before being auto-cancelled. Default is 0 (no timeout). - default_object_timeout:
int(Optional)
Time in seconds after which objects are considered expired. - enable_backtrace_pings:
boolean(Optional) Set to true if you want to receive ping callbacks also for backtraces. Default: false (only for jobs). - input_download_dir:
string(Optional)
Base URI of an external location from where to download input videos. Supports S3, SFTP, and HTTPS.
Format:s3://access_key:secret_key@your_s3_region/bucketname/sftp://login:password@host:port/pathhttps://login:password@host:port/
- image_download_dir:
string(Optional)
Location to obtain images like logos for embedding into videos. - download_options:
object(Optional)- auto_convert_input:
string(Optional) Whether to automatically poll&convert new input files found in input_download_dir. Set to "on" to enable auto-convert, "off" to disable. Default: "off". - https_certificate_check:
boolean(Optional)
Whether to verify SSL certificate of remote server before downloading files. Default: true.
- auto_convert_input:
- output_upload_dir:
string(Optional)
Remote location for uploading converted output videos. Supports S3 and SFTP. - image_upload_dir:
string(Optional)
Remote location for uploading generated thumbnails. - upload_options:
object(Optional)- s3_allow_read:
string(Optional)
ACL for uploaded objects. Can be "everyone" or a specific Amazon Canonical UserID. - s3_reduced_redundancy:
boolean(Optional)
Enable reduced redundancy storage on S3.
- s3_allow_read:
- store_options:
object(Optional)- mode:
string(Optional)
Storage mode for the internal store. Default is "temporary".
- mode:
- ping_urls:
object(Optional)- error:
string(Optional)
URL to ping on error. - warning:
string(Optional)
URL to ping on warning. - started:
string(Optional)
URL to ping when a task starts. - finished:
string(Optional)
URL to ping when a task finishes.
- error:
- name:
Example Request
bash
curl -X POST "https://api.xvid.com/v1/pipelines/?human=true&show_null=true" \
-H "Authorization: Bearer AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"pipeline": {
"name": "My own test Pipeline",
"description": "My test Pipeline with input from S3 and output to my company sftp account",
"cancel_timeout": 60,
"default_object_timeout": 3600,
"input_download_dir": "s3://AWSKEY:AWSSECRET@s3.amazonaws.com/my_bucket/",
"image_download_dir": "https://username:password@mycompanyserver.com/my_logos/",
"download_options": {
"https_certificate_check": false
},
"output_upload_dir": "s3://AWSKEY:AWSSECRET@s3.amazonaws.com/my_bucket/",
"image_upload_dir": "sftp://username:password@mycompanyserver.com/my_folder/",
"upload_options": {
"s3_allow_read": "everyone",
"s3_reduced_redundancy": true
},
"store_options": {
"mode": "temporary"
},
"ping_urls": {
"error": "https://mycompany.com/ping/on_error",
"warning": "https://mycompany.com/ping/on_warning",
"started": "https://mycompany.com/ping/start_job",
"finished": "https://mycompany.com/ping/finish_job"
}
}
}'Response
Success (201 Created)
json
{
"pipeline": {
"id": "pipeline_id",
"name": "My own test Pipeline",
"description": "My test Pipeline with input from S3 and output to my company sftp account",
...
}
}Error Responses
400 Bad Request
json
{
"error": "Invalid request parameters"
}401 Unauthorized
json
{
"error": "Authentication required"
}500 Internal Server Error
json
{
"error": "Internal server error"
}Notes
- Ensure all required fields are provided.
- Additional validation rules and potential error messages need to be documented.