Pipeline Interface
Create Pipeline
Interface Description
It is a basic interface, which is used by users to request the service to create a pipeline.
Request
-
Request Syntax:
POST /v{version}/pipeline HTTP/1.1 accept-encoding: gzip, deflate x-bce-date: {utc-date-string} connection: keep-alive accept: */* host: media.bj.baidubce.com x-bce-request-id: {bce-request-id} content-type: application/json authorization: {bce-authorization-string}
- Request header field, no to special Header Parameter
- Request Prameter:
Field Name | Field Type | Necessary | Field Description | Optional | Parameter Position |
---|---|---|---|---|---|
pipelineName | String | Required | Pipeline name, lowercase letters, numbers, and underscores are allowed and must start with a letter, and the length is less than 40 characters | - | requestbody Parameters |
description | String | Optional | Pipeline description, the length is less than 128 characters | - | requestbody Parameters |
sourceBucket | String | Required | Input Bucket | - | requestbody Parameters |
targetBucket | String | Required | Input Bucket | - | requestbody rarameters |
config | Object | optional | Pipeline Configuration | - | requestbody Parameters |
+ capacity | Number | optional | Concurrent capacity of pipeline (20 by default) | Greater than or equal to 1 | requestbody Parameters |
+ notification | String | optional | Notification Name | - | requestbody Parameters |
+ pipelineType | String | optional | Pipeline type: Normal by default, and acceleration for high speed transcoding | - | requestbody rarameters |
POST /v3/pipeline HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: 2015-03-24T13:02:00Z
connection: keep-alive
accept: */*
host: media.bj.baidubce.com
x-bce-request-id: 73c4e74c-3101-4a00-bf44-fe246959c05e
content-type: application/json
authorization: bce-auth-v1/46bd9968a6194b4bbdf0341f2286ccce/2015-03-24T13:02:00Z/1800/host;x-bce-date/994014d96b0eb26578e039fa053a4f9003425da4bfedf33f4790882fb4c549
{
"sourceBucket": "exampleIuputBucket",
"targetBucket": "exampletargetBucket",
"pipelineName": "medium_priority_pipe",
"description": "The pipeline holding medium priority jobs.",
"config": {
"capacity": "5",
"notification" : "mct_notification",
"pipelineType": "normal"
}
}
Response
- Response headers: No to special Header Parameter
- Response Parameter: NO
-
Response Example:
HTTP/1.1 200 OK x-bce-request-id: 73c4e74c-3101-4a00-bf44-fe246959c05e Cache-Control: no-cache Server: BWS Date: Tue, 24 Mar 2015 13:02:01 GMT Content-Type: application/json;charset=UTF-8
Querying Specified Pipeline
Interface Description
It is a basic interface, which is used by users to query the information of this specified pipeline through the specified name.
Request
- Request Syntax:
http
GET /v{version}/pipeline/{pipelineName} HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: {utc-date-string}
host: media.bj.baidubce.com
accept: */*
connection: keep-alive
x-bce-request-id: {bce-request-id}
content-type: application/json
authorization: {bce-authorization-string}
- Request header field, no to special Header Parameter
- Request parameter: NO
- Request Example:
http
GET /v3/pipeline/high_priority_pipe HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: 2015-03-24T13:04:26Z
host: media.bj.baidubce.com
accept: */*
connection: keep-alive
x-bce-request-id: 4cd11be3-fcaf-4ce5-aa4a-135f3c27b12b
content-type: application/json
authorization: bce-auth-v1/02296dd93f1940a39913d9a406332486/2015-03-24T13:04:26Z/1800/host;x-bce-date/0ffab05c5001f9d80c8d2630561ff2144cf070d1fe838133412c8245615046f9
Response
- Response headers: No to special Header Parameter
- Response Parameter
Field Name | Field Type | Field Description |
---|---|---|
pipelineName | String | User-specified pipeline name, lowercase letters, numbers, and underscores are allowed and must start with a letter. |
sourceBucket | String | User specified input bucket |
targetBucket | String | User specified output bucket |
config | Object | Object configured by pipeline |
+ capacity | Number | Concurrent capacity of pipeline |
+ notification | String | Notification name |
state | String | Pipeline state, including ACTIVE/INACTIVE |
createTime | String | Create time, UTC format |
description | String | User specified pipeline description |
jobStatus | Object | Status collection of tasks in the pipeline |
+ total | Number | Total number of jobs in pipeline |
+ running | Number | The total number of tasks running in the pipeline |
+ pending | Number | Total number of pending jobs in pipeline |
+ success | Number | Total number of jobs completed in pipeline |
+ failed | Number | Total number of jobs failed in pipeline |
- Response Example:
http
HTTP/1.1 200 OK
Transfer-Encoding: chunked
x-bce-request-id: 47281222-f0ff-4f80-9a4d-0140ff77dcd0
Cache-Control: no-cache
Server: BWS
Date: Tue, 24 Mar 2015 13:04:27 GMT
Content-Type: application/json;charset=UTF-8
{
"name": "high_priority_pipe",
"sourceBucket": "exampleSourceBucket",
"targetBucket": "exampleTargetBucket",
"config": {
"capacity": 5,
"notification": "mct_notification"
},
"state":"ACTIVE",
"createTime":"2015-03-24T13:04:26Z",
"description":"A pipleine hoding high priority jobs.",
"jobStatus":
{
"total": 10,
"running": 2,
"pending": 1,
"success": 7,
"failed": 1
}
}
Query all pipelines of the user
Interface Description
It is an easy to use interface, which can help users query the details of all pipelines owned.
Request
- Request Syntax:
http
GET /v{version}/pipeline HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: {utc-date-string}
host: media.bj.baidubce.com
accept: */*
connection: keep-alive
x-bce-request-id: {bce-request-id}
content-type: application/json
authorization: {bce-authorization-string}
- Request header field, no to special Header Parameter
- Request parameter: NO
- Request Example:
http
GET /v3/pipeline HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: 2015-03-24T13:03:20Z
host: media.bj.baidubce.com
accept: */*
connection: keep-alive
x-bce-request-id: cc7500cb-ebc5-4ac2-9018-4befad8e2479
content-type: application/json
authorization: bce-auth-v1/46bd9968a6194b4bbdf0341f2286ccce/2015-03-24T13:03:20Z/1800/host;x-bce-date/c5e36c982e5037841925c6729f1e74df53ebb134745d3e6da2722f2333d390a2
Response
- Response headers: No to special Header Parameter
- Response Parameter:
Field Name: | Field Type | Field Description |
---|---|---|
pipelines | Object | Collection of pipelines |
+ pipelineName | String | User specified pipeline Name |
+ sourceBucket | String | User specified input bucket |
+ targetBucket | String | User specified output bucket |
+ config | Object | Pipeline configuration |
++ capacity | Number | Concurrent capacity of pipeline |
++ notification | String | Notification name |
+ state | String | Pipeline state, including ACTIVE/INACTIVE |
+ createTime | String | Create time, UTC format |
+ description | String | User specified pipeline description |
+ status | Object | Status collection of tasks in the pipeline |
++ total | Number | Total number of jobs in pipeline |
++ running | Number | The total number of tasks running in the pipeline |
++ pending | Number | Total number of pending jobs in pipeline |
++ success | Number | Total number of jobs completed in pipeline |
++ failed | Number | Total number of jobs failed in pipeline |
- Response Example:
http
HTTP/1.1 200 OK
Transfer-Encoding: chunked
x-bce-request-id: cc7500cb-ebc5-4ac2-9018-4befad8e2479
Cache-Control: no-cache
Server: BWS
Date: Tue, 24 Mar 2015 13:03:21 GMT
Content-Type: application/json;charset=UTF-8
{
"pipelines": [
{
"pipelineName": "high_priority_pipe",
"sourceBucket": "sampleSourceBucket00",
"targetBucket": "sampleTargetBucket00",
"config": {
"capacity":20,
"notification": "mct_notification"
},
"state": "ACTIVE",
"createTime": "2015-03-24T13:03:20Z",
"description": "The pipeline holding high priority jobs.",
"jobStatus": {
"total": 0,
"running": 0,
"pending": 0,
"success": 0,
"failed": 0
}
},
{
"pipelineName": "medium_priority_pipe",
"sourceBucket": "sampleSourceBucket01",
"targetBucket": "sampleTargetBucket01",
"config": {
"capacity":20
},
"state": "ACTIVE",
"createTime": "2015-03-24T13:03:20Z",
"description": "The pipeline holding medium priority jobs.",
"jobStatus": {
"total": 0,
"running": 0,
"pending": 0,
"success": 0,
"failed": 0
}
},
{
"pipelineName": "low_priority_pipe",
"sourceBucket": "sampleSourceBucket02",
"targetBucket": "sampleTargetBucket02",
"config": {
"capacity":20
},
"state": "ACTIVE",
"createTime": "2015-03-24T13:03:20Z",
"description": "The pipeline holding low priority jobs.",
"jobStatus": {
"total": 0,
"running": 0,
"pending": 0,
"success": 0,
"failed": 0
}
}
]
}
Deleting Specified Pipeline
Interface Description
It is a basic interface, which is used by users to request the service to delete the pipeline with specified pipelineName.
Request
- Request Syntax:
http
DELETE /v{version}/pipeline/{pipelineName} HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: {utc-date-string}
connection: keep-alive
accept: */*
host: media.bj.baidubce.com
x-bce-request-id: {bce-request-id}
content-type: application/json
authorization: {bce-authorization-string}
- Request header field, no to special Header Parameter
- Request parameter: NO
- Request Example:
http
DELETE /v3/pipeline/high_priority_pipe HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: 2015-03-24T13:06:02Z
connection: keep-alive
accept: */*
host: media.bj.baidubce.com
x-bce-request-id: 6d0b0a36-2ffe-49d4-9d81-333a9ab9417e
content-type: application/json
authorization: bce-auth-v1/46bd9968a6194b4bbdf0341f2286ccce/2015-03-24T13:06:02Z/1800/host;x-bce-date/02f64774999996903cffa5ae4d6eef436127a96f581a4e8467497e239d824be8
Response
- Response headers: No to special Header Parameter
- Response Parameter: NO
- Response Example:
http
HTTP/1.1 200 OK
x-bce-request-id: 6d0b0a36-2ffe-49d4-9d81-333a9ab9417e
Cache-Control: no-cache
Updating Specified Pipeline
Interface Description
It is a basic interface, which is used by users to request the service to update the pipeline.
Request
-
Request Syntax:
PUT /v{version}/pipeline/{pipelineName} HTTP/1.1 accept-encoding: gzip, deflate x-bce-date: {utc-date-string} connection: keep-alive accept: */* host: media.bj.baidubce.com x-bce-request-id: {bce-request-id} content-type: application/json authorization: {bce-authorization-string}
- Request header field, no to special Header Parameter
- Request Prameter:
Field Name: | Field Type | Required? | Field Description | Optional Values | Parameter Position |
---|---|---|---|---|---|
pipelineName | String | Required | The pipeline name update is required. | - | RequestBody parameters |
description | String | Optional | Pipeline description, the length is less than 128 characters | - | RequestBody parameters |
sourceBucket | String | Required | Input Bucket | - | RequestBody parameters |
targetBucket | String | Required | Output Bucket | - | RequestBody parameters |
config | Object | Optional | Pipeline configuration | - | RequestBody parameters |
- capacity | Number | Optional | Concurrent capacity of pipeline (20 by default) | Greater than or equal to 1 | requestbody parameter
- notification | String | Optional | Notification name | - | requestbody parameter
- Request Example:
PUT /v3/pipeline/medium_priority_pipe HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: 2020-02-14T14:59:24Z
connection: keep-alive
accept: */*
host: media.bj.baidubce.com
x-bce-request-id: deda676c-0892-4e14-9881-9d6f842d5728
content-type: application/json
authorization: bce-auth-v1/46bd9968a6194b4bbdf0341f2286ccce/2020-02-14T14:59:24Z/1800/host;x-bce-date/994014d96b0eb26578e039fa053a4f9003425da4bfedf33f4790882fb4c549
{
"sourceBucket": "exampleIuputBucket",
"targetBucket": "exampletargetBucket",
"pipelineName": "medium_priority_pipe",
"description": "The pipeline holding medium priority jobs.",
"config": {
"capacity": "10",
"notification" : "mct_notification"
}
}
Response
- Response headers: No to special Header Parameter
- Response Parameter: NO
-
Response Example:
HTTP/1.1 200 OK x-bce-request-id: deda676c-0892-4e14-9881-9d6f842d5728 Cache-Control: no-cache Server: BWS Date: Fri, 14 Feb 2020 06:59:24 GMT Content-Type: application/json;charset=UTF-8