본문으로 건너뛰기

모든 기기 조회 GET ​

계정에 등록된 모든 기기 목록을 가져옵니다.

엔드포인트 ​

GET https://api.pocketalert.app/v1/devices

인증 ​

필수

요청에 다음 헤더 중 하나를 포함하세요:

  • Token: <your-api-key> — API 키에서 발급받으세요
  • Authorization: Bearer <jwt-token> — 로그인에서 발급받은 토큰

요청 ​

헤더 ​

헤더필수설명
Token✅API 키
Authorization✅Bearer <jwt-token>

요청 예시 ​

bash
curl -X GET "https://api.pocketalert.app/v1/devices" \
  -H "Token: your-api-key"
javascript
const response = await fetch('https://api.pocketalert.app/v1/devices', {
  headers: { 'Token': 'your-api-key' }
});

const devices = await response.json();
python
import requests

response = requests.get(
    'https://api.pocketalert.app/v1/devices',
    headers={'Token': 'your-api-key'}
)
print(response.json())
php
$response = Http::withHeaders([
    'Token' => 'your-api-key',
])->get('https://api.pocketalert.app/v1/devices');

return $response->json();

응답 ​

성공 응답 ​

200 OK

기기 객체의 배열을 반환합니다

필드타입설명
tidstring기기의 고유 식별자
namestring기기 이름
serial_numberstring기기 일련번호
is_activeboolean기기 활성화 여부
created_atstring등록 시각
json
[
  {
    "tid": "9dc24hqldvv2bfx2nlc6r",
    "name": "iPhone 15 Pro",
    "serial_number": "123456-OK91-KLAI-8K91-32A0AKSA28X2",
    "is_active": true,
    "created_at": "12.06.2023 02:48:49"
  },
  {
    "tid": "qjxozlq7xr7fakrjplj193",
    "name": "Android Tablet",
    "serial_number": "GP2A.2891092711.017",
    "is_active": true,
    "created_at": "07.06.2023 22:44:47"
  }
]

오류 응답 ​

상태설명
401인증 실패 — 토큰이 잘못되었거나 누락됨

Pocket Alert 문서