콘텐츠로 이동

기기 목록

GET
/api/v1/stations/{station_id}/devices
curl --request GET \
--url 'https://dev.api.endueos.com/api/v1/stations/stn_01J9ZK3Q8M4XW7D2N5R6T0V1BC/devices?type=actual&kind=chrome' \
--header 'Authorization: Bearer <token>'

최신 등록순. virtual 의 컴퓨트 정보는 한 번에 모아 붙인다. online 은 접속·끊김의 전이 기준이다 (목록에서는 지연 생존 확인을 하지 않는다).

가이드 — 기기

station_id
필수
string
/^stn_[0-9A-HJKMNP-TV-Z]{26}$/
예시
stn_01J9ZK3Q8M4XW7D2N5R6T0V1BC
type
string
허용 값: actual virtual
kind
string
허용 값: chrome mac android linux windows
page
integer format: int32

1 부터. 기본 1.

limit
integer format: int32

기본 20, 최대 200 (넘으면 200 으로 줄인다).

성공.

Media typeapplication/json
object
data
필수
Array<object>

OS 가 관리하는 기기. actual(사용자의 기기)과 virtual(플랫폼이 띄운 VM) 둘이다. id 는 Resource 와 같은 res_ 다 — /resources/{resource_id} 는 같은 기기를 v0.1.0 의 Resource 모양으로 보여 준다.

object
device_id
필수

Device 의 id — Resource 와 같은 res_ 다 (v0.1.0 이 이미 냈다).

string
/^res_[0-9A-HJKMNP-TV-Z]{26}$/
station_id
필수
string
/^stn_[0-9A-HJKMNP-TV-Z]{26}$/
type
필수
string
허용 값: actual virtual
kind
필수
string
허용 값: chrome mac android linux windows
name
필수
string
description
필수
Any of:
string
labels
필수
object
status
필수

등록 상태 (Resource 의 status 와 같다).

string
허용 값: pending active disabled
online
필수

에이전트가 접속해 있고 핸드셰이크를 마쳤다. Resource 의 online 과 같은 규칙.

boolean
compute_status
필수
Any of:

Virtual Device 의 컴퓨트 상태. actual 이면 compute_status 가 null 이다.

string
허용 값: provisioning starting running stopping stopped failed deleting
status_reason
필수
Any of:
string
size
필수
Any of:

컴퓨트 크기. small 1 vCPU·1 GiB, medium 2 vCPU·4 GiB, large 4 vCPU·8 GiB — 공급자가 가장 가까운 사양으로 맞춘다.

string
허용 값: small medium large
workloads
필수

Actual 은 agent 하나, virtual 은 vm·storage(없을 수 있다)·agent.

Array<object>
One of: discriminator: type

Virtual Device 의 컴퓨트 한 대.

object
type
필수
string
허용 값: vm
workload_id
필수
string
/^wkl_[0-9A-HJKMNP-TV-Z]{26}$/
status
필수
string
허용 값: pending starting running stopping stopped failed destroyed
provider
필수

컴퓨트 공급자 — local(로컬 컨테이너)·fly·aws·vultr 등.

string
region
필수
Any of:
string
cpus
필수
integer format: int32
memory_mb
필수
integer format: int32
started_at
필수
Any of:
string format: date-time
stopped_at
필수
Any of:
string format: date-time
agent_version
필수
Any of:
string
os
필수
Any of:
string
arch
필수
Any of:
string
facts
필수

에이전트가 알려 준 기기 정보. 끊겨도 지워지지 않는다.

object
tool_count
필수
integer format: int32
last_connected_at
필수
Any of:
string format: date-time
last_seen_at
필수
Any of:
string format: date-time
last_disconnected_at
필수
Any of:
string format: date-time
started_at
필수
Any of:
string format: date-time
stopped_at
필수
Any of:
string format: date-time
created_at
필수
string format: date-time
updated_at
필수
string format: date-time
meta
필수
object
request_id
필수
string
timestamp
필수
string format: date-time
duration

서버 처리 시간(ms).

integer format: int32
pagination
필수
object
page
필수
integer format: int32
limit
필수
integer format: int32
total
필수
integer format: int32
has_next_page
필수
boolean
예시
{
"data": [
{
"device_id": "res_01J9ZK3Q8M4XW7D2N5R6T0V1BC",
"station_id": "stn_01J9ZK3Q8M4XW7D2N5R6T0V1BC",
"type": "actual",
"kind": "chrome",
"status": "pending",
"compute_status": "provisioning",
"size": "small",
"workloads": [
{
"type": "vm",
"workload_id": "wkl_01J9ZK3Q8M4XW7D2N5R6T0V1BC",
"status": "pending"
}
]
}
]
}

요청 형식이 틀렸다 — VALIDATION_ERROR(details.errors[]) 또는 BAD_REQUEST. 본문은 오류 봉투.

인증이 없거나 무효다 — UNAUTHORIZED. 본문은 오류 봉투.

없거나 내 것이 아니다 — *_NOT_FOUND. 본문은 오류 봉투.

한도를 넘었다 — Retry-After 초 뒤에 다시. 본문은 오류 봉투.

서버 오류 — INTERNAL_ERROR. 본문은 오류 봉투.

의존 서비스에 닿지 못했다 — 잠시 뒤 다시. 본문은 오류 봉투.