YunShang API

Call Logs (call_logs)

Returns API call logs. Paginated. Sales/admin only.

API info

ItemValue
EndpointPOST /api.php
actioncall_logs
AuthenticationGlobal APP ID / APP KEY
Role restrictionSales / admin only

Request parameters

ParameterTypeRequiredDescription
pageintNoPage number, default 1
limitintNoItems per page, default 20, max 50

Request example

{
    "action": "call_logs",
    "app_id": "68B0FA47FEC9E7EBC4BF80F8",
    "app_key": "2b901515a427b6c0b68f866eece70e0d2ecf687146022412",
    "page": 1,
    "limit": 20
}

PHP

<?php
$app_id = '68B0FA47FEC9E7EBC4BF80F8';
$app_key = '2b901515a427b6c0b68f866eece70e0d2ecf687146022412';
$url = 'https://yunsapi.com/api.php';

$params = [
    'action'  => 'calllogs',
    'app_id'  => $app_id,
    'app_key' => $app_key,
    'page'    => 1,
    'limit'   => 20,
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

$resp = curl_exec($ch);
curl_close($ch);
echo $resp;

Java

import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class ApiDemo {
    static final String URL = "https://yunsapi.com/api.php";
    static final String APP_ID = "68B0FA47FEC9E7EBC4BF80F8";
    static final String APP_KEY = "2b901515a427b6c0b68f866eece70e0d2ecf687146022412";

    public static void main(String[] args) throws Exception {
        String body = "{\"action\":\"calllogs\",\"app_id\":\"" + APP_ID + "\",\"app_key\":\"" + APP_KEY + "\",\"page\":1,\"limit\":20}";
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest req = HttpRequest.newBuilder()
                .uri(URI.create(URL))
                .header("Content-Type", "application/json")
                .POST(HttpRequest.BodyPublishers.ofString(body))
                .build();
        HttpResponse<String> resp = client.send(req, HttpResponse.BodyHandlers.ofString());
        System.out.println(resp.body());
    }
}

Response example

{
    "code": 0,
    "msg": "success",
    "data": {
        "total": 122,
        "page": 1,
        "limit": 20,
        "list": [
            {
                "id": "1853",
                "api_name": "ID Card 2-Factor",
                "api_code": "idcard2check",
                "request_params": "{\"name\":\"Zhang San\",\"idcard\":\"340322198202181639\"}",
                "response": "{\"cached\":true}",
                "ip": "36.159.183.92",
                "create_time": "2026-08-13 22:49:09"
            }
        ]
    }
}

Response parameters

ParameterTypeDescription
data.totalintTotal records
data.list[].idstringLog ID
data.list[].api_namestringAPI name
data.list[].api_codestringAPI code
data.list[].request_paramsstringRequest params (JSON string)
data.list[].responsestringResponse (JSON string)
data.list[].ipstringClient IP
data.list[].create_timestringCall time