본문으로 건너뛰기

등록된 운송수단 목록과 매핑된 디바이스 조회

회사의 등록된 운송수단 목록을 조회합니다.
만약 운송수단이 현재 운행중일 경우 운송수단과 매핑된 디바이스의 목록을 조회할 수 있습니다.

identifier 는 운송수단을 고유하게 식별하는 값입니다.
identifierType 에 따라 의미가 달라질 수 있습니다.

예) identifierTypeCAR_LICENSE_NUMBER 일 경우 identifier 는 차량 번호를 의미합니다.

Request


GET https://openapi.willog.io/hub/v1/vehicles

Query Parameters

NameTypeRequiredDescription
pageNumberfalse페이지 번호, default: 1
sizeNumberfalse데이터 갯수, default: 500, max: 500
vehicleStatusStringfalse운송수단 상태

Vehicle Statuses

NameDescription
IDLE미운행
DRIVING운행중

Example Request

GET /hub/v1/vehicles?page=1&size=300&vehicleStatus=DRIVING
Authorization: Bearer apiKey

Response


Response Body

NameTypeNot-nullDescription
itemsArraytrue반환되는 배열 데이터
items[].identifierStringtrue운송수단 식별자
items[].identifierTypeStringtrue운송수단 식별자 타입
items[].vehicleStatusStringtrue운송수단 상태
items[].mappedDevicesArraytrue매핑된 디바이스 정보
items[].mappedDevices[].serialArraytrue디바이스 시리얼 번호
items[].mappedDevices[].positionArraytrue디바이스가 매핑되어 있는 위치 (차량, 적재함 등)
paginationObjecttrue페이지네이션 메타 데이터
pagination.pageNumbertrue요청 페이지 번호
pagination.totalPagesNumbertrue전체 페이지 수
pagination.sizeNumbertrue요청 데이터 갯수
pagination.totalNumbertrue전체 데이터 갯수

identifier Types

NameDescription
CAR_LICENSE_NUMBER차량 번호

MappedDevice Position Types

NameDescription
VEHICLE차량 디바이스
CARGO적재함 디바이스

Example Response

HTTP/1.1 200 OK

{
"items": [
{
"identifier": "vehicle-001",
"identifierType": "CAR_LICENSE_NUMBER",
"vehicleStatus": "DRIVING",
"mappedDevices": [
{
"serial": "device-serial-1",
"position": "VEHICLE"
}
]
},
{
"identifier": "vehicle-002",
"identifierType": "CAR_LICENSE_NUMBER",
"vehicleStatus": "IDLE",
"mappedDevices": []
}
],
"pagination": {
"page": 1,
"size": 10,
"total": 2,
"totalPages": 1
}
}

Error Responses

- 유효하지 않은 토큰 및 인증키

HTTP/1.1 400 Bad Request

{
"code": "A0010"
}

- 잘못된 파라미터로 요청

HTTP/1.1 400 Bad Request

{
"code": "E0021"
}