O!PLANET 스튜디오

개발 문서 / 프린터

프린터 목록 조회

GET /v1/api/printer

이 라이선스에 등록한 프린터 목록과 프린터마다의 상태를 돌려줍니다. 상태는 state 값과 reasons, 센서 값은 detail 에 있습니다.

요청 칸

요청에 넣는 칸입니다.

이름위치형뜻
Authorization머리문자열필수. Bearer 뒤에 라이선스 키(인증). 예: Bearer OPL-XXXXX-XXXXX-XXXXX-XXXXX.

요청 예시

Bash
curl -s "https://studio.oplanet.net/v1/api/printer" \
  -H "Authorization: Bearer $OPLANET_LICENSE_KEY"

응답 예시

상태 200. 칸은 값이 없어도 빠지지 않고 null로 나옵니다(표에 "빠질 수 있음"이라 적은 칸만 없을 수 있음).

JSON
{
  "ok": true,
  "items": [
    {
      "serial": "10001400142",
      "model": "KC Prime",
      "registered": true,
      "activated": true,
      "activatedAt": "2026-11-01T02:00:00.000Z",
      "state": "ready",
      "reasons": [],
      "online": true,
      "lastSeenAt": "2026-11-06T03:00:00.000Z",
      "detail": {
        "cover": "closed",
        "cardInFeeder": true,
        "ribbon": {
          "label": "Color YMCKO",
          "remaining": 85,
          "capacity": 300,
          "percent": 28,
          "state": "in_use",
          "uid": "RBN-0001",
          "updatedAt": "2026-11-06T03:00:00.000Z"
        },
        "totalCards": 629,
        "cardsUntilCleaning": 371,
        "cleaningCount": 2,
        "source": "cli"
      },
      "lastPrint": {
        "printId": "J20261105-000008",
        "state": "completed",
        "result": "completed",
        "createdAt": "2026-11-05T14:53:35.000Z",
        "finishedAt": "2026-11-05T14:54:55.000Z"
      },
      "currentPrint": null,
      "recent30Days": {
        "prints": 12,
        "completed": 11,
        "cards": 13
      },
      "lastRibbon": {
        "value": 85,
        "uid": "RBN-0001",
        "at": "2026-11-05T14:54:55.000Z",
        "printId": "J20261105-000008"
      }
    }
  ],
  "nextCursor": null
}

응답 칸의 형과 뜻입니다.

칸형뜻
oktrue, false성공하면 늘 true. 늘 true.
items[]배열프린터.
items[].serial문자열프린터 시리얼. 예: 10001400142.
items[].model문자열모델 이름. 예: KC Prime.
items[].registeredtrue, false이 라이선스의 프린터 목록에 있음(목록에 나오면 늘 true).
items[].activatedtrue, false프로그램이나 웹에서 한 번이라도 썼음.
items[].activatedAt문자열처음 쓴 시각. null 가능.
items[].state문자열상태 값(ready, printing, blocked, cleaning, offline, unknown 중 한 가지). 값: ready, printing, blocked, cleaning, offline, unknown.
items[].reasons[]배열막힌 이유 code(cover_open, ribbon_out 등). 없으면 빈 배열.
items[].onlinetrue, false최근 2분 안에 소식이 있었음(또는 출력 화면이 잡고 있음).
items[].lastSeenAt문자열마지막 소식 시각. null 가능.
items[].detail객체센서 값(마지막 소식 기준, 모르면 null).
items[].detail.cover문자열덮개(open, closed). null 가능. 예: closed.
items[].detail.cardInFeedertrue, false공급기에 카드가 있음. null 가능.
items[].detail.ribbon객체리본(센서 값). 리본이 없거나 모르면 null. null 가능.
items[].detail.ribbon.label문자열리본 종류. null 가능. 예: Color YMCKO.
items[].detail.ribbon.remaining숫자남은 면. 새 리본(칩 값 20000 = 안 쓴 새 리본 표시)이면 capacity 와 같고, 칩 값이 용량보다 커 알 수 없으면 null. null 가능. 예: 85.
items[].detail.ribbon.capacity숫자한 롤의 면 수. null 가능. 예: 300.
items[].detail.ribbon.percent숫자남은 비율(%). 새 리본이면 100, 알 수 없으면 null. null 가능. 예: 28.
items[].detail.ribbon.state문자열리본 상태: new 새 리본(안 쓴 것), in_use 쓰는 중, unknown 남은 양을 알 수 없음(값이 없거나 용량보다 큼). 값: new, in_use, unknown.
items[].detail.ribbon.uid문자열리본 고유 번호. null 가능.
items[].detail.ribbon.updatedAt문자열리본 값을 마지막으로 받은 시각. null 가능.
items[].detail.totalCards숫자프린터가 센 전체 카드 장수. null 가능. 예: 629.
items[].detail.cardsUntilCleaning숫자다음 청소까지 남은 카드 수. null 가능. 예: 371.
items[].detail.cleaningCount숫자프린터가 센 청소 횟수. null 가능.
items[].detail.source문자열값을 보낸 곳(cli, web). null 가능.
items[].lastPrint객체마지막 출력(없으면 null). null 가능.
items[].lastPrint.printId문자열출력 번호.
items[].lastPrint.state문자열출력 상태. null 가능.
items[].lastPrint.result문자열최종 결과(completed, failed, unknown), 진행 중이면 null. null 가능.
items[].lastPrint.createdAt문자열만든 시각. null 가능.
items[].lastPrint.finishedAt문자열끝난 시각. null 가능.
items[].currentPrint객체지금 진행 중인 출력(이 라이선스의 것). 없으면 null. 값이 없는 칸은 빠짐. null 가능.
items[].currentPrint.printId문자열출력 번호. 예: J20261106-000001.
items[].currentPrint.state문자열출력 상태(ready, sending, printing, blocked, recovering).
items[].currentPrint.stage문자열진행 단계. 빠질 수 있음.
items[].currentPrint.createdAt문자열만든 시각. 빠질 수 있음.
items[].currentPrint.startedAt문자열시작 시각. 빠질 수 있음.
items[].currentPrint.lastEventAt문자열마지막 진행 소식 시각. 빠질 수 있음.
items[].currentPrint.bytesSent숫자보낸 바이트. 빠질 수 있음.
items[].currentPrint.totalBytes숫자전체 바이트. 빠질 수 있음.
items[].currentPrint.reasons[]배열막힌 이유 code(막혔을 때만). 빠질 수 있음.
items[].recent30Days객체최근 30일.
items[].recent30Days.prints숫자출력 수.
items[].recent30Days.completed숫자끝까지 나온 수.
items[].recent30Days.cards숫자쓴 카드 수.
items[].lastRibbon객체출력 결과로 받은 마지막 리본 값(없으면 null). null 가능.
items[].lastRibbon.value숫자남은 면. null 가능.
items[].lastRibbon.uid문자열리본 고유 번호. null 가능.
items[].lastRibbon.at문자열받은 시각. null 가능.
items[].lastRibbon.printId문자열그 출력 번호.
nextCursornull늘 null(한 쪽에 다 나옴).

오류 code

이 요청이 돌려줄 수 있는 오류 code입니다.

HTTP 상태code뜻
401license_key_invalid라이선스 키가 없거나 올바르지 않습니다(재발급 전 키 포함)
429api_capacity_exceededAPI 전체 호출이 오늘 한도에 닿았습니다
429api_rate_daily_exceeded오늘 쓸 수 있는 API 호출 수(고객마다, 매일 오전 9시 한국 시간에 초기화)에 닿았습니다
429rate_limited1분 한도를 넘었습니다(API 호출은 고객마다 1분 60번, AI 이미지 만들기는 웹, 프로그램 합쳐 고객마다 1분 10건). Retry-After 머리의 초만큼 기다린 뒤 다시 보냅니다
500internal_error서버 오류입니다

오류 모양(ok, code, message, action)과 전체 code는 공통 규칙에 있습니다.