Obținere Analytics pentru pagina utilizatorului
curl --request POST \
--url https://server.codeium.com/api/v1/UserPageAnalytics \
--header 'Content-Type: application/json' \
--data '
{
"service_key": "<string>",
"group_name": "<string>",
"start_timestamp": "<string>",
"end_timestamp": "<string>"
}
'import requests
url = "https://server.codeium.com/api/v1/UserPageAnalytics"
payload = {
"service_key": "<string>",
"group_name": "<string>",
"start_timestamp": "<string>",
"end_timestamp": "<string>"
}
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({
service_key: '<string>',
group_name: '<string>',
start_timestamp: '<string>',
end_timestamp: '<string>'
})
};
fetch('https://server.codeium.com/api/v1/UserPageAnalytics', 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://server.codeium.com/api/v1/UserPageAnalytics",
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([
'service_key' => '<string>',
'group_name' => '<string>',
'start_timestamp' => '<string>',
'end_timestamp' => '<string>'
]),
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 := "https://server.codeium.com/api/v1/UserPageAnalytics"
payload := strings.NewReader("{\n \"service_key\": \"<string>\",\n \"group_name\": \"<string>\",\n \"start_timestamp\": \"<string>\",\n \"end_timestamp\": \"<string>\"\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("https://server.codeium.com/api/v1/UserPageAnalytics")
.header("Content-Type", "application/json")
.body("{\n \"service_key\": \"<string>\",\n \"group_name\": \"<string>\",\n \"start_timestamp\": \"<string>\",\n \"end_timestamp\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.codeium.com/api/v1/UserPageAnalytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"service_key\": \"<string>\",\n \"group_name\": \"<string>\",\n \"start_timestamp\": \"<string>\",\n \"end_timestamp\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"userTableStats": [
{
"name": "<string>",
"email": "<string>",
"lastUpdateTime": "<string>",
"apiKey": "<string>",
"activeDays": 123,
"disableCodeium": true,
"lastAutocompleteUsageTime": "<string>",
"lastChatUsageTime": "<string>",
"lastCommandUsageTime": "<string>",
"teamStatus": "<string>"
}
],
"error": "<string>"
}Analytics API
Obținere Analytics pentru pagina utilizatorului
Recuperează statistici privind activitatea utilizatorilor, inclusiv nume, emails, ultimele momente de activitate și zilele active, din pagina Teams.
POST
/
api
/
v1
/
UserPageAnalytics
Obținere Analytics pentru pagina utilizatorului
curl --request POST \
--url https://server.codeium.com/api/v1/UserPageAnalytics \
--header 'Content-Type: application/json' \
--data '
{
"service_key": "<string>",
"group_name": "<string>",
"start_timestamp": "<string>",
"end_timestamp": "<string>"
}
'import requests
url = "https://server.codeium.com/api/v1/UserPageAnalytics"
payload = {
"service_key": "<string>",
"group_name": "<string>",
"start_timestamp": "<string>",
"end_timestamp": "<string>"
}
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({
service_key: '<string>',
group_name: '<string>',
start_timestamp: '<string>',
end_timestamp: '<string>'
})
};
fetch('https://server.codeium.com/api/v1/UserPageAnalytics', 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://server.codeium.com/api/v1/UserPageAnalytics",
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([
'service_key' => '<string>',
'group_name' => '<string>',
'start_timestamp' => '<string>',
'end_timestamp' => '<string>'
]),
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 := "https://server.codeium.com/api/v1/UserPageAnalytics"
payload := strings.NewReader("{\n \"service_key\": \"<string>\",\n \"group_name\": \"<string>\",\n \"start_timestamp\": \"<string>\",\n \"end_timestamp\": \"<string>\"\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("https://server.codeium.com/api/v1/UserPageAnalytics")
.header("Content-Type", "application/json")
.body("{\n \"service_key\": \"<string>\",\n \"group_name\": \"<string>\",\n \"start_timestamp\": \"<string>\",\n \"end_timestamp\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.codeium.com/api/v1/UserPageAnalytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"service_key\": \"<string>\",\n \"group_name\": \"<string>\",\n \"start_timestamp\": \"<string>\",\n \"end_timestamp\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"userTableStats": [
{
"name": "<string>",
"email": "<string>",
"lastUpdateTime": "<string>",
"apiKey": "<string>",
"activeDays": 123,
"disableCodeium": true,
"lastAutocompleteUsageTime": "<string>",
"lastChatUsageTime": "<string>",
"lastCommandUsageTime": "<string>",
"teamStatus": "<string>"
}
],
"error": "<string>"
}Prezentare generală
Solicitare
Cheia ta de serviciu cu permisiuni „Teams Read-only”
Filtrează rezultatele la utilizatorii dintr-un anumit grup (opțional)
Ora de început în format RFC 3339 (de ex.,
2023-01-01T00:00:00Z)Ora de sfârșit în format RFC 3339 (de ex.,
2023-12-31T23:59:59Z)Exemplu de solicitare
curl -X POST --header "Content-Type: application/json" \
--data '{
"service_key": "your_service_key_here",
"group_name": "engineering_team",
"start_timestamp": "2024-01-01T00:00:00Z",
"end_timestamp": "2024-12-31T23:59:59Z"
}' \
https://server.codeium.com/api/v1/UserPageAnalytics
Răspuns
Tablou de obiecte cu statistici despre utilizatori
Afișează Obiect statistici utilizator
Afișează Obiect statistici utilizator
Numele afișat al utilizatorului
Adresa de e-mail a utilizatorului
Marcaj temporal al ultimei activități a utilizatorului, în format RFC 3339
Versiunea hash a cheii API a utilizatorului
Numărul total de zile în care utilizatorul a fost activ în intervalul de timp interogat
Indică dacă accesul la Windsurf a fost dezactivat pentru utilizator de către un administrator. Acest câmp este prezent doar dacă accesul a fost dezactivat în mod explicit și va fi întotdeauna setat la true în acest caz.
Cel mai recent marcaj temporal la care a fost utilizată modalitatea Tab/Autocomplete, în format RFC 3339
Cel mai recent marcaj temporal la care a fost utilizată modalitatea Cascade, în format RFC 3339
Cel mai recent marcaj temporal la care a fost utilizată modalitatea Command, în format RFC 3339
Starea calității de membru a utilizatorului în echipă. Valori posibile:
USER_TEAM_STATUS_UNSPECIFIED, USER_TEAM_STATUS_PENDING, USER_TEAM_STATUS_APPROVED, USER_TEAM_STATUS_REJECTED. Rețineți că API-ul returnează toți utilizatorii, indiferent de starea echipei, în timp ce interfața Manage Members afișează doar utilizatorii aprobați.Exemplu de răspuns
{
"userTableStats": [
{
"name": "Alice",
"email": "alice@windsurf.com",
"lastUpdateTime": "2024-10-10T22:56:10.771591Z",
"apiKey": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"activeDays": 178,
"teamStatus": "USER_TEAM_STATUS_APPROVED"
},
{
"name": "Bob",
"email": "bob@windsurf.com",
"lastUpdateTime": "2024-10-10T18:11:23.980237Z",
"apiKey": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
"activeDays": 462,
"teamStatus": "USER_TEAM_STATUS_APPROVED"
},
{
"name": "Charlie",
"email": "charlie@windsurf.com",
"lastUpdateTime": "2024-10-10T16:43:46.117870Z",
"apiKey": "cccccccc-cccc-cccc-cccc-cccccccccccc",
"activeDays": 237,
"teamStatus": "USER_TEAM_STATUS_PENDING"
}
]
}
Răspunsuri de eroare
Mesaj de eroare care descrie problema apărută
- Cheie de serviciu invalidă sau permisiuni insuficiente
- Format invalid pentru marcajul temporal
- Grupul nu a fost găsit
- Limita de rată a fost depășită
⌘I