Request
GET /api/all-chains
Auth: Bearer token
# Get all transfer chains
curl -X GET "http://service.ssumethods.com/api/all-chains" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
// fetch example: (async)
const getAllChains = async (token) => {
const res = await fetch('http://service.ssumethods.com/api/all-chains', {
headers: { 'Authorization': 'Bearer ' + token, 'Accept': 'application/json' }
});
return await res.json();
};
import requests
r = requests.get("http://service.ssumethods.com/api/all-chains",
headers={"Authorization":"Bearer YOUR_API_TOKEN"})
print(r.json())
<?php
$ch = curl_init("http://service.ssumethods.com/api/all-chains");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_TOKEN"]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
?>
req, _ := http.NewRequest("GET", "http://service.ssumethods.com/api/all-chains", nil)
req.Header.Set("Authorization","Bearer YOUR_API_TOKEN")
resp, _ := http.DefaultClient.Do(req)
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
Simulated Response
This is a client-side simulated response (demo only).
200 OK
{
"success": true,
"data": {
"chains": [
{
"id": 1,
"startDr_id": 101,
"chain": [101,202,303,404],
"length": 4,
"created_at": "2024-01-15T10:30:00Z"
},
{
"id": 2,
"startDr_id": 501,
"chain": [501,601,701],
"length": 3,
"created_at": "2024-01-15T11:45:00Z"
}
],
"total": 2,
"statistics": { "average_length": 3.5, "max_length": 4, "min_length": 3 }
},
"message": "Transfer chains retrieved successfully",
"timestamp": "2024-01-15T12:00:00Z"
}