Создать снапшот отчёта (§27)
Формирует отчёт, фиксирует dataCutoff, сохраняет result + манифест операций + canonical sha256. Снапшот immutable: не меняется при ретро-матче, переименованиях и изменении курса. Результат > ~900KB → REPORT_PERIOD_TOO_LARGE (сузьте фильтры).
curl -X POST "https://policy-engine-rest.ezig.workers.dev/api/v1/vaults/demo_vault/report-snapshots" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"reportType": "counterparty_activity",
"parameters": {}
}'
import requests
import json
url = "https://policy-engine-rest.ezig.workers.dev/api/v1/vaults/demo_vault/report-snapshots"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"reportType": "counterparty_activity",
"parameters": {}
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://policy-engine-rest.ezig.workers.dev/api/v1/vaults/demo_vault/report-snapshots", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"reportType": "counterparty_activity",
"parameters": {}
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"reportType": "counterparty_activity",
"parameters": {}
}`)
req, err := http.NewRequest("POST", "https://policy-engine-rest.ezig.workers.dev/api/v1/vaults/demo_vault/report-snapshots", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://policy-engine-rest.ezig.workers.dev/api/v1/vaults/demo_vault/report-snapshots')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"reportType": "counterparty_activity",
"parameters": {}
}'
response = http.request(request)
puts response.body
{
"id": "example_string",
"vaultId": "example_string",
"reportType": "example_string",
"status": "example_string",
"schemaVersion": "example_string",
"parametersJson": {},
"normalizedParametersHash": "example_string",
"result": {},
"resultHash": "example_string",
"resultStorageKey": "example_string",
"rowCount": 3.14,
"includedOperationKeysJson": [
"example_string"
],
"includedOperationKeysStorageKey": "example_string",
"dataCutoffAt": "example_string",
"dataCutoffBlock": 3.14,
"counterpartyClassificationMode": "example_string",
"folderClassificationMode": "example_string",
"errorCode": "example_string",
"errorMessage": "example_string",
"generatedById": "example_string",
"generatedAt": "example_string",
"createdAt": "example_string",
"deletedAt": "example_string"
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Internal Server Error",
"message": "An unexpected error occurred on the server",
"code": 500,
"requestId": "req_1234567890"
}
POST
/api/v1/vaults/{code}/report-snapshotsPOST
Base URLstring
Target server for requests. Edit to use your own host.
Bearer Token
Bearer Tokenstring
Requiredbetter-auth session token. Мобилка/сервисы. Веб использует cookie.
better-auth session token. Мобилка/сервисы. Веб использует cookie.
API Key (cookie: better-auth.session_token)
better-auth.session_tokenstring
RequiredAPI key (sent in cookie)
path
codestring
RequiredУникальный код Vault'а (slug)
Content-Typestring
RequiredThe media type of the request body
Options: application/json
reportTypestring
RequiredOptions: counterparty_activity, counterparty_group_activity, transaction_activity, asset_movement, address_activity, balance_position, account_statement, approval_activity, operations_exceptions, category_analytics
Request Preview
Response
Response will appear here after sending the request
Authentication
header
Authorizationstring
RequiredBearer token. better-auth session token. Мобилка/сервисы. Веб использует cookie.
path
parameterstring
RequiredAPI Key for authentication. Provide your API key in the cookie.
Path Parameters
Body
application/json
reportTypestring
RequiredAllowed values:
counterparty_activitycounterparty_group_activitytransaction_activityasset_movementaddress_activitybalance_positionaccount_statementapproval_activityoperations_exceptionscategory_analyticsResponses
Was this page helpful?