consumes: - application/x-www-form-urlencoded - multipart/form-data swagger: "2.0" info: title: "OmniStor VIP API" version: "2.18.0" description: >- OmniStor 2.18.0 基礎 API 集 host: 'swagger.omnistorpoc.com' basePath: "/" tags: - name: "ServiceGateway" description: "認證相關 API" - name: "InfoRelay" description: "檔案元資料 (metadata) API" - name: "WebRelay" description: "檔案內容 API" schemes: - "https" paths: /member/acquiretoken/: post: tags: - "ServiceGateway" summary: "高安全性取得 Omnistor Token" description: "以 3DES 密碼, SID 與 Program Key 製作簽章取得 Token" operationId: "acquiretoken" consumes: - "application/xml" produces: - "application/xml" parameters: - name: "X-asc-sid" in: "header" required: true type: "string" description: "Service ID,需與 ASUSCloud 申請。" - name: "Authorization" in: "header" required: true type: "string" description: "Omnistor 認證簽章" - in: "body" name: "body" description: "" required: true schema: $ref: "#/definitions/aaa_req" responses: 200: description: "0 - Success
2 - 驗證帳號/密碼失敗或認證(token)失敗
994 - 超出 License 允許的用戶帳號數
995 - 安裝了超過 License 允許的硬碟空間
996 - License 已逾使用期限
997 - 不合法的 License 內容(例如無法解開 License file 或數位簽章不符)
999 - 其他未知錯誤
" schema: $ref: "#/definitions/aaa_rsp" 500: description: "伺服器錯誤" security: - X-asc-sid: [] - Authorization: [] /member/getrefreshticket: post: tags: - "ServiceGateway" summary: "取得可用來換取 token 的 refresh ticket" description: "取得可用來換取 token 的 refresh ticket。適用於延長 token 的壽命,或者使其他 client 在不接觸使用者帳號密碼的情況下取得此 ticket 對應 user 的 token 。" produces: - "application/xml" consumes: - "application/xml" parameters: - in: "header" name: "X-asc-sid" type: "integer" description: "Service ID,需與 ASUSCloud 申請。" required: true - in: "header" name: "Authorization" required: true type: "string" description: "Omnistor 認證簽章" - in: "header" name: "Cookie" required: true type: "string" description: "Service ID,需與 ASUSCloud 申請。 (in cookie). e.g. sid=88888888" - in: "body" name: "body" description: "" required: true schema: $ref: '#/definitions/getrefreshticket_req' responses: 200: description: "0 - Success
2 - 驗證帳號/密碼失敗或認證(token)失敗
11 - 資料庫處理錯誤
999 - 其他未知錯誤
" schema: $ref: '#/definitions/getrefreshticket_rsp' security: - Authorization: [] - X-asc-sid: [] /rest/ticket/timelimited/v1/${expiredDttmMillis}: get: tags: - "ServiceGateway" summary: "利用 token 取得時效券" description: "利用 token 取得時效券。取得的時效券可用在 directdownload 等功能中。" produces: - "application/json" parameters: - in: "header" type: "string" name: "X-asc-sid" description: "Service ID,需與 ASUSCloud 申請。" required: true - in: "header" type: "string" name: "X-asc-token" description: "Token" required: true - in: "header" type: "string" name: "Host" required: true description: "Host" - in: "header" type: "string" name: "X-asc-date" required: true description: "出request的 UTC 日期時間字串,ISO 8601 basic format YYYYMMDD'T'HHMMSS'Z'" - name: "Authorization" in: "header" required: true type: "string" description: "AWSv4 認證簽章" - name: "expiredDttmMillis" type: "integer" in: "path" required: true description: "時效券有效時間,單位毫秒。必須大於 0" responses: 200: description: "時效券" schema: $ref: "#/definitions/timelimitticket_rsp" 400: description: "參數未帶" 401: description: "AWSv4 簽章 (Authorization) 驗證失敗或者不存在" 500: description: "伺服器錯誤" security: - X-asc-sid: [] - X-asc-token: [] - AwsV4Authorrization: [] /member/releasetoken: post: tags: - "ServiceGateway" summary: "使特定 token 失效" produces: - "application/xml" consumes: - "application/xml" parameters: - in: "header" name: "X-asc-sid" type: "integer" description: "Service ID,需與 ASUSCloud 申請。" required: true - in: "header" name: "X-asc-os-version" type: "string" description: "Client OS 版本" - in: "header" name: "X-asc-sid-version" type: "string" description: "Client 版本" - in: "header" name: "X-asc-device-id" type: "string" description: "Client 裝置識別碼" - in: "header" name: "X-asc-device-name" type: "string" description: "Client 裝置名稱" - in: "header" name: "X-asc-device-maker" type: "string" description: "Client 裝置製造商" - in: "header" name: "X-asc-device-model" type: "string" description: "Client 裝置型號" - in: "body" name: "body" schema: $ref: '#/definitions/releasetoken_req' responses: 200: description: "0 - Success
11 - 資料庫處理錯誤
225 - 參數錯誤
249 - 指定的 userId 不存在
999 - 其他未知錯誤
" schema: $ref: '#/definitions/releasetoken_rsp' security: - X-asc-sid: [] /fsentry/getinfobysharecode/: post: tags: - "InfoRelay" summary: "取得分享碼的詳細資訊。" description: "取得分享碼所對應的真實檔案或資料夾 ID,並且判斷操作者是否有權限存取此物件。" produces: - "application/xml" consumes: - "application/xml" parameters: - name: "X-asc-sid" in: "header" required: true type: "string" description: "Service ID,需與 ASUSCloud 申請。" - in: "body" name: "body" required: true schema: $ref: '#/definitions/getinfobysharecode_req' responses: 200: description: "0 - Success
2 - 驗證帳號/密碼失敗或認證(token)失敗
11 - 資料庫處理錯誤
218 - 目錄不存在或是已刪除;目錄存在且有分享時,則沒有存取權限
243 - 分享不存在或分享者空間已使用空間大於可用空間
245 - 分享權限不足
999 - 其他未知錯誤
" schema: $ref: '#/definitions/getinfobysharecode_rsp' /fsentry/checkpassword/: post: tags: - "InfoRelay" summary: "檢查某個分享是否有密碼保護" produces: - "application/xml" consumes: - "application/xml" parameters: - name: "X-asc-sid" in: "header" required: true type: "string" description: "Service ID,需與 ASUSCloud 申請。" - in: "body" name: "body" required: true schema: $ref: '#/definitions/chkpwd_req' responses: 200: description: "0 - Success
2 - 驗證帳號/密碼失敗或認證(token)失敗
3 - 輸入資料格式錯誤
999 - 其他未知錯誤
" schema: $ref: '#/definitions/chkpwd_rsp' /fsentry/comparepassword/: post: tags: - "InfoRelay" summary: "檢查某個分享的密碼是否正確" produces: - "application/xml" consumes: - "application/xml" parameters: - name: "X-asc-sid" in: "header" required: true type: "string" description: "Service ID,需與 ASUSCloud 申請。" - in: "body" name: "body" required: true schema: $ref: '#/definitions/comparepwd_req' responses: 200: description: "0 - Success
218 - 目錄不存在或是已刪除;目錄存在且有分享時,則沒有存取權限
219 - 檔案不存在或是已刪除;檔案存在且有分享時,則沒有存取權限
225 - 需要的欄位不存在
229 - 密碼錯誤
999 - 其他未知錯誤
" schema: $ref: '#/definitions/comparepwd_rsp' /rest/browsefolder: post: tags: - "InfoRelay" summary: "取得資料夾下檔案或資料的資訊。" description: "依據所選擇的欄位,取得資料夾下檔案或資料的資訊。" produces: - "application/json" consumes: - "application/json" parameters: - in: "header" type: "string" name: "X-asc-sid" description: "Service ID,需與 ASUSCloud 申請。" required: true - in: "header" type: "string" name: "X-asc-token" description: "Token" required: true - in: "header" type: "string" name: "Host" required: true description: "Host" - in: "header" type: "string" name: "X-asc-date" required: true description: "出request的 UTC 日期時間字串,ISO 8601 basic format YYYYMMDD'T'HHMMSS'Z'" - name: "Authorization" in: "header" required: true type: "string" description: "AWSv4 認證簽章" - in: "body" name: "body" required: true schema: $ref: '#/definitions/browsefolder_req' responses: 200: description: "0 - Success
218 - 目錄不存在或是已刪除;目錄存在且有分享時,則沒有存取權限
219 - 檔案不存在或是已刪除;檔案存在且有分享時,則沒有存取權限
225 - 需要的欄位不存在
229 - 密碼錯誤
999 - 其他未知錯誤
" schema: $ref: '#/definitions/browsefolder_rsp' security: - X-asc-sid: [] - X-asc-token: [] /rest/acls/validate: put: tags: - "InfoRelay" summary: "檢驗是否可以分享給特定使用者" description: "檢驗操作者是否可以分享給特定使用者。不能分享給特定使用者的原因包括但不限於對象帳號已經被刪除,或是因為物件的擁有者被系統管理原限制,因此無法分享給特定群組的使用者。" produces: - "application/json" consumes: - "application/json" parameters: - in: "header" type: "string" name: "X-asc-sid" description: "Service ID,需與 ASUSCloud 申請。" required: true - in: "header" type: "string" name: "X-asc-token" description: "Token" required: true - in: "header" type: "string" name: "Host" required: true description: "Host" - in: "header" type: "string" name: "X-asc-date" required: true description: "出request的 UTC 日期時間字串,ISO 8601 basic format YYYYMMDD'T'HHMMSS'Z'" - name: "Authorization" in: "header" required: true type: "string" description: "AWSv4 認證簽章" - in: "body" name: "body" required: true schema: $ref: '#/definitions/validateacls_req' responses: 200: description: "0 - Success
11 - 資料庫處理錯誤
12 - 輸入的資料 (json) 格式有誤
218 - 目錄不存在或是已刪除;目錄存在且有分享時,則沒有存取權限
219 - 檔案不存在或是已刪除;檔案存在且有分享時,則沒有存取權限
225 - 需要的欄位不存在
245 - 分享權限不足
999 - 其他未知錯誤
" schema: $ref: '#/definitions/validateacls_rsp' security: - X-asc-sid: [] - X-asc-token: [] /fsentry/setacl/: post: tags: - "InfoRelay" summary: "進行分享設定" description: "依據指定的參數,進行分享白名單的設定" produces: - "application/xml" consumes: - "application/xml" parameters: # According to documentation, sid and authorization are not required for non-clientset usage - name: "X-asc-sid" in: "header" required: true type: "string" description: "Service ID,需與 ASUSCloud 申請。" - in: "body" name: "body" required: true schema: $ref: '#/definitions/setacl_req' responses: 200: description: "0 - Success
2 - 驗證帳號/密碼失敗或認證(token)失敗
5 - Authorization Fail
218 - 目錄不存在或是已刪除;目錄存在且有分享時,則沒有存取權限
219 - 檔案不存在或是已刪除;檔案存在且有分享時,則沒有存取權限
225 - 參數錯誤
226 - 帳號凍結或被關閉
235 - 上傳參數的操作要求錯誤
245 - 分享權限不足
248 - 要 clearshare 的目錄為公告目錄
999 - 其他未知錯誤
" schema: $ref: '#/definitions/setacl_rsp' /fsentry/getacl/: post: tags: - "InfoRelay" summary: "取得操作者對物件的存取權限" description: "取得操作者對物件的存取權限細節。" produces: - "application/xml" consumes: - "application/xml" parameters: # According to documentation, sid and authorization are not required for non-clientset usage - name: "X-asc-sid" in: "header" required: true type: "string" description: "Service ID,需與 ASUSCloud 申請。" - in: "body" name: "body" required: true schema: $ref: '#/definitions/getacl_req' responses: 200: description: "0 - Success
2 - 驗證帳號/密碼失敗或認證(token)失敗
5 - Authorization Fail
218 - 目錄不存在或是已刪除;目錄存在且有分享時,則沒有存取權限
219 - 檔案不存在或是已刪除;檔案存在且有分享時,則沒有存取權限
225 - 參數錯誤,或是 share code 到期
245 - 分享權限不足
999 - 其他未知錯誤
" schema: $ref: '#/definitions/getacl_rsp' /groupawareentry/listacls/: post: tags: - "InfoRelay" summary: "取得用戶的所有分享內容清單" description: "取得用戶的所有分享內容清單。此清單包含此用戶所分享,以及被其他用戶分享之內容。" operationId: "listacls" produces: - "application/xml" consumes: - "application/xml" parameters: - name: "X-asc-sid" in: "header" required: true type: "string" description: "Service ID,需與 ASUSCloud 申請。" - in: "body" name: "body" description: "" required: true schema: $ref: "#/definitions/listacls_req" responses: 200: description: "0 - Success
2 - 驗證帳號/密碼失敗或認證(token)失敗
5 - Authorization Fail
218 - 目錄不存在或是已刪除;目錄存在且有分享時,則沒有存取權限
225 - 參數值不在容許的定義域內
999 - 其他未知錯誤
" schema: $ref: "#/definitions/listacls_rsp" 500: description: "處理失敗" /folder/create/: post: tags: - "InfoRelay" summary: "建立目錄" description: "在特定的目錄下建立目錄" operationId: "foldercreate" produces: - "application/xml" consumes: - "application/xml" parameters: - in: "header" name: "X-asc-sid" type: "integer" description: "Service ID,需與 ASUSCloud 申請。" required: true - in: "header" name: "X-asc-sid-version" type: "string" description: "Client 版本" - in: "header" name: "X-asc-device-name" type: "string" description: "Client 裝置名稱" - name: "Authorization" in: "header" type: "string" description: "Omnistor 認證簽章。在 isgroupaware = 1 時必填" - in: "body" name: "body" required: true schema: $ref: "#/definitions/foldercreate_req" responses: 200: description: "0 - Success
2 - 驗證帳號/密碼失敗或認證(token)失敗
3 - Payload 格式不正確
5 - Authorization Fail
200 - 唯讀權限,無法進行操作
211 - 名稱為空白
213 - 名稱長度超過限制
214 - 名稱重複
218 - 目錄不存在或是已刪除;目錄存在且有分享時,則沒有存取權限
256 - 無效的檔案/目錄名稱
245 - 分享權限不足
999 - 其他未知錯誤
" schema: $ref: "#/definitions/foldercreate_rsp" 500: description: "伺服器錯誤" security: - X-asc-sid: [] - Authorization: [] /folder/remove/: post: tags: - "InfoRelay" summary: "刪除目錄" description: "刪除所指定的目錄" operationId: "folderremove" produces: - "application/xml" consumes: - "application/xml" parameters: - in: "header" name: "X-asc-sid" type: "integer" description: "Service ID,需與 ASUSCloud 申請。" required: true - in: "header" name: "X-asc-sid-version" type: "string" description: "Client 版本" - in: "header" name: "X-asc-device-name" type: "string" description: "Client 裝置名稱" - name: "Authorization" in: "header" type: "string" description: "Omnistor 認證簽章。在 isgroupaware = 1 時必填" - in: "body" name: "body" description: "" required: true schema: $ref: "#/definitions/folderremove_req" responses: 200: description: "0 - Success
2 - 驗證帳號/密碼失敗或認證(token)失敗
5 - Authorization Fail
218 - 目錄不存在或是已刪除;目錄存在且有分享時,則沒有存取權限
225 - 參數值不在容許的定義域內
234 - 刪除的 folder 屬於不同 parent
245 - 分享權限不足
248 - 要處理的目錄有公告資料夾
999 - 其他未知錯誤
" schema: $ref: "#/definitions/folderremove_rsp" 500: description: "處理失敗" security: - sid: [] /file/remove/: post: tags: - "InfoRelay" summary: "刪除檔案" description: "刪除所指定的檔案" operationId: "fileremove" produces: - "application/xml" consumes: - "application/xml" parameters: - in: "header" name: "X-asc-sid" type: "integer" description: "Service ID,需與 ASUSCloud 申請。" required: true - in: "header" name: "X-asc-sid-version" type: "string" description: "Client 版本" - in: "header" name: "X-asc-device-name" type: "string" description: "Client 裝置名稱" - name: "Authorization" in: "header" type: "string" description: "Omnistor 認證簽章。在 isgroupaware = 1 時必填" - in: "body" name: "body" description: "" required: true schema: $ref: "#/definitions/fileremove_req" responses: 200: description: "0 - Success
2 - 驗證帳號/密碼失敗或認證(token)失敗
5 - Authorization Fail
218 - 目錄不存在或是已刪除;目錄存在且有分享時,則沒有存取權限
219 - 檔案不存在或是已刪除;檔案存在且有分享時,則沒有存取權限
225 - 參數值不在容許的定義域內
234 - 刪除的 file 屬於不同 parent
245 - 分享權限不足
999 - 其他未知錯誤
" schema: $ref: "#/definitions/fileremove_rsp" 500: description: "處理失敗" security: - sid: [] /fsentry/getentryinfo/: post: tags: - "InfoRelay" summary: "取得目錄/檔案資訊" description: "取得指定之目錄或是檔案之相關資訊" operationId: "getentryinfo" produces: - "application/xml" consumes: - "application/xml" parameters: - name: "sid" in: "header" required: true type: "string" description: "Service ID,需與 ASUSCloud 申請。" - in: "body" name: "body" description: "" required: true schema: $ref: "#/definitions/getentryinfo_req" responses: 200: description: "0 - Success
2 - 驗證帳號/密碼失敗或認證(token)失敗
218 - 目錄不存在或是已刪除;目錄存在且有分享時,則沒有存取權限
219 - 檔案不存在或是已刪除;檔案存在且有分享時,則沒有存取權限
225 - 參數值不在容許的定義域內
245 - 分享權限不足
999 - 其他未知錯誤
" schema: $ref: "#/definitions/getentryinfo_rsp" 500: description: "處理失敗" security: - sid: [] /webrelay/initbinaryupload/: post: tags: - "WebRelay" summary: "初始化上傳檔案程序" description: "初始化上傳檔案程序,取得後續填入檔案內容以及關閉檔案用的權柄。" operationId: "initbinaryupload" produces: - "application/xml" consumes: - "application/xml" parameters: - in: "header" name: "X-asc-sid" type: "integer" description: "Service ID,需與 ASUSCloud 申請。" required: true - in: "header" name: "X-asc-sid-version" type: "string" description: "Client 版本" - in: "header" name: "X-asc-device-name" type: "string" description: "Client 裝置名稱" - name: "Authorization" in: "header" type: "string" description: "Omnistor 認證簽章。在 isgroupaware = 1 時必填" - in: "header" type: "string" name: "X-asc-token" description: "Token" required: true - in: "query" name: "na" description: "經過 Base64 後 URL encoded 的檔案名稱" required: true type: "string" - in: "query" name: "pa" description: "親代目錄 Id" required: true type: "integer" format: "int32" - in: "query" name: "av" description: "auto version 功能 - 1(開啟) / 0(關閉)" required: true type: "integer" format: "int32" - name: "sid" in: "header" required: true type: "string" responses: 200: description: "0 - Success
2 - 驗證帳號/密碼失敗或認證(token)失敗
5 - Authorization Fail
211 - 檔案名稱為空白(輸入參數na)
213 - 檔案名稱長度超過限制(輸入參數na)
214 - 檔案名稱重複(輸入參數na)
218 - 目錄不存在或是已刪除;目錄存在且有分享時,則沒有存取權限
219 - 檔案不存在或是已刪除;檔案存在且有分享時,則沒有存取權限
220 - 一般檔案錯誤
221 - 單一檔案超過大小限制
224 - 用戶之儲存空間已用盡
226 - 用戶的帳號已被凍結或關閉
250 - 輸入參數的檔案 signature(checksum)為空白或與伺服端不相符
251 - Transaction ID 不存在
252 - Transaction ID 與 File ID不符(客戶端想Reuse File ID續傳檔案時)
999 - 其他未知錯誤
" schema: $ref: "#/definitions/initbinaryupload_rsp" 500: description: "處理失敗" security: - X-asc-sid: [] /webrelay/resumebinaryupload/: post: tags: - "WebRelay" summary: "接續分段上傳檔案" description: "將檔案內容上傳到伺服器" operationId: "resumebinaryupload" produces: - "application/xml" consumes: - "application/octet-stream" parameters: - in: "header" name: "X-asc-sid" type: "integer" description: "Service ID,需與 ASUSCloud 申請。" required: true - in: "header" name: "X-asc-sid-version" type: "string" description: "Client 版本" - in: "header" name: "X-asc-device-name" type: "string" description: "Client 裝置名稱" - name: "Authorization" in: "header" type: "string" description: "Omnistor 認證簽章。在 isgroupaware = 1 時必填" - in: "header" type: "string" name: "X-asc-token" description: "Token" required: true - in: "query" name: "tx" description: "上傳作業交易 Id" required: true type: "string" - in: "body" name: "body" description: "" schema: type: "string" format: "binary" description: "二進位檔案內容" responses: 200: description: "0 - Success
5 - Authorization Fail
220 - 一般檔案錯誤
251 - Transaction ID 不存在
999 - 其他未知錯誤
" schema: $ref: "#/definitions/resumebinaryupload_rsp" 500: description: "處理失敗" security: - X-asc-sid: [] /webrelay/finishbinaryupload/: post: tags: - "WebRelay" summary: "完成分段上傳檔案" description: "將檔案正式存入伺服器系統中" operationId: "finishbinaryupload" produces: - "application/xml" consumes: - "application/xml" parameters: - in: "header" name: "X-asc-sid" type: "integer" description: "Service ID,需與 ASUSCloud 申請。" required: true - in: "header" name: "X-asc-sid-version" type: "string" description: "Client 版本" - in: "header" name: "X-asc-device-name" type: "string" description: "Client 裝置名稱" - name: "Authorization" in: "header" type: "string" description: "Omnistor 認證簽章。在 isgroupaware = 1 時必填" - in: "header" type: "string" name: "X-asc-token" description: "Token" required: true - in: "query" name: "tx" description: "上傳作業交易 Id" required: true type: "string" responses: 200: description: "0 - Success
2 - 驗證帳號/密碼失敗或認證(token)失敗
5 - Authorization Fail
218 - 要處理的目錄不存在或已刪除(輸入參數pa)
219 - 檔案不存在或已刪除 (Reuse File ID時)
220 - 一般檔案錯誤
250 - 輸入參數的檔案signature (checksum) 為空白或與伺服端不相符。或客戶端上傳的 latestchecksum (lsg參數) 與DB中的值不一致
999 - 其他未知錯誤
" schema: $ref: "#/definitions/finishbinaryupload_rsp" 500: description: "伺服器錯誤" security: - X-asc-sid: [] /webrelay/directdownload/: get: tags: - "WebRelay" summary: "下載檔案" description: "下載檔案" operationId: "directdownload" produces: - "application/octet-stream" consumes: - "application/xml" parameters: - in: "header" name: "X-asc-sid" type: "integer" description: "Service ID,需與 ASUSCloud 申請。" required: true - in: "query" name: "dis" description: "元件識別碼" required: true type: "string" - in: "query" name: "fi" description: "要下載之檔案的 File Id" required: true type: "integer" format: "int32" - in: "query" name: "u" description: "指定發生錯誤時要導向的頁面URL" required: true type: "string" - in: "query" name: "fue" description: "檔名會被強制進行 URLEncode - 0(不指定) / 1(指定)" required: true type: "string" - in: "query" name: "rn" description: "將下載之檔案的檔名更換為此參數指定的檔案名稱。此字串須依序以 Base64 及 URL encode 編碼" required: true type: "string" - in: "query" name: "tlt" description: "時效操作券" required: true type: "string" responses: 200: description: "二進位檔案內容" schema: type: "string" format: "binary" 403: description: "Token / 時效操作券驗證失敗" 416: description: "指定了一個小於0或大於檔案長度的 Offset" 500: description: "伺服器錯誤" security: - sid-in-query: [] - X-asc-sid: [] securityDefinitions: X-asc-token: type: "apiKey" name: "X-asc-token" in: "header" description: "認證 Token" sid: type: "apiKey" name: "sid" in: "header" description: "Service ID,需與 ASUSCloud 申請。" X-asc-sid: type: "apiKey" name: "X-asc-sid" in: "header" description: "Service ID,需與 ASUSCloud 申請。" sid-in-query: type: "apiKey" name: "dis" in: "query" description: "Service ID,需與 ASUSCloud 申請。" Authorization: type: "apiKey" name: "Authorization" in: "header" description: "認證簽章" AwsV4Authorrization: type: "apiKey" name: "Authorization" in: "header" description: "AWSv4 認證簽章" definitions: aaa_req: type: "object" properties: userid: type: "string" example: "oreo@omnistorpoc.com" description: "使用者帳號" symmetrypwd: type: "string" description: "使用者 3DES 密碼" example: "khD41ss+LF+JNfrsEhC8Pw==" time: type: "string" description: "使用者最近登入時間" example: "1571716396" progkey: type: "string" description: "程式編號" example: "88886666888866668888666688886666" xml: name: "aaa" aaa_rsp: type: "object" properties: status: type: "integer" format: "int32" example: 0 description: "API 回應狀態" userid: type: "string" example: "coke@omnistorpoc.com" description: "使用者帳號" token: type: "string" example: "S35fvWYbwBsYsQN1" description: "認證用權證" timetolive: type: "integer" format: "int64" example: "259200" description: "認證用權證使用期限" searchserver: type: "string" example: "swagger.omnistorpoc.com" description: "SearchServer base url" inforelay: type: "string" example: "swagger.omnistorpoc.com" description: "InfoRelay base url" webrelay: type: "string" example: "swagger.omnistorpoc.com" description: "WebRelay base url" xml: name: "aaa" listacls_req: type: "object" properties: token: type: "string" example: "S35fvWYbwBsYsQN1" description: "認證用權證" userid: type: "string" example: "coke@omnistorpoc.com" description: "使用者帳號" xml: name: "listacls" listacls_rsp: type: "object" properties: status: type: "integer" format: "int32" example: "0" description: "API 回應狀態" entry: type: "array" description: "符合權限之資料" xml: name: "entry" wrapped: true items: $ref: "#/definitions/listacls_entry" xml: name: "listacls" listacls_entry: type: "object" properties: userid: type: "string" example: "oreo@omnistorpoc.com" description: "物件擁有者者帳號" usernickname: type: "string" example: "奧利奧牛奶巧克力夾心餅乾" description: "物件擁有者暱稱" avatarID: type: "integer" format: "int64" example: "19890604" description: "物件擁有者大頭貼 ID" entryid: type: "integer" format: "int64" example: "76" description: "檔案或目錄編號" isfolder: type: "integer" format: "int32" example: "1" description: "物件是否為資料夾 - 0(否) / 1(是)" time: type: "string" example: "2019-10-19 20:37:09" description: "物件建立時間" ispasswordaccess: type: "integer" example: "1" description: "是 (1) 否 (0) 需要密碼才可以存取此物件" nonmemberprivilege: type: "integer" format: "int64" example: "31" description: "使用者不在分享白名單時的權限標記" entitymode: $ref: '#/definitions/acls_entity_mode' rawentryname: type: "string" example: "ENT109903" description: "物件原始名稱" rootfolderid: type: "integer" format: "int32" example: "0" description: "根目錄編號" isbulletin: type: "integer" example: "0" description: "是 (1) 否 (0) 為公告資料夾" issection: type: "integer" example: "0" description: "是 (1) 否 (0) 為群組分享" filesizelimit: type: "integer" format: "int64" example: "1048576" description: "此物件下單一檔案大小限制,單位 bytes" used: type: "integer" format: "int64" example: "497050" description: "使用空間大小, bytes" isprivacyrisk: type: "integer" example: "0" description: "是 (1) 否 (0) 有個資風險" isprivacysuspect: type: "integer" example: "0" description: "是 (1) 否 (0) 有個資疑慮" # bind: # NOTE: 專案資料夾使用 # type: "array" # xml: # name: "bind" # wrapped: true # items: # $ref: '#/definitions/bind_entry' # bind_entry: # NOTE: 專案資料夾使用 # type: "object" # properties: # fileext: # type: "string" # description: "副檔名" # NTOD 包含點?格式? # ispositive: # type: "integer" # format: "binary" # description: "正面表列 (1) 或負面表列 (0)" acls_entity_mode: type: "object" properties: contributor: type: "integer" format: "int64" example: "63" description: "物件貢獻者(上傳者)的權限標記" teamMember: type: "integer" format: "int64" example: "63" description: "非物件貢獻者(非上傳者)的權限標記" foldercreate_req: type: "object" properties: token: type: "string" example: "S35fvWYbwBsYsQN1" description: "認證用權證" userid: type: "string" example: "macaron@omnistorpoc.com" description: "使用者帳號" parent: type: "integer" format: "int64" example: "76" description: "親代目錄編號" isgroupaware: type: "integer" format: "int32" example: "1" description: "是否群組分享 - 0(否) / 1(是)" display: type: "string" example: "5Lm+6bq16LOH5paZ5aS+" description: "以 base64 編碼的 utf-8 檔案名稱" xml: name: "create" foldercreate_rsp: type: "object" properties: status: type: "integer" format: "int32" example: "0" description: "API 回應狀態" message: type: "string" example: "" description: "API 回應訊息" id: type: "integer" format: "int64" example: "40" description: "目錄編號" xml: name: "create" folderrename_req: type: "object" properties: token: type: "string" example: "S35fvWYbwBsYsQN1" description: "認證用權證" id: type: "integer" format: "int64" example: "40" description: "目錄編號" display: type: "string" example: "UmVuYW1lZERhdGFzZXQ=" description: "目錄名稱 (以 Base64 編碼)" xml: name: "rename" folderremove_req: type: "object" properties: token: type: "string" example: "S35fvWYbwBsYsQN1" description: "認證用權證" id: type: "integer" format: "int64" example: "40" description: "目錄編號" isgroupaware: type: "integer" format: "binary" example: "1" description: "是 (1) 否 (0) 在被分享的區域內進行操作" cleanupimmediately: type: "integer" format: "binary" example: "0" description: "是 (1) 否 (0) 立即刪除檔案(否則移入擁有者之資源回收筒)" xml: name: "remove" folderremove_rsp: type: "object" properties: status: type: "integer" format: "int32" example: "0" description: "API 回應狀態" logmessage: type: "string" example: "" description: "API 回應訊息" xml: name: "remove" folderrename_rsp: type: "object" properties: status: type: "integer" format: "int32" example: "0" description: "API 回應狀態" logmessage: type: "string" example: "" description: "API 回應訊息" xml: name: "rename" fileremove_req: type: "object" properties: token: type: "string" example: "S35fvWYbwBsYsQN1" description: "認證用權證" id: type: "integer" format: "int64" example: "235" description: "檔案編號" isgroupaware: type: "integer" format: "binary" example: "1" description: "是 (1) 否 (0) 在被分享的區域內進行操作" cleanupimmediately: type: "integer" format: "binary" example: "0" description: "是 (1) 否 (0) 立即刪除檔案(否則移入擁有者之資源回收筒)" xml: name: "remove" fileremove_rsp: type: "object" properties: status: type: "integer" format: "int32" example: "0" description: "API 回應狀態" logmessage: type: "string" example: "" description: "API 回應訊息" xml: name: "remove" getentryinfo_req: type: "object" properties: token: type: "string" example: "S35fvWYbwBsYsQN1" description: "認證用權證" userid: type: "string" example: "oreo@omnistorpoc.com" description: "使用者 ID" isfolder: type: "integer" format: "int32" example: "0" description: "是否為資料夾 - 0(否) / 1(是)" entryid: type: "integer" format: "int32" example: "40" description: "物件/檔案編號" xml: name: "validatetoken" getentryinfo_rsp: type: "object" properties: status: type: "integer" format: "int32" example: "0" description: "API 回應狀態" isfolder: type: "integer" format: "int32" example: "0" description: "是否為資料夾 - 0(否) / 1(是)" display: type: "string" example: "UmVuYW1lZERhdGFzZXQ=" description: "物件名稱 (以 Base64 編碼)" isbackup: type: "integer" format: "int32" example: "0" description: "是否為備份檔案" mimetype: type: "string" example: "video/mp4" description: "檔案 MIME Type" filesize: type: "integer" format: "int64" example: "333144" description: "檔案使用空間 (KB)" headversion: type: "integer" format: "int32" example: "1" description: "檔案主要版本編號" createdtime: type: "string" example: "2019-10-15 00:35:18.0" description: "檔案建立時間" treesize: type: "integer" format: "int64" example: "40374585" description: "目錄使用空間 (KB)" contributor: type: "string" example: "u2807647" description: "發佈者帳號" expiredtime: type: "string" example: "2019-10-15 00:35:18.0" description: "檔案有效時間" owner: type: "string" example: "croquettes@omnistorpoc.com" description: "擁有者帳號" xml: name: "getentryinfo" initbinaryupload_rsp: type: "object" properties: status: type: "integer" format: "int32" example: "0" description: "API 狀態" transid: type: "string" example: "1572821888-68202b0f8d2a4c13a55af27d39b7c2cc" description: "上傳交易編號" fileid: type: "integer" format: "int32" example: "235" description: "檔案編號" landedchecksum: type: "string" example: " 64310b1750081cd65fa3ff92aa59701a9205fdc6" description: "既存檔案之檢核碼 (checksum)" latestchecksum: type: "string" example: " 1907023be83da53ac0f1d2e5e310ec15acc6cdfb" description: "前一次上傳檔案之檢核碼 (checksum)" offset: type: "integer" format: "int64" example: "0" description: "前一次上傳檔案的進度 (初次上傳為0)" logmessage: type: "string" example: "0" description: "API 回應訊息" xml: name: "initbinaryupload" resumebinaryupload_rsp: type: "object" properties: status: type: "integer" format: "int32" example: "0" description: "API 回應狀態" logmessage: type: "string" example: "0" description: "API 回應訊息" xml: name: "resumebinaryupload" finishbinaryupload_rsp: type: "object" properties: status: type: "integer" format: "int32" example: "0" description: "API 狀態" logmessage: type: "string" example: "0" description: "API 回應訊息" fileid: type: "integer" format: "int32" example: "235" description: "檔案編號" xml: name: "finishbinaryupload" timelimitticket_rsp: type: "object" properties: serverExpiredDttmMillis: type: "integer" format: "int64" example: "1591757598323" description: "時效券的有效時間。此時間是以伺服器端為準,自 epoch (1970-01-01T00:00:00Z) 起算的總毫秒數。" ticket: type: "string" format: "string" example: "BJwd9Pm4rEbn/jEJUnxh+E62kHdchmE6Yx/ix1wRUn4=" description: "申請到的時效券。" getrefreshticket_req: type: "object" properties: userid: type: "string" format: "string" example: "oreo" description: "使用者帳號" token: type: "string" format: "string" example: "S35fvWYbwBsYsQN1" description: "認證用權證" # delegatorsid is hidden: cannot get public key via this API set xml: name: "getrefreshticket" getrefreshticket_rsp: type: "object" properties: status: type: "integer" format: "int32" example: 0 description: "狀態碼" refreshticket: type: "string" format: "string" example: "f8f44536-bbef-40db-8758-1881edb8dad9" description: "Refresh ticket" timetoliveindays: type: "integer" format: "int32" example: "30" description: "Refresh ticket 的使用期限,以天為單位。" xml: name: "getrefreshticket" releasetoken_req: type: "object" properties: userid: type: "string" format: "string" example: "oreo" description: "使用者帳號" token: type: "string" format: "string" example: "S35fvWYbwBsYsQN1" description: "認證用權證" xml: name: "releasetoken" releasetoken_rsp: type: "object" properties: status: type: "integer" format: "int32" example: 0 description: "狀態碼" xml: name: "releasetoken" validateacls_req: type: "object" properties: entryId: type: "integer" format: "int64" example: 999 description: "檔案或資料夾 ID" isFolder: type: "boolean" example: false description: "是否為資料夾" shareToUsers: type: "array" example: ["oreo", "macaroni", "doughnut"] description: "預定要被分享的對象的 userId 清單" items: type: "string" validateacls_rsp: type: "object" properties: status: type: "integer" format: "int32" example: 0 description: "狀態碼" message: type: "string" example: "" description: "錯誤訊息" validateResults: type: "array" description: "檢查結果。列出受檢查的 userId 以及所對應的結果 (result)" items: type: "object" properties: userId: type: "string" example: "oreo@omnistorpoc.com" result: type: "string" example: "OK" description: "OK 此帳號沒問題,可以作為分享對象
DELETED 帳號被刪除
NOT_SHARABLE_FOR_OWNER 因擁有者受 package 限制,而無法分享給此使用者
NOT_IN_SYSTEM 此帳號不存在於此 OmniStor 系統中" getacl_req: type: "object" properties: token: type: "string" example: "S35fvWYbwBsYsQN1" description: "認證用權證" userid: type: "string" example: "oreo@omnistorpoc.com" description: "使用者 ID" isfolder: type: "integer" format: "int32" example: "0" description: "是 (1) 否 (0) 為資料夾" entryid: type: "integer" format: "int32" example: "40" description: "物件/檔案編號" getacl_rsp: type: "object" properties: status: type: "integer" format: "int32" example: 0 description: "狀態碼" sharecode: type: "string" description: "分享碼" ispasswordneeded: type: "integer" format: "binary" description: "是 (1) 否 (0) 需要密碼才可以開啟" isgroupaware: type: "integer" format: "binary" description: "是 (1) 否 (0) 為 group-aware 分享。若是則某些 API 需要帶入 isgroupaware = 1" acl: type: "array" description: "該物件所對應的分享白名單資料" xml: name: "acl" wrapped: true items: $ref: "#/definitions/acl_entry" aclsection: type: "array" description: "該物件所對應的群組分享資料" xml: name: "aclsection" wrapped: true items: $ref: "#/definitions/acl_section_entry" nonmemberprivilege: type: "integer" format: "int64" description: "非白名單或群組分享成員所擁有的權限" isbulletin: type: "integer" format: "binary" description: "是 (1) 否 (0) 為公告資料夾" expiredtime: type: "string" format: "date-time" description: "yyyy-MM-dd HH:mm:ss" folderquota: type: "integer" format: "int64" description: "資料夾容量限制,單位 byte" filesizelimit: type: "integer" format: "int64" description: "單一檔案大小限制,單位 byte" counttoclose: type: "integer" format: "int64" description: "下載次數限制" onetimedownload: type: "integer" format: "binary" description: "是 (1) 否 (0) 為單次下載" # NOTE: bind: projectspace feature setacl_req: type: "object" properties: token: type: "string" example: "S35fvWYbwBsYsQN1" description: "認證用權證" userid: type: "string" example: "oreo@omnistorpoc.com" description: "使用者 ID" isfolder: type: "integer" format: "int32" example: "0" description: "是 (1) 否 (0) 為資料夾" entryid: type: "integer" format: "int32" example: "40" description: "物件/檔案編號" clearshare: type: "integer" format: "binary" example: "0" description: "是 (1) 否 (0) 清除分享" clearpassword: type: "integer" format: "binary" example: "0" description: "是 (1) 否 (0) 清除密碼" clearvalidityduration: type: "integer" format: "binary" example: "0" description: "是 (1) 否 (0) 清除有效期限" releasequotalimit: type: "integer" format: "binary" example: "0" description: "是 (1) 否 (0) 清除容量限制" password: type: "string" description: "分享密碼。轉小寫做MD5編碼以 hex 呈現後的字串。" validityduration: type: "integer" format: "int32" description: "有效期限,單位為小時。" isgroupaware: type: "integer" format: "binary" description: "是 (1) 否 (0) 為 group-aware 分享。若是則某些 API 需要帶入 isgroupaware = 1" acl: type: "array" description: "該物件所對應的分享白名單資料" xml: name: "acl" wrapped: true items: $ref: "#/definitions/acl_entry" aclsection: type: "array" description: "該物件所對應的群組分享資料" xml: name: "aclsection" wrapped: true items: $ref: "#/definitions/acl_section_entry" nonmemberprivilege: type: "integer" format: "int64" description: "非白名單或群組分享成員所擁有的權限" # bulletin: hidden clearfilesizelimit: type: "integer" format: "binary" description: "是 (1) 否 (0) 清除單一檔案上傳大小限制" filesizelimit: type: "integer" format: "int64" description: "單一檔案大小限制,單位 byte" # bind: # NOTE: 專案資料夾使用 # type: "array" # xml: # name: "bind" # wrapped: true # items: # $ref: '#/definitions/bind_entry' counttoclose: type: "integer" format: "int64" description: "下載次數限制" clearcounttoclose: type: "integer" format: "binary" description: "是 (1) 否 (0) 清除下載次數限制" onetimedownload: type: "integer" format: "binary" description: "是 (1) 否 (0) 為單次下載" clearonetimedownload: type: "integer" format: "binary" description: "是 (1) 否 (0) 清除單次下載的設定" setacl_rsp: type: "object" properties: status: type: "integer" format: "int32" example: 0 description: "狀態碼" sharecode: type: "string" description: "分享碼" ispasswordneeded: type: "integer" format: "binary" description: "是 (1) 否 (0) 需要密碼才可以開啟" isgroupaware: type: "integer" format: "binary" description: "是 (1) 否 (0) 為 group-aware 分享。若是則某些 API 需要帶入 isgroupaware = 1" acl: type: "array" description: "該物件所對應的分享白名單資料" xml: name: "acl" wrapped: true items: $ref: "#/definitions/acl_entry" aclsection: type: "array" description: "該物件所對應的群組分享資料" xml: name: "aclsection" wrapped: true items: $ref: "#/definitions/acl_section_entry" nonmemberprivilege: type: "integer" format: "int64" description: "非白名單或群組分享成員所擁有的權限" isbulletin: type: "integer" format: "binary" description: "是 (1) 否 (0) 為公告資料夾" expiredtime: type: "string" format: "date-time" description: "yyyy-MM-dd HH:mm:ss" folderquota: type: "integer" format: "int64" description: "資料夾容量限制,單位 byte" filesizelimit: type: "integer" format: "int64" description: "單一檔案大小限制,單位 byte" counttoclose: type: "integer" format: "int64" description: "下載次數限制" onetimedownload: type: "integer" format: "binary" description: "是 (1) 否 (0) 為單次下載" # bind: # NOTE: 專案資料夾使用 # type: "array" # xml: # name: "bind" # wrapped: true # items: # $ref: '#/definitions/bind_entry' acl_entry: type: "object" properties: shareforuserid: type: "string" description: "被分享者的使用者 ID" entitymode: $ref: '#/definitions/acls_entity_mode' acl_section_entry: type: "object" properties: shareforuserid: type: "string" description: "被分享者的使用者 ID" entitymode: $ref: '#/definitions/acls_entity_mode' comparepwd_req: type: "object" properties: token: type: "string" example: "S35fvWYbwBsYsQN1" description: "認證用權證" userid: type: "string" example: "oreo@omnistorpoc.com" description: "使用者 ID" isfolder: type: "integer" format: "binary" example: "0" description: "是 (1) 否 (0) 為資料夾" ffid: type: "integer" format: "int64" example: "40" description: "物件/檔案編號" passwd: type: "string" description: "要檢查的,MD5 雜湊後 hex 編碼的密碼" xml: name: "comparepassword" comparepwd_rsp: type: "object" properties: status: type: "integer" format: "int32" example: 0 description: "狀態碼" xml: name: "comparepassword" chkpwd_req: type: "object" properties: token: type: "string" example: "S35fvWYbwBsYsQN1" description: "認證用權證" userid: type: "string" example: "oreo@omnistorpoc.com" description: "使用者 ID" suri: type: "string" description: "分享碼" xml: name: "checkpassword" chkpwd_rsp: type: "object" properties: status: type: "integer" format: "int32" example: 0 description: "狀態碼" ifpassword: type: "integer" format: "binary" example: 0 description: "是否有密碼" xml: name: "checkpassword" browsefolder_req: type: "object" required: - "parent" - "isShared" properties: parent: type: "integer" format: "int64" example: 0 description: "要列出成員資料的資料夾 ID" isShared: type: "integer" format: "binary" example: 0 description: "對操作者來說是 (1) 否 (0) 為被分享的資料夾" requiredColumns: type: "array" example: ["entityMode"] description: "額外需要的資料欄位名稱。
想要的欄位請參考 BrowseFolder 的回傳資料。
想要的越多,效能消耗就越多。" items: type: "string" isDescending: type: "integer" format: "binary" example: 0 description: "排序時是 (1) 否 (0) 遞減排列" orderBy: type: "string" description: "是否依照所指定的條件進行排序。
填入 name 以名稱排序,以 time 以建立時間排序
很吃效能。" example: "name" pageNo: type: "integer" description: "分頁頁碼" default: 1 pageSize: type: "integer" default: 200 description: "分頁時單頁筆數。當要求的資料筆數超過 server 的設定時,將會被砍到 server 所設定的上限。" browsefolder_rsp: type: "object" properties: status: type: "integer" format: "int32" example: 0 description: "狀態碼" message: type: "string" description: "錯誤訊息" pageNo: type: "integer" format: "int32" description: "分頁呈現的頁碼" pageSize: type: "integer" format: "int32" description: "分頁筆數" folderId: type: "integer" format: "int64" description: "被訊問的資料夾 ID" rootFolderId: type: "integer" format: "int64" description: "此資料夾以及子資料的根資料夾 ID" folderName: type: "string" description: "以 base64 編碼的 utf-8 資料夾名稱" entries: type: "array" items: $ref: '#/definitions/browsefolder_entry' browsefolder_entry: type: "object" description: "注意只有 entryId, entryName, isFolder 是必定會有的資料。其他的只有在進行查詢時於 requiredColumns 帶入才會出現。" properties: entryId: type: "integer" format: "int64" example: 0 description: "檔案或資料夾 ID" entryName: type: "string" description: "以 base64 編碼的 utf-8 檔案或資料夾名稱" isFolder: type: "integer" example: 0 description: "此項目是 (1) 否 (0) 為資料夾" hasChildren: type: "integer" description: "此項目是 (1) 否 (0) 有子項目" storageType: type: "integer" description: "此項目所屬的儲存類別 (storage type)" treesize: type: "integer" format: "int64" description: "此資料夾的大小,含子資料" filesize: type: "integer" format: "int64" description: "檔案大小" # rawFolderName, rawFileName is hidden: they are for debugging, as described by documentation createdTimestampMillis: type: "integer" format: "int64" description: "物件建立的時間,以 Unix timestamp (millis, UTC) 格式呈現。也就是到 ephch 的 millisecond 數。" lastModifiedTimestampMillis: type: "integer" format: "int64" description: "物件上次修改的時間,以 Unix timestamp (millis, UTC) 格式呈現。也就是到 ephch 的 millisecond 數。" isOrigDeleted: type: "integer" format: "binary" description: "物件是 (1) 否 (0) 在使用者的機器被刪除" isPrivacyRisk: type: "integer" format: "binary" description: "檔案是 (1) 否 (0) 有個資風險" isPrivacySuspect: type: "integer" format: "binary" description: "檔案是 (1) 否 (0) 有個資疑慮" isInfected: type: "integer" format: "binary" description: "檔案是 (1) 否 (0) 被感染" contributor: type: "string" description: "上傳或者建立此物件使用者的使用者 ID" contributorNickname: type: "string" description: "上傳或者建立此物件使用者的使用者暱稱" entityMode: $ref: '#/definitions/acls_entity_mode' isShared: type: "integer" format: "binary" description: "物件是 (1) 否 (0) 被分享" # incremental... properties are hidden for now nonmemberPrivilege: type: "integer" format: "int64" description: "當物件被分享時,未在白名單中的使用者所擁有的存取權限。" fileVersion: type: "integer" format: "int32" description: "檔案的最新版本號" isMarked: type: "integer" format: "binary" description: "物件是 (1) 否 (0) 有星號標記" getinfobysharecode_req: type: "object" properties: token: type: "string" example: "S35fvWYbwBsYsQN1" description: "認證用權證" userid: type: "string" example: "oreo@omnistorpoc.com" description: "使用者 ID" sharecode: type: "string" example: "EA7DAB889A4D4FB2851B82995403EDC96BL" description: "分享碼" getinfobysharecode_rsp: type: "object" properties: status: type: "integer" format: "int32" example: 0 description: "狀態碼" entryid: type: "integer" format: "int64" example: 1086 description: "物件 ID" entrytype: type: "integer" format: "binary" example: 1 description: "物件是 (1) 否 (0) 為資料夾" isgroupaware: type: "integer" format: "binary" example: 0 description: "是 (1) 否 (0) 為 group-aware 分享。若是則某些 API 需要帶入 isgroupaware = 1" nonmemberPrivilege: type: "integer" format: "int64" example: 0 description: "當物件被分享時,未在白名單中的使用者所擁有的存取權限。" owner: type: "string" example: "oreo" description: "擁有者的使用者 ID" parent: type: "integer" format: "int64" example: 104 description: "上層目錄的目錄 ID"