Skip to content
CCPEDIAby Unity Nodes
Documentation/Canton Network Docs/Splice APIsScan APIsScan APIView on Canton Network Docs

POST /v0/admin/sv/voteresults/count

POST
/
api
/
scan
/
v0
/
admin
/
sv
/
voteresults
/
count
Try it
cURL
Python
JavaScript
PHP
Go
Java
Ruby
curl --request POST \
  --url 'https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/admin/sv/voteresults/count' \
  --header 'Content-Type: application/json' \
  --data '{
  "actionName": "<string>",
  "accepted": false,
  "requester": "<string>",
  "effectiveFrom": "<string>",
  "effectiveTo": "<string>"
}'
import json
import requests

url = "https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/admin/sv/voteresults/count"
headers = {'Content-Type': 'application/json'}
payload = json.loads(r'''{
  "actionName": "<string>",
  "accepted": false,
  "requester": "<string>",
  "effectiveFrom": "<string>",
  "effectiveTo": "<string>"
}''')
response = requests.request(
    "POST", url, headers=headers, json=payload
)

print(response.text)
const response = await fetch('https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/admin/sv/voteresults/count', {
  method: 'POST',
  headers: {
  "Content-Type": "application/json"
},
  body: JSON.stringify({
  "actionName": "<string>",
  "accepted": false,
  "requester": "<string>",
  "effectiveFrom": "<string>",
  "effectiveTo": "<string>"
}),
});

console.log(await response.text());
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/admin/sv/voteresults/count',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => <<<'JSON'
{
  "actionName": "<string>",
  "accepted": false,
  "requester": "<string>",
  "effectiveFrom": "<string>",
  "effectiveTo": "<string>"
}
JSON,
    CURLOPT_HTTPHEADER => [
        "Content-Type: application/json"
    ],
]);

$response = curl_exec($curl);
echo $response;
package main

import (
  "bytes"
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("POST", "https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/admin/sv/voteresults/count", bytes.NewBufferString(`{
  "actionName": "<string>",
  "accepted": false,
  "requester": "<string>",
  "effectiveFrom": "<string>",
  "effectiveTo": "<string>"
}`))
  req.Header.Set("Content-Type", "application/json")
  response, _ := http.DefaultClient.Do(req)
  defer response.Body.Close()
  body, _ := io.ReadAll(response.Body)
  fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

var request = HttpRequest.newBuilder()
    .uri(URI.create("https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/admin/sv/voteresults/count"))
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("""
{
  "actionName": "<string>",
  "accepted": false,
  "requester": "<string>",
  "effectiveFrom": "<string>",
  "effectiveTo": "<string>"
}
"""))
    .build();
var response = HttpClient.newHttpClient().send(
    request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require 'net/http'
require 'uri'

uri = URI('https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/admin/sv/voteresults/count')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = <<~JSON
{
  "actionName": "<string>",
  "accepted": false,
  "requester": "<string>",
  "effectiveFrom": "<string>",
  "effectiveTo": "<string>"
}
JSON
response = Net::HTTP.start(uri.hostname, uri.port) do |http|
  http.request(request)
end
puts response.body
200
{
  "count": 123
}

Count all vote results matching the request filters.

cURL
Python
JavaScript
PHP
Go
Java
Ruby
curl --request POST \
  --url 'https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/admin/sv/voteresults/count' \
  --header 'Content-Type: application/json' \
  --data '{
  "actionName": "<string>",
  "accepted": false,
  "requester": "<string>",
  "effectiveFrom": "<string>",
  "effectiveTo": "<string>"
}'
import json
import requests

url = "https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/admin/sv/voteresults/count"
headers = {'Content-Type': 'application/json'}
payload = json.loads(r'''{
  "actionName": "<string>",
  "accepted": false,
  "requester": "<string>",
  "effectiveFrom": "<string>",
  "effectiveTo": "<string>"
}''')
response = requests.request(
    "POST", url, headers=headers, json=payload
)

print(response.text)
const response = await fetch('https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/admin/sv/voteresults/count', {
  method: 'POST',
  headers: {
  "Content-Type": "application/json"
},
  body: JSON.stringify({
  "actionName": "<string>",
  "accepted": false,
  "requester": "<string>",
  "effectiveFrom": "<string>",
  "effectiveTo": "<string>"
}),
});

console.log(await response.text());
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/admin/sv/voteresults/count',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => <<<'JSON'
{
  "actionName": "<string>",
  "accepted": false,
  "requester": "<string>",
  "effectiveFrom": "<string>",
  "effectiveTo": "<string>"
}
JSON,
    CURLOPT_HTTPHEADER => [
        "Content-Type: application/json"
    ],
]);

$response = curl_exec($curl);
echo $response;
package main

import (
  "bytes"
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("POST", "https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/admin/sv/voteresults/count", bytes.NewBufferString(`{
  "actionName": "<string>",
  "accepted": false,
  "requester": "<string>",
  "effectiveFrom": "<string>",
  "effectiveTo": "<string>"
}`))
  req.Header.Set("Content-Type", "application/json")
  response, _ := http.DefaultClient.Do(req)
  defer response.Body.Close()
  body, _ := io.ReadAll(response.Body)
  fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

var request = HttpRequest.newBuilder()
    .uri(URI.create("https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/admin/sv/voteresults/count"))
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("""
{
  "actionName": "<string>",
  "accepted": false,
  "requester": "<string>",
  "effectiveFrom": "<string>",
  "effectiveTo": "<string>"
}
"""))
    .build();
var response = HttpClient.newHttpClient().send(
    request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require 'net/http'
require 'uri'

uri = URI('https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/admin/sv/voteresults/count')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = <<~JSON
{
  "actionName": "<string>",
  "accepted": false,
  "requester": "<string>",
  "effectiveFrom": "<string>",
  "effectiveTo": "<string>"
}
JSON
response = Net::HTTP.start(uri.hostname, uri.port) do |http|
  http.request(request)
end
puts response.body
200
{
  "count": 123
}

Body

application/json
actionName
string
accepted
boolean
requester
string
effectiveFrom
string
effectiveTo
string

Responses

200

ok
application/json
count
integer (int64)
required
Total number of vote results matching the request filters.

History

Added0.6.13