curl -X POST "https://{host}/storage/v1/sync/process" \
-H "Content-Type: application/json" \
-d '{
"args": {
"identityKey": "string",
"fromStorageIdentityKey": "string",
"since": "1970-01-01T00:00:00.000Z",
"paged": {
"limit": 0,
"offset": 0
}
},
"chunk": {
"users": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"transactions": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"outputs": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"outputBaskets": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"provenTxs": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"provenTxReqs": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"syncStates": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
]
}
}'
const response = await fetch(`https://{host}/storage/v1/sync/process`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
"args": {
"identityKey": "string",
"fromStorageIdentityKey": "string",
"since": "1970-01-01T00:00:00.000Z",
"paged": {
"limit": 0,
"offset": 0
}
},
"chunk": {
"users": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"transactions": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"outputs": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"outputBaskets": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"provenTxs": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"provenTxReqs": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"syncStates": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
]
}
})
});
const data = await response.json();
import requests
response = requests.request(
"POST",
"https://{host}/storage/v1/sync/process",
json={
"args": {
"identityKey": "string",
"fromStorageIdentityKey": "string",
"since": "1970-01-01T00:00:00.000Z",
"paged": {
"limit": 0,
"offset": 0
}
},
"chunk": {
"users": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"transactions": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"outputs": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"outputBaskets": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"provenTxs": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"provenTxReqs": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"syncStates": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
]
}
},
)
data = response.json()
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://{host}/storage/v1/sync/process");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{
"args": {
"identityKey": "string",
"fromStorageIdentityKey": "string",
"since": "1970-01-01T00:00:00.000Z",
"paged": {
"limit": 0,
"offset": 0
}
},
"chunk": {
"users": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"transactions": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"outputs": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"outputBaskets": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"provenTxs": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"provenTxReqs": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"syncStates": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
]
}
}');
$response = curl_exec($ch);
curl_close($ch);
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("POST", "https://{host}/storage/v1/sync/process", strings.NewReader(`{
"args": {
"identityKey": "string",
"fromStorageIdentityKey": "string",
"since": "1970-01-01T00:00:00.000Z",
"paged": {
"limit": 0,
"offset": 0
}
},
"chunk": {
"users": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"transactions": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"outputs": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"outputBaskets": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"provenTxs": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"provenTxReqs": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"syncStates": [
{
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
]
}
}`))
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(string(data))
}
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://{host}/storage/v1/sync/process"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"args\": {\n \"identityKey\": \"string\",\n \"fromStorageIdentityKey\": \"string\",\n \"since\": \"1970-01-01T00:00:00.000Z\",\n \"paged\": {\n \"limit\": 0,\n \"offset\": 0\n }\n },\n \"chunk\": {\n \"users\": [\n {\n \"created_at\": \"1970-01-01T00:00:00.000Z\",\n \"updated_at\": \"1970-01-01T00:00:00.000Z\"\n }\n ],\n \"transactions\": [\n {\n \"created_at\": \"1970-01-01T00:00:00.000Z\",\n \"updated_at\": \"1970-01-01T00:00:00.000Z\"\n }\n ],\n \"outputs\": [\n {\n \"created_at\": \"1970-01-01T00:00:00.000Z\",\n \"updated_at\": \"1970-01-01T00:00:00.000Z\"\n }\n ],\n \"outputBaskets\": [\n {\n \"created_at\": \"1970-01-01T00:00:00.000Z\",\n \"updated_at\": \"1970-01-01T00:00:00.000Z\"\n }\n ],\n \"provenTxs\": [\n {\n \"created_at\": \"1970-01-01T00:00:00.000Z\",\n \"updated_at\": \"1970-01-01T00:00:00.000Z\"\n }\n ],\n \"provenTxReqs\": [\n {\n \"created_at\": \"1970-01-01T00:00:00.000Z\",\n \"updated_at\": \"1970-01-01T00:00:00.000Z\"\n }\n ],\n \"syncStates\": [\n {\n \"created_at\": \"1970-01-01T00:00:00.000Z\",\n \"updated_at\": \"1970-01-01T00:00:00.000Z\"\n }\n ]\n }\n}"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require "net/http"
require "uri"
uri = URI("https://{host}/storage/v1/sync/process")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
request = Net::HTTP::Post.new(uri)
request["Content-Type"] = "application/json"
request.body = "{\n \"args\": {\n \"identityKey\": \"string\",\n \"fromStorageIdentityKey\": \"string\",\n \"since\": \"1970-01-01T00:00:00.000Z\",\n \"paged\": {\n \"limit\": 0,\n \"offset\": 0\n }\n },\n \"chunk\": {\n \"users\": [\n {\n \"created_at\": \"1970-01-01T00:00:00.000Z\",\n \"updated_at\": \"1970-01-01T00:00:00.000Z\"\n }\n ],\n \"transactions\": [\n {\n \"created_at\": \"1970-01-01T00:00:00.000Z\",\n \"updated_at\": \"1970-01-01T00:00:00.000Z\"\n }\n ],\n \"outputs\": [\n {\n \"created_at\": \"1970-01-01T00:00:00.000Z\",\n \"updated_at\": \"1970-01-01T00:00:00.000Z\"\n }\n ],\n \"outputBaskets\": [\n {\n \"created_at\": \"1970-01-01T00:00:00.000Z\",\n \"updated_at\": \"1970-01-01T00:00:00.000Z\"\n }\n ],\n \"provenTxs\": [\n {\n \"created_at\": \"1970-01-01T00:00:00.000Z\",\n \"updated_at\": \"1970-01-01T00:00:00.000Z\"\n }\n ],\n \"provenTxReqs\": [\n {\n \"created_at\": \"1970-01-01T00:00:00.000Z\",\n \"updated_at\": \"1970-01-01T00:00:00.000Z\"\n }\n ],\n \"syncStates\": [\n {\n \"created_at\": \"1970-01-01T00:00:00.000Z\",\n \"updated_at\": \"1970-01-01T00:00:00.000Z\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.body