Complete Sync Operation
Notify that a sync operation completed and provide the file manifest.
POST
/
filesystems
/
{filesystem_id}
/
sync-complete
Complete Sync Operation
curl --request POST \
--url https://api.example.com/filesystems/{filesystem_id}/sync-complete \
--header 'Content-Type: application/json' \
--data '
{
"direction": "<string>",
"status": "<string>",
"sync_id": "<string>",
"archive_checksum": "<string>",
"archive_size_bytes": 123,
"files": [
{
"modified_at": "2023-11-07T05:31:56Z",
"path": "<string>",
"checksum": "<string>",
"content": "<string>",
"content_truncated": false,
"is_binary": false,
"is_directory": false,
"mime_type": "<string>",
"size_bytes": 123
}
]
}
'import requests
url = "https://api.example.com/filesystems/{filesystem_id}/sync-complete"
payload = {
"direction": "<string>",
"status": "<string>",
"sync_id": "<string>",
"archive_checksum": "<string>",
"archive_size_bytes": 123,
"files": [
{
"modified_at": "2023-11-07T05:31:56Z",
"path": "<string>",
"checksum": "<string>",
"content": "<string>",
"content_truncated": False,
"is_binary": False,
"is_directory": False,
"mime_type": "<string>",
"size_bytes": 123
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
direction: '<string>',
status: '<string>',
sync_id: '<string>',
archive_checksum: '<string>',
archive_size_bytes: 123,
files: [
{
modified_at: '2023-11-07T05:31:56Z',
path: '<string>',
checksum: '<string>',
content: '<string>',
content_truncated: false,
is_binary: false,
is_directory: false,
mime_type: '<string>',
size_bytes: 123
}
]
})
};
fetch('https://api.example.com/filesystems/{filesystem_id}/sync-complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/filesystems/{filesystem_id}/sync-complete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'direction' => '<string>',
'status' => '<string>',
'sync_id' => '<string>',
'archive_checksum' => '<string>',
'archive_size_bytes' => 123,
'files' => [
[
'modified_at' => '2023-11-07T05:31:56Z',
'path' => '<string>',
'checksum' => '<string>',
'content' => '<string>',
'content_truncated' => false,
'is_binary' => false,
'is_directory' => false,
'mime_type' => '<string>',
'size_bytes' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/filesystems/{filesystem_id}/sync-complete"
payload := strings.NewReader("{\n \"direction\": \"<string>\",\n \"status\": \"<string>\",\n \"sync_id\": \"<string>\",\n \"archive_checksum\": \"<string>\",\n \"archive_size_bytes\": 123,\n \"files\": [\n {\n \"modified_at\": \"2023-11-07T05:31:56Z\",\n \"path\": \"<string>\",\n \"checksum\": \"<string>\",\n \"content\": \"<string>\",\n \"content_truncated\": false,\n \"is_binary\": false,\n \"is_directory\": false,\n \"mime_type\": \"<string>\",\n \"size_bytes\": 123\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/filesystems/{filesystem_id}/sync-complete")
.header("Content-Type", "application/json")
.body("{\n \"direction\": \"<string>\",\n \"status\": \"<string>\",\n \"sync_id\": \"<string>\",\n \"archive_checksum\": \"<string>\",\n \"archive_size_bytes\": 123,\n \"files\": [\n {\n \"modified_at\": \"2023-11-07T05:31:56Z\",\n \"path\": \"<string>\",\n \"checksum\": \"<string>\",\n \"content\": \"<string>\",\n \"content_truncated\": false,\n \"is_binary\": false,\n \"is_directory\": false,\n \"mime_type\": \"<string>\",\n \"size_bytes\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/filesystems/{filesystem_id}/sync-complete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"direction\": \"<string>\",\n \"status\": \"<string>\",\n \"sync_id\": \"<string>\",\n \"archive_checksum\": \"<string>\",\n \"archive_size_bytes\": 123,\n \"files\": [\n {\n \"modified_at\": \"2023-11-07T05:31:56Z\",\n \"path\": \"<string>\",\n \"checksum\": \"<string>\",\n \"content\": \"<string>\",\n \"content_truncated\": false,\n \"is_binary\": false,\n \"is_directory\": false,\n \"mime_type\": \"<string>\",\n \"size_bytes\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"files_count": 123,
"filesystem_id": "<string>",
"status": "<string>",
"sync_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Notify that a sync operation completed and provide the file manifest. This is typically called after uploading or downloading files to finalize the sync state.
Path Parameters
Body
application/json
Request model for completing a sync operation.
Sync direction: 'UP' or 'DOWN'.
Sync status: 'SUCCESS' or 'FAILED'.
Unique ID for this sync operation (idempotency key).
SHA256 checksum of the archive.
Size of the archive in bytes.
List of files in the filesystem (empty if status is FAILED).
Show child attributes
Show child attributes
Response
Successful Response
Was this page helpful?
⌘I
Complete Sync Operation
curl --request POST \
--url https://api.example.com/filesystems/{filesystem_id}/sync-complete \
--header 'Content-Type: application/json' \
--data '
{
"direction": "<string>",
"status": "<string>",
"sync_id": "<string>",
"archive_checksum": "<string>",
"archive_size_bytes": 123,
"files": [
{
"modified_at": "2023-11-07T05:31:56Z",
"path": "<string>",
"checksum": "<string>",
"content": "<string>",
"content_truncated": false,
"is_binary": false,
"is_directory": false,
"mime_type": "<string>",
"size_bytes": 123
}
]
}
'import requests
url = "https://api.example.com/filesystems/{filesystem_id}/sync-complete"
payload = {
"direction": "<string>",
"status": "<string>",
"sync_id": "<string>",
"archive_checksum": "<string>",
"archive_size_bytes": 123,
"files": [
{
"modified_at": "2023-11-07T05:31:56Z",
"path": "<string>",
"checksum": "<string>",
"content": "<string>",
"content_truncated": False,
"is_binary": False,
"is_directory": False,
"mime_type": "<string>",
"size_bytes": 123
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
direction: '<string>',
status: '<string>',
sync_id: '<string>',
archive_checksum: '<string>',
archive_size_bytes: 123,
files: [
{
modified_at: '2023-11-07T05:31:56Z',
path: '<string>',
checksum: '<string>',
content: '<string>',
content_truncated: false,
is_binary: false,
is_directory: false,
mime_type: '<string>',
size_bytes: 123
}
]
})
};
fetch('https://api.example.com/filesystems/{filesystem_id}/sync-complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/filesystems/{filesystem_id}/sync-complete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'direction' => '<string>',
'status' => '<string>',
'sync_id' => '<string>',
'archive_checksum' => '<string>',
'archive_size_bytes' => 123,
'files' => [
[
'modified_at' => '2023-11-07T05:31:56Z',
'path' => '<string>',
'checksum' => '<string>',
'content' => '<string>',
'content_truncated' => false,
'is_binary' => false,
'is_directory' => false,
'mime_type' => '<string>',
'size_bytes' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/filesystems/{filesystem_id}/sync-complete"
payload := strings.NewReader("{\n \"direction\": \"<string>\",\n \"status\": \"<string>\",\n \"sync_id\": \"<string>\",\n \"archive_checksum\": \"<string>\",\n \"archive_size_bytes\": 123,\n \"files\": [\n {\n \"modified_at\": \"2023-11-07T05:31:56Z\",\n \"path\": \"<string>\",\n \"checksum\": \"<string>\",\n \"content\": \"<string>\",\n \"content_truncated\": false,\n \"is_binary\": false,\n \"is_directory\": false,\n \"mime_type\": \"<string>\",\n \"size_bytes\": 123\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/filesystems/{filesystem_id}/sync-complete")
.header("Content-Type", "application/json")
.body("{\n \"direction\": \"<string>\",\n \"status\": \"<string>\",\n \"sync_id\": \"<string>\",\n \"archive_checksum\": \"<string>\",\n \"archive_size_bytes\": 123,\n \"files\": [\n {\n \"modified_at\": \"2023-11-07T05:31:56Z\",\n \"path\": \"<string>\",\n \"checksum\": \"<string>\",\n \"content\": \"<string>\",\n \"content_truncated\": false,\n \"is_binary\": false,\n \"is_directory\": false,\n \"mime_type\": \"<string>\",\n \"size_bytes\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/filesystems/{filesystem_id}/sync-complete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"direction\": \"<string>\",\n \"status\": \"<string>\",\n \"sync_id\": \"<string>\",\n \"archive_checksum\": \"<string>\",\n \"archive_size_bytes\": 123,\n \"files\": [\n {\n \"modified_at\": \"2023-11-07T05:31:56Z\",\n \"path\": \"<string>\",\n \"checksum\": \"<string>\",\n \"content\": \"<string>\",\n \"content_truncated\": false,\n \"is_binary\": false,\n \"is_directory\": false,\n \"mime_type\": \"<string>\",\n \"size_bytes\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"files_count": 123,
"filesystem_id": "<string>",
"status": "<string>",
"sync_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}