coding-agents
Report session sync progress
Create or update the sync run for one device.
PUT
/
api
/
me
/
coding-agents
/
sync
/
{device_id}
Report session sync progress
curl --request PUT \
--url https://free.app.nasiko.com/api/me/coding-agents/sync/{device_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agents": [
{
"connected": true,
"detected": true,
"id": "<string>",
"import": {
"done": 1,
"failed": 1,
"sessions": 1,
"total": 1,
"turns": 1,
"error": "<string>",
"pending": 1,
"rejected": 1,
"rejected_reasons": [
{
"count": 1,
"reason": "<string>"
}
]
},
"name": "<string>"
}
],
"device_name": "<string>",
"error": "<string>",
"windows": [
{
"label": "<string>",
"sessions": 1,
"turns": 1
}
]
}
'import requests
url = "https://free.app.nasiko.com/api/me/coding-agents/sync/{device_id}"
payload = {
"agents": [
{
"connected": True,
"detected": True,
"id": "<string>",
"import": {
"done": 1,
"failed": 1,
"sessions": 1,
"total": 1,
"turns": 1,
"error": "<string>",
"pending": 1,
"rejected": 1,
"rejected_reasons": [
{
"count": 1,
"reason": "<string>"
}
]
},
"name": "<string>"
}
],
"device_name": "<string>",
"error": "<string>",
"windows": [
{
"label": "<string>",
"sessions": 1,
"turns": 1
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agents: [
{
connected: true,
detected: true,
id: '<string>',
import: {
done: 1,
failed: 1,
sessions: 1,
total: 1,
turns: 1,
error: '<string>',
pending: 1,
rejected: 1,
rejected_reasons: [{count: 1, reason: '<string>'}]
},
name: '<string>'
}
],
device_name: '<string>',
error: '<string>',
windows: [{label: '<string>', sessions: 1, turns: 1}]
})
};
fetch('https://free.app.nasiko.com/api/me/coding-agents/sync/{device_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://free.app.nasiko.com/api/me/coding-agents/sync/{device_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'agents' => [
[
'connected' => true,
'detected' => true,
'id' => '<string>',
'import' => [
'done' => 1,
'failed' => 1,
'sessions' => 1,
'total' => 1,
'turns' => 1,
'error' => '<string>',
'pending' => 1,
'rejected' => 1,
'rejected_reasons' => [
[
'count' => 1,
'reason' => '<string>'
]
]
],
'name' => '<string>'
]
],
'device_name' => '<string>',
'error' => '<string>',
'windows' => [
[
'label' => '<string>',
'sessions' => 1,
'turns' => 1
]
]
]),
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://free.app.nasiko.com/api/me/coding-agents/sync/{device_id}"
payload := strings.NewReader("{\n \"agents\": [\n {\n \"connected\": true,\n \"detected\": true,\n \"id\": \"<string>\",\n \"import\": {\n \"done\": 1,\n \"failed\": 1,\n \"sessions\": 1,\n \"total\": 1,\n \"turns\": 1,\n \"error\": \"<string>\",\n \"pending\": 1,\n \"rejected\": 1,\n \"rejected_reasons\": [\n {\n \"count\": 1,\n \"reason\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\"\n }\n ],\n \"device_name\": \"<string>\",\n \"error\": \"<string>\",\n \"windows\": [\n {\n \"label\": \"<string>\",\n \"sessions\": 1,\n \"turns\": 1\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://free.app.nasiko.com/api/me/coding-agents/sync/{device_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agents\": [\n {\n \"connected\": true,\n \"detected\": true,\n \"id\": \"<string>\",\n \"import\": {\n \"done\": 1,\n \"failed\": 1,\n \"sessions\": 1,\n \"total\": 1,\n \"turns\": 1,\n \"error\": \"<string>\",\n \"pending\": 1,\n \"rejected\": 1,\n \"rejected_reasons\": [\n {\n \"count\": 1,\n \"reason\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\"\n }\n ],\n \"device_name\": \"<string>\",\n \"error\": \"<string>\",\n \"windows\": [\n {\n \"label\": \"<string>\",\n \"sessions\": 1,\n \"turns\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://free.app.nasiko.com/api/me/coding-agents/sync/{device_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agents\": [\n {\n \"connected\": true,\n \"detected\": true,\n \"id\": \"<string>\",\n \"import\": {\n \"done\": 1,\n \"failed\": 1,\n \"sessions\": 1,\n \"total\": 1,\n \"turns\": 1,\n \"error\": \"<string>\",\n \"pending\": 1,\n \"rejected\": 1,\n \"rejected_reasons\": [\n {\n \"count\": 1,\n \"reason\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\"\n }\n ],\n \"device_name\": \"<string>\",\n \"error\": \"<string>\",\n \"windows\": [\n {\n \"label\": \"<string>\",\n \"sessions\": 1,\n \"turns\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"agents": [
{
"connected": true,
"detected": true,
"id": "<string>",
"import": {
"done": 1,
"failed": 1,
"sessions": 1,
"status": "waiting",
"total": 1,
"turns": 1,
"error": "<string>",
"pending": 1,
"rejected": 1,
"rejected_reasons": [
{
"count": 1,
"reason": "<string>"
}
]
},
"name": "<string>"
}
],
"client": "desktop",
"device_id": "<string>",
"device_name": "<string>",
"phase": "awaiting_consent",
"updated_at": "2023-11-07T05:31:56Z",
"windows": [
{
"label": "<string>",
"sessions": 1,
"status": "waiting",
"turns": 1
}
],
"error": "<string>",
"retry_requested_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z"
}Authorizations
Body
application/json
The body a local client sends to PUT /api/me/coding-agents/sync/{device_id}.
Response
The stored run
One device's latest run, as stored.
⌘I
Report session sync progress
curl --request PUT \
--url https://free.app.nasiko.com/api/me/coding-agents/sync/{device_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agents": [
{
"connected": true,
"detected": true,
"id": "<string>",
"import": {
"done": 1,
"failed": 1,
"sessions": 1,
"total": 1,
"turns": 1,
"error": "<string>",
"pending": 1,
"rejected": 1,
"rejected_reasons": [
{
"count": 1,
"reason": "<string>"
}
]
},
"name": "<string>"
}
],
"device_name": "<string>",
"error": "<string>",
"windows": [
{
"label": "<string>",
"sessions": 1,
"turns": 1
}
]
}
'import requests
url = "https://free.app.nasiko.com/api/me/coding-agents/sync/{device_id}"
payload = {
"agents": [
{
"connected": True,
"detected": True,
"id": "<string>",
"import": {
"done": 1,
"failed": 1,
"sessions": 1,
"total": 1,
"turns": 1,
"error": "<string>",
"pending": 1,
"rejected": 1,
"rejected_reasons": [
{
"count": 1,
"reason": "<string>"
}
]
},
"name": "<string>"
}
],
"device_name": "<string>",
"error": "<string>",
"windows": [
{
"label": "<string>",
"sessions": 1,
"turns": 1
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agents: [
{
connected: true,
detected: true,
id: '<string>',
import: {
done: 1,
failed: 1,
sessions: 1,
total: 1,
turns: 1,
error: '<string>',
pending: 1,
rejected: 1,
rejected_reasons: [{count: 1, reason: '<string>'}]
},
name: '<string>'
}
],
device_name: '<string>',
error: '<string>',
windows: [{label: '<string>', sessions: 1, turns: 1}]
})
};
fetch('https://free.app.nasiko.com/api/me/coding-agents/sync/{device_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://free.app.nasiko.com/api/me/coding-agents/sync/{device_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'agents' => [
[
'connected' => true,
'detected' => true,
'id' => '<string>',
'import' => [
'done' => 1,
'failed' => 1,
'sessions' => 1,
'total' => 1,
'turns' => 1,
'error' => '<string>',
'pending' => 1,
'rejected' => 1,
'rejected_reasons' => [
[
'count' => 1,
'reason' => '<string>'
]
]
],
'name' => '<string>'
]
],
'device_name' => '<string>',
'error' => '<string>',
'windows' => [
[
'label' => '<string>',
'sessions' => 1,
'turns' => 1
]
]
]),
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://free.app.nasiko.com/api/me/coding-agents/sync/{device_id}"
payload := strings.NewReader("{\n \"agents\": [\n {\n \"connected\": true,\n \"detected\": true,\n \"id\": \"<string>\",\n \"import\": {\n \"done\": 1,\n \"failed\": 1,\n \"sessions\": 1,\n \"total\": 1,\n \"turns\": 1,\n \"error\": \"<string>\",\n \"pending\": 1,\n \"rejected\": 1,\n \"rejected_reasons\": [\n {\n \"count\": 1,\n \"reason\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\"\n }\n ],\n \"device_name\": \"<string>\",\n \"error\": \"<string>\",\n \"windows\": [\n {\n \"label\": \"<string>\",\n \"sessions\": 1,\n \"turns\": 1\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://free.app.nasiko.com/api/me/coding-agents/sync/{device_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agents\": [\n {\n \"connected\": true,\n \"detected\": true,\n \"id\": \"<string>\",\n \"import\": {\n \"done\": 1,\n \"failed\": 1,\n \"sessions\": 1,\n \"total\": 1,\n \"turns\": 1,\n \"error\": \"<string>\",\n \"pending\": 1,\n \"rejected\": 1,\n \"rejected_reasons\": [\n {\n \"count\": 1,\n \"reason\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\"\n }\n ],\n \"device_name\": \"<string>\",\n \"error\": \"<string>\",\n \"windows\": [\n {\n \"label\": \"<string>\",\n \"sessions\": 1,\n \"turns\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://free.app.nasiko.com/api/me/coding-agents/sync/{device_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agents\": [\n {\n \"connected\": true,\n \"detected\": true,\n \"id\": \"<string>\",\n \"import\": {\n \"done\": 1,\n \"failed\": 1,\n \"sessions\": 1,\n \"total\": 1,\n \"turns\": 1,\n \"error\": \"<string>\",\n \"pending\": 1,\n \"rejected\": 1,\n \"rejected_reasons\": [\n {\n \"count\": 1,\n \"reason\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\"\n }\n ],\n \"device_name\": \"<string>\",\n \"error\": \"<string>\",\n \"windows\": [\n {\n \"label\": \"<string>\",\n \"sessions\": 1,\n \"turns\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"agents": [
{
"connected": true,
"detected": true,
"id": "<string>",
"import": {
"done": 1,
"failed": 1,
"sessions": 1,
"status": "waiting",
"total": 1,
"turns": 1,
"error": "<string>",
"pending": 1,
"rejected": 1,
"rejected_reasons": [
{
"count": 1,
"reason": "<string>"
}
]
},
"name": "<string>"
}
],
"client": "desktop",
"device_id": "<string>",
"device_name": "<string>",
"phase": "awaiting_consent",
"updated_at": "2023-11-07T05:31:56Z",
"windows": [
{
"label": "<string>",
"sessions": 1,
"status": "waiting",
"turns": 1
}
],
"error": "<string>",
"retry_requested_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z"
}