API root: https://cloud-api.vpon21.com/v1
功能:建立簡訊發送任務,通知 VDMS 執行指令。
URI(STAG): https://cloud-api-stag.vpon21.com/v1/command/mdvr/sms/send
{
"userName": String,
"macId": [ String ],
"message": String
}
200 OK
{
"msg": 1,
"data": "ok"
}
400 Bad request
{
"err": <error_message>
}
401 Unauthorized
{
"err": <error_message>
}
功能:更新簡訊發送任務狀態。
URI: https://cloud-api.vpon21.com/v1/command/mdvr/sms/update/:taskId
URI(STAG): https://cloud-api-stag.vpon21.com/v1/command/mdvr/sms/update/:taskId
{
"state": Int
}
state:
1: 檔案製作完成
2: 無法製作檔案
200 OK
{
"msg": 1,
"data": "ok"
}
400 Bad request
{
"err": <error_message>
}
404 Not Found
{
"err": <error_message>
}
功能:更新 MDVR 執行狀態。
URI: https://cloud-api.vpon21.com/v1/command/mdvr/sms/update/:taskId/:macId
URI(STAG): https://cloud-api-stag.vpon21.com/v1/command/mdvr/sms/update/:taskId/:macId
{
"state": Int
}
state:
1: 收到指令
2: 下載完成
3. 播放完畢(聲音檔播一次)(圖片顯示20sec)
4. 下載未成功(會再重試30 次)
5. 解壓縮錯誤, 流程結束
6. SMS簡訊失敗,流程結束
200 OK
{
"msg": 1,
"data": "ok"
}
400 Bad request
{
"err": <error_message>
}
404 Not Found
{
"err": <error_message>
}
API root: https://vdms-api.vpon21.com/v1
功能:建立簡訊圖片及語音檔
{
"taskId": String,
"message": String,
"macId": [ String ],
}
200 OK
{
"msg": 1,
"data": "ok"
}
400 Bad request
{
"err": <error_code>,
"data": <error_message>
}
curl --location --request POST 'https://vdms-api.vpon21.com/v1/sms/create' \
--header 'Content-Type: application/json' \
--data-raw '{
"taskId": "36473",
"message": "您有新的訊息...",
"macId": ["CA813233"]
}'
功能:查詢檔案製作狀態
{
"macId": [ String ],
}
200 OK
{
"msg": 1,
"data": "ok"
}
204 No content
message_code:
1. 檔案產生中
2. 無法產生檔案
400 Bad request
404 Not Found
功能:下載簡訊圖片及語音壓縮檔
{
"macId": [ String ],
}
200 OK
204 No content
message_code:
1. 檔案產生中
2. 無法產生檔案
400 Bad request
404 Not Found
curl --location --request POST 'https://vdms-api.vpon21.com/v1/sms/read/zip/36473' \
--header 'Content-Type: application/json' \
--data-raw '{"macId": "CA813233"}' \
--dump-header 'header.txt' \
--output 'sms.tar'
功能:下載語音檔
{
"macId": [ String ],
}
200 OK
204 No content
message_code:
1. 檔案產生中
2. 無法產生檔案
400 Bad request
404 Not Found