curl --request POST \
--url https://{subdomain}.nudj.cx/api/v2/admin/leaderboards/export \
--header 'Content-Type: application/json' \
--header 'x-admin-user-access-token: <api-key>' \
--header 'x-organisation-id: <x-organisation-id>' \
--data '
{
"configId": "<string>",
"fieldKeys": [],
"inHistoricPeriod": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://{subdomain}.nudj.cx/api/v2/admin/leaderboards/export"
payload = {
"configId": "<string>",
"fieldKeys": [],
"inHistoricPeriod": "2023-11-07T05:31:56Z"
}
headers = {
"x-organisation-id": "<x-organisation-id>",
"x-admin-user-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-organisation-id': '<x-organisation-id>',
'x-admin-user-access-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({configId: '<string>', fieldKeys: [], inHistoricPeriod: '2023-11-07T05:31:56Z'})
};
fetch('https://{subdomain}.nudj.cx/api/v2/admin/leaderboards/export', 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://{subdomain}.nudj.cx/api/v2/admin/leaderboards/export",
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([
'configId' => '<string>',
'fieldKeys' => [
],
'inHistoricPeriod' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-admin-user-access-token: <api-key>",
"x-organisation-id: <x-organisation-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.nudj.cx/api/v2/admin/leaderboards/export"
payload := strings.NewReader("{\n \"configId\": \"<string>\",\n \"fieldKeys\": [],\n \"inHistoricPeriod\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-organisation-id", "<x-organisation-id>")
req.Header.Add("x-admin-user-access-token", "<api-key>")
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://{subdomain}.nudj.cx/api/v2/admin/leaderboards/export")
.header("x-organisation-id", "<x-organisation-id>")
.header("x-admin-user-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"configId\": \"<string>\",\n \"fieldKeys\": [],\n \"inHistoricPeriod\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/admin/leaderboards/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-organisation-id"] = '<x-organisation-id>'
request["x-admin-user-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configId\": \"<string>\",\n \"fieldKeys\": [],\n \"inHistoricPeriod\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body"<string>"{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Export fresh leaderboard rankings
Calculates the selected period once from a fresh database snapshot and streams a complete CSV. Later writes are not included. Requires an authenticated admin user with permission to read XP logs, users and the leaderboard configuration. User identity fields retain community restrictions. Rankings exports allow up to 250000 participants and 64 MiB; exclusions templates allow 10000 rows and 5120000 bytes. Calculation has a 240-second request deadline. No partial file is returned if preparation fails.
curl --request POST \
--url https://{subdomain}.nudj.cx/api/v2/admin/leaderboards/export \
--header 'Content-Type: application/json' \
--header 'x-admin-user-access-token: <api-key>' \
--header 'x-organisation-id: <x-organisation-id>' \
--data '
{
"configId": "<string>",
"fieldKeys": [],
"inHistoricPeriod": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://{subdomain}.nudj.cx/api/v2/admin/leaderboards/export"
payload = {
"configId": "<string>",
"fieldKeys": [],
"inHistoricPeriod": "2023-11-07T05:31:56Z"
}
headers = {
"x-organisation-id": "<x-organisation-id>",
"x-admin-user-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-organisation-id': '<x-organisation-id>',
'x-admin-user-access-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({configId: '<string>', fieldKeys: [], inHistoricPeriod: '2023-11-07T05:31:56Z'})
};
fetch('https://{subdomain}.nudj.cx/api/v2/admin/leaderboards/export', 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://{subdomain}.nudj.cx/api/v2/admin/leaderboards/export",
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([
'configId' => '<string>',
'fieldKeys' => [
],
'inHistoricPeriod' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-admin-user-access-token: <api-key>",
"x-organisation-id: <x-organisation-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.nudj.cx/api/v2/admin/leaderboards/export"
payload := strings.NewReader("{\n \"configId\": \"<string>\",\n \"fieldKeys\": [],\n \"inHistoricPeriod\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-organisation-id", "<x-organisation-id>")
req.Header.Add("x-admin-user-access-token", "<api-key>")
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://{subdomain}.nudj.cx/api/v2/admin/leaderboards/export")
.header("x-organisation-id", "<x-organisation-id>")
.header("x-admin-user-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"configId\": \"<string>\",\n \"fieldKeys\": [],\n \"inHistoricPeriod\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/admin/leaderboards/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-organisation-id"] = '<x-organisation-id>'
request["x-admin-user-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configId\": \"<string>\",\n \"fieldKeys\": [],\n \"inHistoricPeriod\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body"<string>"{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
An admin user access token. Service-only API keys cannot download user identities.
Headers
^[0-9a-fA-F]{24}$Body
^[0-9a-fA-F]{24}$1 - 5 elementsuserId, username, email, externalUserId, displayName rankings, exclusions An ISO date in the selected historic period; omit or pass null for the current period.
Response
CSV from one fixed snapshot
The response is of type string.
Was this page helpful?

