{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/vi/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Cloud Storage"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"cloud-storage","__idx":0},"children":["Cloud Storage"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Cloud Storage là không gian tệp ở cấp nhóm, dùng để lưu những tệp cần dùng lại trong các luồng tự động hóa của MoreLogin. Hãy tải lên một lần, sắp xếp bằng thẻ, tìm lại sau và xóa những tệp không còn cần."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Nó khác với các API truyền tệp của Cloud Phone. API tệp của Cloud Phone chuyển tệp vào hoặc ra khỏi một thiết bị cụ thể. API Cloud Storage quản lý thư viện tệp dùng chung, tức là trước khi tệp được thiết bị, lịch chạy, mẫu RPA hay logic tự động hóa khác sử dụng."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"bạn-có-thể-làm-gì","__idx":1},"children":["Bạn có thể làm gì"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Khả năng"},"children":["Khả năng"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Dùng để làm gì"},"children":["Dùng để làm gì"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"API liên quan"},"children":["API liên quan"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tổng quan lưu trữ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Kiểm tra tổng dung lượng, dung lượng đã dùng, ngày hết hạn và trạng thái dung lượng trước khi tải lên hoặc dọn dẹp tệp."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Truy vấn thông tin cloud storage"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tìm tệp"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Liệt kê tệp cloud storage theo trang và lọc theo tên tệp, loại tệp, thẻ hoặc ID tệp."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Phân trang tệp cloud storage"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tải tệp lên"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Xin URL tải lên đã ký trước, tải nội dung tệp lên object storage, rồi xác nhận hoàn tất trong MoreLogin."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Xin hàng loạt URL tải lên đã ký trước, xác nhận hoàn tất tải lên"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Dọn dẹp tệp"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Xóa một hoặc nhiều tệp khỏi thư viện lưu trữ dùng chung."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Xóa hàng loạt tệp cloud storage"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Gắn thẻ tệp"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ghi đè hoặc thêm thẻ để sắp xếp tệp theo dự án, khách hàng, mục đích sử dụng hoặc luồng công việc."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Đặt thẻ cho tệp, thêm thẻ cho tệp, truy vấn thẻ của tệp"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Quản lý thẻ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tạo, sửa, liệt kê và xóa các thẻ tệp dùng lại được."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Truy vấn toàn bộ thẻ, tạo thẻ, sửa thẻ, xóa thẻ"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"các-tình-huống-thường-gặp","__idx":2},"children":["Các tình huống thường gặp"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Tải APK, tệp media, tài liệu hoặc tài nguyên kiểm thử lên một lần rồi dùng lại trong tự động hóa."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Giữ tệp được sắp xếp theo khách hàng, chiến dịch, phiên bản ứng dụng, môi trường hoặc luồng công việc."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Tạo bộ chọn tệp trong công cụ nội bộ của bạn bằng cách gọi API phân trang tệp kèm bộ lọc tên tệp và thẻ."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Dọn dẹp hàng loạt các tệp đã hết hạn hoặc không dùng sau khi một luồng kết thúc."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Đồng bộ hệ thống tài nguyên bên ngoài với MoreLogin bằng cách tạo thẻ và gắn chúng vào các tệp đã tải lên."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"cách-truy-cập-api","__idx":3},"children":["Cách truy cập API"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Phương thức"},"children":["Phương thức"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Base URL"},"children":["Base URL"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Tiền tố đường dẫn"},"children":["Tiền tố đường dẫn"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Tình huống dùng"},"children":["Tình huống dùng"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Open API"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.morelogin.com"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/cloudstorage"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Truy cập server-to-server, công cụ từ xa, CI/CD, dịch vụ backend"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Local API"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["http://127.0.0.1:40000"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/cloudstorage"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Script hoặc công cụ desktop chạy trên cùng máy với client MoreLogin"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Chi tiết xác thực xem tại ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/vi/api-reference/getting-started/authentication"},"children":["Xác thực"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"luồng-tải-lên","__idx":4},"children":["Luồng tải lên"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Việc tải lên Cloud Storage dùng luồng URL đã ký trước. Mã của bạn không tải tệp nhị phân trực tiếp lên API MoreLogin."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Gọi ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Xin hàng loạt URL tải lên đã ký trước"]}," kèm danh sách tên tệp (có phần mở rộng)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Với mỗi phần tử trả về, tải tệp nhị phân lên ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["presignedUrl"]}," bằng ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PUT"]}," qua HTTPS."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Gọi ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Xác nhận hoàn tất tải lên"]}," với ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," tệp được trả về."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Dùng ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Phân trang tệp cloud storage"]}," hoặc ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Truy vấn thẻ của tệp"]}," để kiểm tra và hiển thị tệp đã tải lên."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# 1. Request a presigned upload URL\ncurl -X POST \"https://api.morelogin.com/cloudstorage/upload/init\" \\\n  -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"fileNames\": [\"example.jpg\"]\n  }'\n\n# 2. Upload file content to the returned presignedUrl\ncurl -X PUT \"PRESIGNED_URL_FROM_RESPONSE\" \\\n  -H \"Content-Type: image/jpeg\" \\\n  --data-binary \"@example.jpg\"\n\n# 3. Confirm upload completion (id from step 1 response)\ncurl -X POST \"https://api.morelogin.com/cloudstorage/upload/complete\" \\\n  -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"id\": 1800000000000001\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Với Local API, hãy giữ nguyên body request và thay đường dẫn thành ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["http://127.0.0.1:40000/api/cloudstorage/..."]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"dùng-tệp-cloud-storage-trong-rpa-của-cloud-phone","__idx":5},"children":["Dùng tệp Cloud Storage trong RPA của Cloud Phone"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sau khi tệp được tải lên và xác nhận, tham số mẫu RPA của Cloud Phone có thể tham chiếu tệp đó bằng ID tệp Cloud Storage. Hãy dùng giao thức tệp đám mây của MoreLogin thay vì URL tải xuống công khai bên ngoài:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"morelogin://cloudfile?ids=1,2\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ids"]}," là danh sách ID tệp Cloud Storage phân tách bằng dấu phẩy. Chỉ dùng dấu phẩy tiếng Anh, không có khoảng trắng. Bạn có thể lấy ID tệp từ phản hồi hoàn tất tải lên hoặc từ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Phân trang tệp cloud storage"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Một tệp:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"morelogin://cloudfile?ids=1800000000001001\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Nhiều tệp:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"morelogin://cloudfile?ids=1800000000001001,1800000000001002\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Khi tham số RPA là loại media hoặc tệp, hãy giữ metadata ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["__Extra__"]}," bắt buộc và đặt giá trị tham số là URI giao thức tệp đám mây:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"__Extra__\": {\n    \"videoDownloadUrl\": { \"name\": \"video.mp4\", \"size\": 204800000 }\n  },\n  \"videoDownloadUrl\": \"morelogin://cloudfile?ids=1,2\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Điều này hữu ích cho các tác vụ RPA Cloud Phone theo lịch, mẫu trên marketplace, mẫu cá nhân, và bất kỳ tham số node RPA nào mong đợi một tệp đã tải lên dùng lại được. Runtime RPA phân giải tệp từ Cloud Storage của MoreLogin, nên tệp không cần được công khai qua URL HTTPS."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ví-dụ-hoàn-chỉnh-chạy-rpa-cloud-phone-với-một-video-trong-cloud-storage","__idx":6},"children":["Ví dụ hoàn chỉnh: chạy RPA Cloud Phone với một video trong Cloud Storage"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ví dụ này tải ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["video.mp4"]}," lên Cloud Storage, gắn một thẻ, rồi tạo một tác vụ RPA Cloud Phone chạy một lần dùng tệp đã tải lên trong tham số mẫu ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["videoDownloadUrl"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ví dụ dùng đường dẫn Local API. Với Open API, hãy giữ nguyên body request và thay:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["http://127.0.0.1:40000/api/cloudstorage/..."]}," thành ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.morelogin.com/cloudstorage/..."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["http://127.0.0.1:40000/api/cloudphone/..."]}," thành ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.morelogin.com/cloudphone/..."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"1-tạo-thẻ-cho-tài-nguyên-rpa","__idx":7},"children":["1. Tạo thẻ cho tài nguyên RPA"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"http://127.0.0.1:40000/api/cloudstorage/tag/create\" \\\n  -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"tagName\": \"RPA Assets\"\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Lưu ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," của thẻ được trả về, ví dụ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1800000000000101"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"2-xin-url-tải-lên-đã-ký-trước","__idx":8},"children":["2. Xin URL tải lên đã ký trước"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"http://127.0.0.1:40000/api/cloudstorage/upload/init\" \\\n  -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"fileNames\": [\"video.mp4\"]\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Lưu ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," tệp được trả về và ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["presignedUrl"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"3-tải-nội-dung-nhị-phân-của-tệp-lên","__idx":9},"children":["3. Tải nội dung nhị phân của tệp lên"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tải nội dung tệp lên ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["presignedUrl"]},". Request này đi tới URL object storage được trả về ở bước trước, không đi tới API MoreLogin."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X PUT \"PRESIGNED_URL_FROM_RESPONSE\" \\\n  -H \"Content-Type: video/mp4\" \\\n  --data-binary \"@video.mp4\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"4-xác-nhận-hoàn-tất-tải-lên","__idx":10},"children":["4. Xác nhận hoàn tất tải lên"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"http://127.0.0.1:40000/api/cloudstorage/upload/complete\" \\\n  -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"id\": 1800000000000001\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Lưu ID tệp Cloud Storage được trả về, ví dụ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1800000000001001"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"41-gắn-thẻ-vào-tệp","__idx":11},"children":["4.1 Gắn thẻ vào tệp"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"http://127.0.0.1:40000/api/cloudstorage/file/tag/add\" \\\n  -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"fileId\": 1800000000001001,\n    \"tagIds\": [1800000000000101]\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Nếu phản hồi hoàn tất tải lên không trả về trực tiếp ID tệp, hãy truy vấn tệp theo trang:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"http://127.0.0.1:40000/api/cloudstorage/file/page\" \\\n  -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"pageNo\": 1,\n    \"pageSize\": 20,\n    \"fileName\": \"video\",\n    \"tagIds\": [1800000000000101]\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"5-dựng-tham-số-mẫu-rpa","__idx":12},"children":["5. Dựng tham số mẫu RPA"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Dùng ID tệp Cloud Storage trong giao thức tệp đám mây của MoreLogin:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"morelogin://cloudfile?ids=1800000000001001\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Với tham số mẫu RPA tên ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["videoDownloadUrl"]},", hãy dựng đối tượng JSON như sau:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"__Extra__\": {\n    \"videoDownloadUrl\": {\n      \"name\": \"video.mp4\",\n      \"size\": 204800000\n    }\n  },\n  \"videoDownloadUrl\": \"morelogin://cloudfile?ids=1800000000001001\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sau đó escape nó thành chuỗi JSON cho ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["templateParameter"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"\"{\\\"__Extra__\\\":{\\\"videoDownloadUrl\\\":{\\\"name\\\":\\\"video.mp4\\\",\\\"size\\\":204800000}},\\\"videoDownloadUrl\\\":\\\"morelogin://cloudfile?ids=1800000000001001\\\"}\"\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"6-tạo-tác-vụ-rpa-cloud-phone-chạy-một-lần","__idx":13},"children":["6. Tạo tác vụ RPA Cloud Phone chạy một lần"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Trước khi tạo tác vụ, hãy lấy ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloudPhoneId"]}," từ API danh sách Cloud Phone và ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["templateId"]}," từ API danh sách mẫu trên marketplace hoặc mẫu cá nhân."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"http://127.0.0.1:40000/api/cloudphone/rpa/onceTask/save\" \\\n  -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"cloudPhoneId\": 1678331966138097,\n    \"scheduleName\": \"Upload video from Cloud Storage\",\n    \"templateId\": 1678347487160256,\n    \"templateParameter\": \"{\\\"__Extra__\\\":{\\\"videoDownloadUrl\\\":{\\\"name\\\":\\\"video.mp4\\\",\\\"size\\\":204800000}},\\\"videoDownloadUrl\\\":\\\"morelogin://cloudfile?ids=1800000000001001\\\"}\",\n    \"description\": \"Use a Cloud Storage video file in a one-time Cloud Phone RPA task\"\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"7-kiểm-tra-tác-vụ","__idx":14},"children":["7. Kiểm tra tác vụ"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Truy vấn danh sách tác vụ hoặc danh sách tác vụ con của RPA Cloud Phone để kiểm tra trạng thái chạy:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"http://127.0.0.1:40000/api/cloudphone/rpa/task/page\" \\\n  -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"pageNo\": 1,\n    \"pageSize\": 20,\n    \"taskName\": \"Upload video from Cloud Storage\"\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Điểm then chốt là tác vụ RPA nhận ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["videoDownloadUrl"]}," dưới dạng ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["morelogin://cloudfile?ids=..."]},". MoreLogin phân giải tệp từ Cloud Storage lúc chạy, nên phần tích hợp của bạn không cần host tệp trên URL công khai."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"luồng-làm-việc-với-thẻ","__idx":15},"children":["Luồng làm việc với thẻ"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Thẻ là metadata dùng lại được cho các tệp cloud storage. Một tệp có thể có nhiều thẻ."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Dùng ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Tạo thẻ tệp cloud storage"]}," để tạo các thẻ như ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Invoices"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["APK"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Customer A"]}," hoặc ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RPA Assets"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Dùng ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Đặt thẻ cho tệp"]}," khi bạn muốn ghi đè toàn bộ thẻ của một tệp."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Dùng ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Thêm thẻ cho tệp"]}," khi bạn muốn thêm mà không xóa các thẻ hiện có."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Dùng ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Truy vấn toàn bộ thẻ tệp cloud storage"]}," để dựng bộ lọc thẻ trong giao diện của bạn."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Dùng ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Truy vấn thẻ của tệp"]}," để hiển thị những thẻ nào đang gắn với các tệp đã chọn."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ví dụ: thêm một thẻ vào tệp mà không xóa các thẻ nó đang có."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://api.morelogin.com/cloudstorage/file/tag/add\" \\\n  -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"fileId\": 1800000000001001,\n    \"tagIds\": [1800000000000103]\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"bản-đồ-api","__idx":16},"children":["Bản đồ API"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Tác vụ"},"children":["Tác vụ"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Đường dẫn Open API"},"children":["Đường dẫn Open API"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Đường dẫn Local API"},"children":["Đường dẫn Local API"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Truy vấn thông tin lưu trữ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /cloudstorage/info"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /api/cloudstorage/info"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Phân trang tệp"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudstorage/file/page"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/cloudstorage/file/page"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Xin URL tải lên đã ký trước"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudstorage/upload/init"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/cloudstorage/upload/init"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Xác nhận hoàn tất tải lên"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudstorage/upload/complete"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/cloudstorage/upload/complete"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Xóa tệp hàng loạt"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudstorage/file/delete/batch"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/cloudstorage/file/delete/batch"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Đặt thẻ cho tệp"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudstorage/file/tag/set"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/cloudstorage/file/tag/set"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Thêm thẻ cho tệp"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudstorage/file/tag/add"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/cloudstorage/file/tag/add"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Truy vấn thẻ trên tệp"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudstorage/file/tag/query"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/cloudstorage/file/tag/query"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Truy vấn toàn bộ thẻ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /cloudstorage/tag/all"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /api/cloudstorage/tag/all"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tạo thẻ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudstorage/tag/create"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/cloudstorage/tag/create"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sửa thẻ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudstorage/tag/edit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/cloudstorage/tag/edit"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Xóa thẻ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudstorage/tag/delete/batch"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/cloudstorage/tag/delete/batch"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"tài-liệu-api","__idx":17},"children":["Tài liệu API"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"API"},"children":["API"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Mô tả"},"children":["Mô tả"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/vi/api-reference/cloud-storage/open-api"},"children":["Cloud Storage Open API"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Truy cập từ xa qua ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.morelogin.com"]},", xác thực OAuth2"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/vi/api-reference/cloud-storage/local-api"},"children":["Cloud Storage Local API"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Truy cập cục bộ qua ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["http://127.0.0.1:40000"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Lưu ý"]},": đường dẫn Local API dùng tiền tố ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/"]},". Đường dẫn Open API thì không."]}]}]},"headings":[{"value":"Cloud Storage","id":"cloud-storage","depth":1},{"value":"Bạn có thể làm gì","id":"bạn-có-thể-làm-gì","depth":2},{"value":"Các tình huống thường gặp","id":"các-tình-huống-thường-gặp","depth":2},{"value":"Cách truy cập API","id":"cách-truy-cập-api","depth":2},{"value":"Luồng tải lên","id":"luồng-tải-lên","depth":2},{"value":"Dùng tệp Cloud Storage trong RPA của Cloud Phone","id":"dùng-tệp-cloud-storage-trong-rpa-của-cloud-phone","depth":2},{"value":"Ví dụ hoàn chỉnh: chạy RPA Cloud Phone với một video trong Cloud Storage","id":"ví-dụ-hoàn-chỉnh-chạy-rpa-cloud-phone-với-một-video-trong-cloud-storage","depth":2},{"value":"1. Tạo thẻ cho tài nguyên RPA","id":"1-tạo-thẻ-cho-tài-nguyên-rpa","depth":3},{"value":"2. Xin URL tải lên đã ký trước","id":"2-xin-url-tải-lên-đã-ký-trước","depth":3},{"value":"3. Tải nội dung nhị phân của tệp lên","id":"3-tải-nội-dung-nhị-phân-của-tệp-lên","depth":3},{"value":"4. Xác nhận hoàn tất tải lên","id":"4-xác-nhận-hoàn-tất-tải-lên","depth":3},{"value":"4.1 Gắn thẻ vào tệp","id":"41-gắn-thẻ-vào-tệp","depth":3},{"value":"5. Dựng tham số mẫu RPA","id":"5-dựng-tham-số-mẫu-rpa","depth":3},{"value":"6. Tạo tác vụ RPA Cloud Phone chạy một lần","id":"6-tạo-tác-vụ-rpa-cloud-phone-chạy-một-lần","depth":3},{"value":"7. Kiểm tra tác vụ","id":"7-kiểm-tra-tác-vụ","depth":3},{"value":"Luồng làm việc với thẻ","id":"luồng-làm-việc-với-thẻ","depth":2},{"value":"Bản đồ API","id":"bản-đồ-api","depth":2},{"value":"Tài liệu API","id":"tài-liệu-api","depth":2}],"frontmatter":{"seo":{"title":"Cloud Storage"}},"lastModified":"2026-09-03T06:29:47.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/vi/api-reference/cloud-storage","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}