GETPOST
v1.0.0stable

Get Device List

Query the authenticated user device list with pagination and status filters.

GET | POST/api/device/list
Auth:API Key

Parametry żądania

Wszystkie parametry mogą być przekazywane za pośrednictwem zapytania lub ciała

ParametrRodzajWymaganeOpis
token
stringWymagane
User API token
Przykład: your_api_token_here
page
numberOpcjonalnie
Page number. Default 1
Przykład: 1
per_page
numberOpcjonalnie
Items per page. Default 20, maximum 100
Przykład: 20
zt
stringOpcjonalnie
Status filter: all, normal, hidden, reviewing, or update
allnormalhiddenreviewingupdate
Przykład: all
shtype
stringOpcjonalnie
After-sales type filter. Separate multiple values with commas
Przykład: 1,2

Odpowiedź

ParametrRodzajWymaganeOpis
code
numberWymagane
Status code: 1=success, others=failure
Przykład: 1
msg
stringWymagane
Response message
Przykład: 获取成功
data.devices
arrayWymagane
Device list
data.devices[].kid
stringWymagane
Device KID
Przykład: KID001
data.devices[].udid
stringWymagane
Device UDID
Przykład: 00008030-001234567890002E
data.devices[].pname
stringWymagane
Device name
Przykład: iPhone 15 Pro
data.devices[].zt
stringWymagane
Device/certificate status
Przykład: normal
data.devices[].ytime
numberWymagane
Membership expiry timestamp. 0 means permanent
Przykład: 1772267945
data.devices[].enabled
booleanWymagane
Whether the device is enabled
Przykład: true
data.total
numberWymagane
Total matched devices
Przykład: 36
data.page
numberWymagane
Current page number
Przykład: 1
data.per_page
numberWymagane
Actual items per page, maximum 100
Przykład: 20
data.last_page
numberWymagane
Last page number
Przykład: 2
data.count_normal
numberWymagane
Normal device count
Przykład: 30
data.count_hidden
numberWymagane
Dropped/banned device count
Przykład: 4
data.count_reviewing
numberWymagane
Reviewing device count
Przykład: 2
Przykład odpowiedzi
{
"code":1,
"msg":"Success",
"time":1769675945,
"data":
{
"devices":
[
{
"kid":"KID001",
"udid":"00008030-001234567890002E",
"pname":"iPhone 15 Pro",
"type":"iphone",
"shtype":1,
"zt":"normal",
"ytime":1772267945,
"model":"iPhone16,1",
"beizhu":"主力设备",
"enabled":true
}
]
,
"total":36,
"page":1,
"per_page":20,
"last_page":2,
"count_normal":30,
"count_hidden":4,
"count_reviewing":2
}
,
"ip":"192.168.1.100",
"ysucc":"Ysucc"
}

Query first page

Get the first 20 devices of the current user

Query first page
{
"token":"your_api_token_here",
"page":1,
"per_page":20
}

Only normal devices

Use zt=normal to return only normal available devices

Only normal devices
{
"token":"your_api_token_here",
"zt":"normal",
"page":1,
"per_page":50
}

Reviewing devices

Use zt=reviewing to return devices still in review/reservation

Reviewing devices
{
"token":"your_api_token_here",
"zt":"reviewing"
}

Maximum 100 items per page

If per_page is greater than 100, the backend automatically caps it at 100

Maximum 100 items per page
{
"token":"your_api_token_here",
"page":1,
"per_page":100
}

Kod błędu

Kod błędu2 zdefiniowane
12
Token is required
Missing token parameter
10
Invalid token
Token does not exist or user status is not allowed

Język odpowiedzi

Dostosuj język odpowiedzi API do nagłówka X- Lang. Poniższe przykłady kodów automatycznie korzystają z aktualnego języka strony.

Zalecany nagłówek
X-Lang: pl
Obsługiwane języki
zh, en, zh-TW, vi, ar, es, ru

Obsługiwane jest również Accept- Language; X- Lang ma pierwszeństwo. Nieobsługiwane języki podążają za zapasami języka strony.

Przykłady kodów

curl -X POST "https://testypro.iwai.cc,https://cer.xyul.cn,https://cer.iwai.cc/api/device/list" \
  -H "X-Lang: pl" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "token=your_api_token_here&page=1&per_page=20&zt=all&shtype=1%2C2"

Uwagi

  • 列表只返回当前 token 用户名下的设备
  • per_page 最大为 100,超过会自动按 100 处理
  • zt=hidden 会包含掉签和待更新状态;zt=reviewing 会返回仍在审核/预约中的设备

Spróbuj w konsoli

Wypełnij poniższe parametry i wyślij wniosek o przetestowanie. Żądania są kierowane tylko do API tej witryny; adres URL jest zablokowany i nie może być zmieniony, a obecne pliki cookie logowania są włączone.

https://testypro.iwai.cc/api/device/list?token=your_api_token_here&page=1&per_page=20&zt=all&shtype=1%2C2Zamknięte na tej stronie
stringWymagane

User API token

number

Page number. Default 1

number

Items per page. Default 20, maximum 100

string

Status filter: all, normal, hidden, reviewing, or update

string

After-sales type filter. Separate multiple values with commas