Create a data export job
curl --request POST \
--url https://api.nexrex.ai/api/v1/developer/v1/exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"start_date": 123,
"end_date": 123,
"format": "both",
"athlete_ids": [
"<string>"
]
}
'import requests
url = "https://api.nexrex.ai/api/v1/developer/v1/exports"
payload = {
"start_date": 123,
"end_date": 123,
"format": "both",
"athlete_ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({start_date: 123, end_date: 123, format: 'both', athlete_ids: ['<string>']})
};
fetch('https://api.nexrex.ai/api/v1/developer/v1/exports', 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.nexrex.ai/api/v1/developer/v1/exports",
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([
'start_date' => 123,
'end_date' => 123,
'format' => 'both',
'athlete_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.nexrex.ai/api/v1/developer/v1/exports"
payload := strings.NewReader("{\n \"start_date\": 123,\n \"end_date\": 123,\n \"format\": \"both\",\n \"athlete_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.nexrex.ai/api/v1/developer/v1/exports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"start_date\": 123,\n \"end_date\": 123,\n \"format\": \"both\",\n \"athlete_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nexrex.ai/api/v1/developer/v1/exports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"start_date\": 123,\n \"end_date\": 123,\n \"format\": \"both\",\n \"athlete_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"export": {
"id": "<string>",
"requester_uid": "<string>",
"org_id": "<string>",
"export_type": "<string>",
"params": {
"start_date": 123,
"end_date": 123,
"athlete_ids": [
"<string>"
],
"actor_type": "api_key",
"api_key_id": "<string>"
},
"file_size_bytes": 123,
"schema_version": "<string>",
"error_message": "<string>",
"skipped_athletes": [
{
"uid": "<string>",
"reason": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
}
}
}{
"success": false,
"error": "<string>",
"request_id": "<string>"
}{
"success": false,
"error": "<string>",
"request_id": "<string>"
}{
"success": false,
"error": "<string>",
"request_id": "<string>"
}{
"success": false,
"error": "<string>",
"request_id": "<string>"
}API Reference
Create a data export job
Enqueues an asynchronous export job for the organization’s activity data. Returns HTTP 202 Accepted with the initial export job record.
Workflow:
POST /exports→ receive export job withstatus: pending- Poll
GET /exports/{export_id}untilstatusiscompletedorfailed GET /exports/{export_id}/download→ receive a pre-signed download URL
Required scope: exports:create
Additional rate limit: 5 requests/hour per key (enforced before the standard per-key limits).
POST
/
exports
Create a data export job
curl --request POST \
--url https://api.nexrex.ai/api/v1/developer/v1/exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"start_date": 123,
"end_date": 123,
"format": "both",
"athlete_ids": [
"<string>"
]
}
'import requests
url = "https://api.nexrex.ai/api/v1/developer/v1/exports"
payload = {
"start_date": 123,
"end_date": 123,
"format": "both",
"athlete_ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({start_date: 123, end_date: 123, format: 'both', athlete_ids: ['<string>']})
};
fetch('https://api.nexrex.ai/api/v1/developer/v1/exports', 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.nexrex.ai/api/v1/developer/v1/exports",
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([
'start_date' => 123,
'end_date' => 123,
'format' => 'both',
'athlete_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.nexrex.ai/api/v1/developer/v1/exports"
payload := strings.NewReader("{\n \"start_date\": 123,\n \"end_date\": 123,\n \"format\": \"both\",\n \"athlete_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.nexrex.ai/api/v1/developer/v1/exports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"start_date\": 123,\n \"end_date\": 123,\n \"format\": \"both\",\n \"athlete_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nexrex.ai/api/v1/developer/v1/exports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"start_date\": 123,\n \"end_date\": 123,\n \"format\": \"both\",\n \"athlete_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"export": {
"id": "<string>",
"requester_uid": "<string>",
"org_id": "<string>",
"export_type": "<string>",
"params": {
"start_date": 123,
"end_date": 123,
"athlete_ids": [
"<string>"
],
"actor_type": "api_key",
"api_key_id": "<string>"
},
"file_size_bytes": 123,
"schema_version": "<string>",
"error_message": "<string>",
"skipped_athletes": [
{
"uid": "<string>",
"reason": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
}
}
}{
"success": false,
"error": "<string>",
"request_id": "<string>"
}{
"success": false,
"error": "<string>",
"request_id": "<string>"
}{
"success": false,
"error": "<string>",
"request_id": "<string>"
}{
"success": false,
"error": "<string>",
"request_id": "<string>"
}Authorizations
bearerAuthapiKeyHeader
Bearer token. Pass the full API key as the bearer credential.
Format: Authorization: Bearer nrx_<key>
Body
application/json
Start of export date range as epoch milliseconds (UTC)
End of export date range as epoch milliseconds (UTC)
Output file format
Available options:
csv, json, both Restrict export to these athlete IDs; omit or null to include all org athletes
Was this page helpful?
⌘I