curl --request GET \
--url https://api.privy.io/v1/aggregations/{aggregation_id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'privy-app-id: <privy-app-id>'HttpResponse<String> response = Unirest.get("https://api.privy.io/v1/aggregations/{aggregation_id}")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.asString();const options = {
method: 'GET',
headers: {'privy-app-id': '<privy-app-id>', Authorization: 'Basic <encoded-value>'}
};
fetch('https://api.privy.io/v1/aggregations/{aggregation_id}', 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.privy.io/v1/aggregations/{aggregation_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"privy-app-id: <privy-app-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.privy.io/v1/aggregations/{aggregation_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("privy-app-id", "<privy-app-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"name": "<string>",
"method": "eth_signTransaction",
"metric": {
"field": "<string>",
"field_source": "<string>",
"function": "sum",
"abi": [
{
"type": "function",
"name": "<string>",
"inputs": [
{
"type": "<string>",
"name": "<string>",
"components": [
{}
],
"indexed": true,
"internalType": "<string>"
}
],
"outputs": [
{
"type": "<string>",
"name": "<string>",
"components": [
{}
],
"indexed": true,
"internalType": "<string>"
}
],
"stateMutability": "pure",
"anonymous": true
}
]
},
"window": {
"type": "rolling",
"seconds": 131400
},
"id": "<string>",
"created_at": 123,
"owner_id": "<string>",
"conditions": [],
"group_by": []
}Get aggregation
Get an aggregation by aggregation ID.
curl --request GET \
--url https://api.privy.io/v1/aggregations/{aggregation_id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'privy-app-id: <privy-app-id>'HttpResponse<String> response = Unirest.get("https://api.privy.io/v1/aggregations/{aggregation_id}")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.asString();const options = {
method: 'GET',
headers: {'privy-app-id': '<privy-app-id>', Authorization: 'Basic <encoded-value>'}
};
fetch('https://api.privy.io/v1/aggregations/{aggregation_id}', 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.privy.io/v1/aggregations/{aggregation_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"privy-app-id: <privy-app-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.privy.io/v1/aggregations/{aggregation_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("privy-app-id", "<privy-app-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"name": "<string>",
"method": "eth_signTransaction",
"metric": {
"field": "<string>",
"field_source": "<string>",
"function": "sum",
"abi": [
{
"type": "function",
"name": "<string>",
"inputs": [
{
"type": "<string>",
"name": "<string>",
"components": [
{}
],
"indexed": true,
"internalType": "<string>"
}
],
"outputs": [
{
"type": "<string>",
"name": "<string>",
"components": [
{}
],
"indexed": true,
"internalType": "<string>"
}
],
"stateMutability": "pure",
"anonymous": true
}
]
},
"window": {
"type": "rolling",
"seconds": 131400
},
"id": "<string>",
"created_at": 123,
"owner_id": "<string>",
"conditions": [],
"group_by": []
}Authorizations
Basic Auth header with your app ID as the username and your app secret as the password.
Headers
ID of your Privy app.
Path Parameters
1Response
Requested aggregation object.
An aggregation that measures and tracks metrics over a period of time.
The name of the aggregation.
1 - 255The RPC method this aggregation applies to.
eth_signTransaction, eth_signUserOperation The metric configuration for an aggregation, defining what field/field_source to measure and the aggregation function to apply.
Show child attributes
Show child attributes
The time window configuration for an aggregation.
Show child attributes
Show child attributes
Unique ID of the aggregation.
Unix timestamp of when the aggregation was created in milliseconds.
The key quorum ID of the owner of the aggregation.
Optional conditions to filter events before aggregation.
100The verbatim Ethereum transaction object in an eth_signTransaction or eth_sendTransaction request.
- EthereumTransactionCondition
- EthereumCalldataCondition
- EthereumTypedDataDomainCondition
- EthereumTypedDataMessageCondition
- Ethereum7702AuthorizationCondition
- TempoTransactionCondition
- SolanaProgramInstructionCondition
- SolanaSystemProgramInstructionCondition
- SolanaTokenProgramInstructionCondition
- SystemCondition
- TronTransactionCondition
- TronCalldataCondition
- XrplTransactionCondition
- SuiTransactionCommandCondition
- SuiTransferObjectsCommandCondition
- ActionRequestBodyCondition
- AggregationCondition
- MessageSigningCondition
Show child attributes
Show child attributes
Optional grouping configuration for bucketing metrics.
2Show child attributes
Show child attributes
Was this page helpful?

