---
# System prepended metadata

title: Pipe

---

---
title: 'Pipe'
---

# Changelog
## 10/05
新增功能
* 修改pipeline狀態(deleted/stop)
    * put /pipes/{pipeID:string}?status=(deleted/stop)
* 列出deleted pipeline
    * get /pipes?status=deleted
* 刪除deleted pipeline(s)
    * delete /pipes/{pipeID:string}
    * delete /pipes

# Feature

pipe name 需要 unique，但還沒做
pipe name 的命名規則? 只少要符合sql table name的
start pipe 的 defer 還沒寫好

### Delete pipe
stop pipe:
1. stop extractor
2. stop streamer
3. 改 status 為 stop

delete pipe:
1. 同stop
2. 改 status 為 deleted

remove deleted pipe:
1. delete extractor 
	2. csv 也要刪掉
3. delete file 
4. delete kafka
5. delete svt 
6. delete streamer 


# Type
    db, file, kafka    

# status
	pending, error, warning, running, stop, deleted


# FAQ
**Q. ?**
A. 


# Testcase
## Add Pipe
url: post /pipes
description: 新增管線
## Get Pipe
url: get /pipes/{pipeID}
description: 取得管線資料
## List Pipe
url: get /pipes
description: 列出部分或所有管線資料
parameters:
* key: 用於query管線名稱與管線描述
* limit: 一次要列出多少筆資料，若輸入-1則列出全部
* offset: 從第幾筆資料開始列出
## Edit Pipe
url: put /pipes/{pipeID}
description: 修改管線資料
## Delete Pipe
url: delete /pipes/{pipeID}
description: 刪除管線
## Start Pipe
url: put /pipes/{pipeID}/start
description: 啟動管線
## Stop Pipe
url: put /pipes/{pipeID}/stop
description: 停止管線