cURL
curl --request POST \
--url http://collector-eu.rimdian.com/live \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "acme_workspace",
"items": [
{
"kind": "user",
"user": {
"external_id": "test_user_1",
"is_authenticated": false,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"email": "test@website.com",
"first_name": "John",
"last_name": "Doe"
}
}
]
}
'import requests
url = "http://collector-eu.rimdian.com/live"
payload = {
"workspace_id": "acme_workspace",
"items": [
{
"kind": "user",
"user": {
"external_id": "test_user_1",
"is_authenticated": False,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"email": "test@website.com",
"first_name": "John",
"last_name": "Doe"
}
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
workspace_id: 'acme_workspace',
items: [
{
kind: 'user',
user: {
external_id: 'test_user_1',
is_authenticated: false,
created_at: '2024-01-01T00:00:00Z',
updated_at: '2024-01-01T00:00:00Z',
email: 'test@website.com',
first_name: 'John',
last_name: 'Doe'
}
}
]
})
};
fetch('http://collector-eu.rimdian.com/live', 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 => "http://collector-eu.rimdian.com/live",
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([
'workspace_id' => 'acme_workspace',
'items' => [
[
'kind' => 'user',
'user' => [
'external_id' => 'test_user_1',
'is_authenticated' => false,
'created_at' => '2024-01-01T00:00:00Z',
'updated_at' => '2024-01-01T00:00:00Z',
'email' => 'test@website.com',
'first_name' => 'John',
'last_name' => 'Doe'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"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 := "http://collector-eu.rimdian.com/live"
payload := strings.NewReader("{\n \"workspace_id\": \"acme_workspace\",\n \"items\": [\n {\n \"kind\": \"user\",\n \"user\": {\n \"external_id\": \"test_user_1\",\n \"is_authenticated\": false,\n \"created_at\": \"2024-01-01T00:00:00Z\",\n \"updated_at\": \"2024-01-01T00:00:00Z\",\n \"email\": \"test@website.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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("http://collector-eu.rimdian.com/live")
.header("Content-Type", "application/json")
.body("{\n \"workspace_id\": \"acme_workspace\",\n \"items\": [\n {\n \"kind\": \"user\",\n \"user\": {\n \"external_id\": \"test_user_1\",\n \"is_authenticated\": false,\n \"created_at\": \"2024-01-01T00:00:00Z\",\n \"updated_at\": \"2024-01-01T00:00:00Z\",\n \"email\": \"test@website.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://collector-eu.rimdian.com/live")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspace_id\": \"acme_workspace\",\n \"items\": [\n {\n \"kind\": \"user\",\n \"user\": {\n \"external_id\": \"test_user_1\",\n \"is_authenticated\": false,\n \"created_at\": \"2024-01-01T00:00:00Z\",\n \"updated_at\": \"2024-01-01T00:00:00Z\",\n \"email\": \"test@website.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body"queued""task error: ..."Data Collector API
Import live data
Post live data to the Collector for asynchronous processing
POST
/
live
cURL
curl --request POST \
--url http://collector-eu.rimdian.com/live \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "acme_workspace",
"items": [
{
"kind": "user",
"user": {
"external_id": "test_user_1",
"is_authenticated": false,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"email": "test@website.com",
"first_name": "John",
"last_name": "Doe"
}
}
]
}
'import requests
url = "http://collector-eu.rimdian.com/live"
payload = {
"workspace_id": "acme_workspace",
"items": [
{
"kind": "user",
"user": {
"external_id": "test_user_1",
"is_authenticated": False,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"email": "test@website.com",
"first_name": "John",
"last_name": "Doe"
}
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
workspace_id: 'acme_workspace',
items: [
{
kind: 'user',
user: {
external_id: 'test_user_1',
is_authenticated: false,
created_at: '2024-01-01T00:00:00Z',
updated_at: '2024-01-01T00:00:00Z',
email: 'test@website.com',
first_name: 'John',
last_name: 'Doe'
}
}
]
})
};
fetch('http://collector-eu.rimdian.com/live', 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 => "http://collector-eu.rimdian.com/live",
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([
'workspace_id' => 'acme_workspace',
'items' => [
[
'kind' => 'user',
'user' => [
'external_id' => 'test_user_1',
'is_authenticated' => false,
'created_at' => '2024-01-01T00:00:00Z',
'updated_at' => '2024-01-01T00:00:00Z',
'email' => 'test@website.com',
'first_name' => 'John',
'last_name' => 'Doe'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"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 := "http://collector-eu.rimdian.com/live"
payload := strings.NewReader("{\n \"workspace_id\": \"acme_workspace\",\n \"items\": [\n {\n \"kind\": \"user\",\n \"user\": {\n \"external_id\": \"test_user_1\",\n \"is_authenticated\": false,\n \"created_at\": \"2024-01-01T00:00:00Z\",\n \"updated_at\": \"2024-01-01T00:00:00Z\",\n \"email\": \"test@website.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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("http://collector-eu.rimdian.com/live")
.header("Content-Type", "application/json")
.body("{\n \"workspace_id\": \"acme_workspace\",\n \"items\": [\n {\n \"kind\": \"user\",\n \"user\": {\n \"external_id\": \"test_user_1\",\n \"is_authenticated\": false,\n \"created_at\": \"2024-01-01T00:00:00Z\",\n \"updated_at\": \"2024-01-01T00:00:00Z\",\n \"email\": \"test@website.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://collector-eu.rimdian.com/live")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspace_id\": \"acme_workspace\",\n \"items\": [\n {\n \"kind\": \"user\",\n \"user\": {\n \"external_id\": \"test_user_1\",\n \"is_authenticated\": false,\n \"created_at\": \"2024-01-01T00:00:00Z\",\n \"updated_at\": \"2024-01-01T00:00:00Z\",\n \"email\": \"test@website.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body"queued""task error: ..."This endpoint is used by the JavaScript SDK & mobile to send live user activity. Do not post historical data to this endpoint.
Body
application/json
This endpoint is used by the JavaScript SDK & mobile apps to send live data to the Collector for asynchronous processing
Response
Data import response
The response is of type string.
Example:
"queued"
⌘I