StarIO.Online Web API

StarIO.Online サービスは、プリンターの制御と管理、印刷ジョブの送信と監視、イベント通知の受信に使用できるRESTスタイルのHTTP APIを提供します。
最初に、アプリケーションから API を安全に呼び出すために使用できる API キーを生成 します。 APIキーにはそれぞれのAPIキーに対する権限が付与されるため、権限の有無によりAPIを呼び出せない場合があります。

印刷に関するオプションは、ヘッダーとクエリパラメータのどちらでも指定できます。両方を指定した場合は、ヘッダーの値が優先されます。

HOST: https://jp-api.stario.online/v1

クリップボードにコピーしました!

Device Groups

※ステータスオブジェクトの各ステータスにおいて、非対応プリンターではデフォルト値の’false’が返ります

デバイスグループの一覧を取得、作成する

デバイスグループ一覧取得
GET/a

デバイスグループの一覧情報を返します。

必要な権限:ViewDeviceGroups

Example URI

GET /a
Request
Hide Show
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Response 200
Hide Show
Headers
Content-Type: application/json
Body
[
            {
              "Name": "SampleName",
              "MatchPath": "SampleMatchPath",
              "MatchDomain": null,
              "AutoCreateDeviceQueue": true,
              "Enabled": true,
              "RequireDeviceKey": true,
              "Created": "2024-12-09T05:18:05.97638Z",
              "Owner": null,
              "DeviceCount": null
            }
          ]
Schema
{
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "Name": {
                  "type": "string",
                  "description": "デバイスグループ名"
                },
                "MatchPath": {
                  "type": "string",
                  "description": "デバイスグループを識別するために使用されるパス"
                },
                "MatchDomain": {
                  "type": "string",
                  "description": "予約済みプロパティ"
                },
                "AutoCreateDeviceQueue": {
                  "type": "boolean",
                  "description": "CloudPRNT エンドポイント URL に接続する新しいデバイスが自動的に登録されるかどうかを示す"
                },
                "Enabled": {
                  "type": "boolean",
                  "description": "デバイスグループが利用可能かどうかのステータスを示す"
                },
                "RequireDeviceKey": {
                  "type": "boolean",
                  "description": "デバイスをこのグループに接続するためにデバイスごとのキーが必要かどうかを示す"
                },
                "Created": {
                  "type": "string",
                  "description": "グループ作成時の UTC 日付/時刻"
                },
                "Owner": {
                  "type": "string",
                  "description": "このデバイスグループを所有するアカウントの名前、常にnullとなる"
                },
                "DeviceCount": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "このデバイスグループに属するデバイス数、常にnullとなる"
                }
              },
              "required": [
                "Name",
                "MatchPath",
                "MatchDomain",
                "AutoCreateDeviceQueue",
                "Enabled",
                "RequireDeviceKey",
                "Created",
                "Owner",
                "DeviceCount"
              ]
            }
          }
Response 400
Hide Show
Headers
Content-Type: text/plain
Body
Bad Request
Response 403
Hide Show
Headers
Content-Type: text/plain
Body
Forbidden

デバイスグループ作成
POST/a

新しいデバイスグループを作成します。

パス(MatchPath)は「グループプレフィックス-任意の文字列」の形で指定します。 グループプレフィックスはアカウントごとに決まっている文字列で、通常は最初から用意されているデバイスグループのパスと同じです。
例:グループプレフィックスが「sample」なら「sample-store01」
「-」より後ろは英数字とアンダースコア(_)で1~20文字です(グループプレフィックスと「-」は文字数に含みません)。グループプレフィックスの大文字・小文字は区別されます。

※Enabled と AutoCreateDeviceQueue は、省略すると false になります。プリンターを接続してすぐに使う場合は、どちらも true を指定してください。

必要な権限:CreateDeviceGroups

Example URI

POST /a
Request
Hide Show
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Body
{
  "Name": "SampleGroupName",
  "MatchPath": "sample-store01",
  "AutoCreateDeviceQueue": true,
  "Enabled": true,
  "JobExpirationTime": 4320,
  "WelcomePrint": true
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Name": {
      "type": "string",
      "description": "デバイスグループ名。3~100文字"
    },
    "MatchPath": {
      "type": "string",
      "description": "デバイスグループを識別するために使用されるパス。「グループプレフィックス-任意の文字列」の形式。任意の文字列は英数字とアンダースコア(_)で1~20文字"
    },
    "MatchDomain": {
      "type": "string",
      "description": "予約済みプロパティ"
    },
    "AutoCreateDeviceQueue": {
      "type": "boolean",
      "description": "CloudPRNT エンドポイント URL に接続する新しいデバイスが自動的に登録されるかどうかを示す。省略時は false"
    },
    "Enabled": {
      "type": "boolean",
      "description": "デバイスグループが利用可能かどうかのステータスを示す。省略時は false"
    },
    "RequireDeviceKey": {
      "type": "boolean",
      "description": "予約済みプロパティ"
    },
    "JobExpirationTime": {
      "type": "integer",
      "description": "ジョブの有効期限(分)。1~4320の範囲で指定する。省略時は 4320"
    },
    "WelcomePrint": {
      "type": "boolean",
      "description": "新しいデバイスが初めて接続した際にWelcome印刷を行うかどうかを示す。省略時は true"
    }
  },
  "required": [
    "Name",
    "MatchPath"
  ]
}
Response 201
Hide Show
Headers
Content-Type: application/json
Location: /v1/a/sample-store01
Body
{
  "Location": "/v1/a/sample-store01",
  "Name": "SampleGroupName",
  "MatchPath": "sample-store01"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Location": {
      "type": "string",
      "description": "作成したデバイスグループのURI"
    },
    "Name": {
      "type": "string",
      "description": "作成したデバイスグループ名"
    },
    "MatchPath": {
      "type": "string",
      "description": "作成したデバイスグループのパス"
    }
  }
}
Response 400
Hide Show

次のいずれかに該当する場合に返ります。
・名称(Name)が3~100文字でない場合
・パス(MatchPath)の「-」より後ろが、英数字とアンダースコア(_)で1~20文字でない場合
Name・MatchPath が未指定または空の場合や、JobExpirationTime が範囲外の場合は、Content-Type が application/json となり、エラーの詳細が JSON 形式で返ります。

Headers
Content-Type: text/plain
Body
Bad Request
Response 403
Hide Show

必要な権限がない場合や、パスがグループプレフィックスで始まっていない場合に返ります。

Headers
Content-Type: text/plain
Body
Forbidden
Response 409
Hide Show

同じパスのデバイスグループが既にある場合や、作成数が上限に達している場合に返ります。

Headers
Content-Type: text/plain
Body
Conflict

デバイスグループの詳細を取得、更新する

デバイスグループ詳細取得
GET/a/{groupPath}

デバイスグループの詳細情報を返します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。

必要な権限:ViewDeviceGroups

Example URI

GET /a/ SampleGroupPath
URI Parameters
Hide Show
groupPath
string (required) Example: SampleGroupPath

デバイスグループを識別するために使用されるパス

Request
Hide Show
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Response 200
Hide Show
Headers
Content-Type: application/json
Body
{
            "Name": "SampleName",
            "MatchPath": "SampleMatchPath",
            "MatchDomain": null,
            "AutoCreateDeviceQueue": true,
            "Enabled": true,
            "RequireDeviceKey": true,
            "ContactEMail": null,
            "ContactName": null,
            "AutoBuzzBeforePrint": 0,
            "AutoBuzzAfterPrint": 0,
            "Copies": 1,
            "AutoClaimBCR": false,
            "Owner": "SampleOwnerName",
            "Created": "2024-12-09T05:18:05.97638Z",
            "JobExpirationTime": 4320,
            "WelcomePrint": true,
            "EmailPrint": false
          }
Schema
{
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "object",
            "properties": {
              "Name": {
                "type": "string",
                "description": "デバイスグループ名"
              },
              "MatchPath": {
                "type": "string",
                "description": "デバイスグループを識別するために使用されるパス"
              },
              "MatchDomain": {
                "type": "string",
                "description": "予約済みプロパティ"
              },
              "AutoCreateDeviceQueue": {
                "type": "boolean",
                "description": "CloudPRNT エンドポイント URL に接続する新しいデバイスが自動的に登録されるかどうかを示す"
              },
              "Enabled": {
                "type": "boolean",
                "description": "デバイスグループが利用可能かどうかのステータスを示す"
              },
              "RequireDeviceKey": {
                "type": "boolean",
                "description": "デバイスをこのグループに接続するためにデバイスごとのキーが必要かどうかを示す"
              },
              "ContactEMail": {
                "type": "string",
                "description": "コンタクト用メールアドレス"
              },
              "ContactName": {
                "type": "string",
                "description": "コンタクト用名前"
              },
              "AutoBuzzBeforePrint": {
                "type": "number",
                "description": "印刷前に外部ブザーを鳴らす回数"
              },
              "AutoBuzzAfterPrint": {
                "type": "number",
                "description": "印刷後に外部ブザーを鳴らす回数"
              },
              "Copies": {
                "type": "number",
                "description": "このデバイスグループのデフォルトの印刷枚数"
              },
              "AutoClaimBCR": {
                "type": "boolean",
                "description": "接続されたバーコードリーダーを自動的に要求して、バーコード スキャン通知を受信するかどうかを示す"
              },
              "Owner": {
                "type": "string",
                "description": "このデバイスグループを所有するアカウントの名前"
              },
              "Created": {
                "type": "string",
                "description": "グループ作成時の UTC 日付/時刻"
              },
              "JobExpirationTime": {
                "type": "number",
                "description": "ジョブの有効期限を設定するためのパラメータ(単位は分)"
              },
              "WelcomePrint": {
                "type": "boolean",
                "description": "welcome印刷を有効無効を切り替えるための設定値"
              },
              "EmailPrint": {
                "type": "boolean",
                "description": "Email印刷機能自体の有効無効を切り替えるための設定値"
              }
            },
            "required": [
              "Name",
              "MatchPath",
              "AutoCreateDeviceQueue",
              "Enabled",
              "RequireDeviceKey",
              "AutoBuzzBeforePrint",
              "AutoBuzzAfterPrint",
              "Copies",
              "AutoClaimBCR",
              "Owner",
              "Created",
              "JobExpirationTime",
              "WelcomePrint",
              "EmailPrint"
            ]
          }
Response 403
Hide Show
Headers
Content-Type: text/plain
Body
Forbidden
Response 404
Hide Show
Headers
Content-Type: text/plain
Body
Not Found

デバイスグループ更新
PUT/a/{groupPath}

指定したデバイスグループの情報を更新します。 デバイスグループはAPIキーで認証されるアカウントに属している必要があります。

必要な権限:ModifyDeviceGroups

Example URI

PUT /a/ SampleGroupPath
URI Parameters
Hide Show
groupPath
string (required) Example: SampleGroupPath

デバイスグループを識別するために使用されるパス

Request
Hide Show
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Body
{
            "Name": "SampleGroupName",
            "MatchDomain": null,
            "AutoCreateDeviceQueue": true,
            "Enabled": true,
            "RequireDeviceKey": true,
            "ContactEMail": null,
            "ContactName": null,
            "AutoBuzzBeforePrint": 0,
            "AutoBuzzAfterPrint": 0,
            "Copies": 1,
            "AutoClaimBCR": false,
            "JobExpirationTime": 4320,
            "WelcomePrint": true,
            "EmailPrint": false
          }
Schema
{
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "object",
            "properties": {
              "Name": {
                "type": "string",
                "description": "デバイスグループ名。3~100文字"
              },
              "MatchDomain": {
                "type": "string",
                "description": "予約済みプロパティ"
              },
              "AutoCreateDeviceQueue": {
                "type": "boolean",
                "description": "CloudPRNT エンドポイント URL に接続する新しいデバイスが自動的に登録されるかどうかを示す"
              },
              "Enabled": {
                "type": "boolean",
                "description": "デバイスグループが利用可能かどうかのステータスを示す"
              },
              "RequireDeviceKey": {
                "type": "boolean",
                "description": "デバイスをこのグループに接続するためにデバイスごとのキーが必要かどうかを示す"
              },
              "ContactEMail": {
                "type": "string",
                "description": "コンタクト用メールアドレス"
              },
              "ContactName": {
                "type": "string",
                "description": "コンタクト用名前"
              },
              "AutoBuzzBeforePrint": {
                "type": "number",
                "description": "印刷前に外部ブザーを鳴らす回数"
              },
              "AutoBuzzAfterPrint": {
                "type": "number",
                "description": "印刷後に外部ブザーを鳴らす回数"
              },
              "Copies": {
                "type": "number",
                "description": "このデバイスグループのデフォルトの印刷枚数"
              },
              "AutoClaimBCR": {
                "type": "boolean",
                "description": "接続されたバーコードリーダーを自動的に要求して、バーコード スキャン通知を受信するかどうかを示す"
              },
              "JobExpirationTime": {
                "type": "number",
                "description": "ジョブの有効期限を設定するためのパラメータ(単位は分)"
              },
              "WelcomePrint": {
                "type": "boolean",
                "description": "welcome印刷を有効無効を切り替えるための設定値"
              },
              "EmailPrint": {
                "type": "boolean",
                "description": "Email印刷機能自体の有効無効を切り替えるための設定値"
              }
            }
          }
Response 200
Hide Show
Headers
Content-Type: application/json
Body
{
            "Name": "SampleGroupName",
            "MatchPath": "SampleGroupPath"
          }
Schema
{
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "object",
            "properties": {
              "Name": {
                "type": "string",
                "description": "デバイスグループ名"
              },
              "MatchPath": {
                "type": "string",
                "description": "デバイスグループを識別するために使用されるパス"
              }
            },
            "required": [
              "Name",
              "MatchPath"
            ]
          }
Response 400
Hide Show

名称(Name)が3~100文字でない場合に返ります。
JobExpirationTime が範囲外の場合は、Content-Type が application/json となり、エラーの詳細が JSON 形式で返ります。

Headers
Content-Type: text/plain
Body
Bad Request
Response 403
Hide Show
Headers
Content-Type: text/plain
Body
Forbidden
Response 404
Hide Show
Headers
Content-Type: text/plain
Body
Not Found

Devices

※ステータスオブジェクトの各ステータスにおいて、非対応プリンターではデフォルト値の’false’が返ります

デバイスの一覧を取得する

デバイス一覧取得
GET/a/{groupPath}/d{?notes}{&s}{&metaInfo}

指定したデバイスグループに接続されているデバイスの一覧情報を返します。 デバイスグループはAPIキーで認証されるアカウントに属している必要があります。

必要な権限:EnumDevices

LastConnectionプロパティは、StarIO.Onlineサーバーが最後にデバイスからHTTPリクエストを受信してからの経過時間(秒)を示します。本プロパティを活用して、デバイスのStarIO.Onlineサーバーへの接続・切断を判定できます。


(参考)StarIO.Onlineのダッシュボードでは以下の条件に基づきデバイスの接続状態を判断しています。

■ 切断判定:LastConnection > PollingInterval + 30秒

■ 接続判定:LastConnection ≤ PollingInterval + 30秒

※PollingIntervalは、デバイスがサーバーに対して定期的にポーリングを行う間隔(秒)を指します。

Example URI

GET /a/ SampleGroupPath/d? notes= true& s= sample& metaInfo= {"1": [100], "2": "abc"}
URI Parameters
Hide Show
groupPath
string (required) Example: SampleGroupPath

デバイスグループを識別するために使用されるパス

notes
boolean (optional) Example: true

レスポンスにNotesを含むかどうか

s
string (optional) Example: sample

入力された文字列にてDevice Name, Serial Number, Application access ID, MACを対象として部分一致検索

metaInfo
string (optional) Example: {"1": [100], "2": "abc"}

入力された文字列にてJSON形式でメタ情報を検索。メタ情報の取得は こちらを参照

Request
Hide Show
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Response 200
Hide Show
Headers
Content-Type: application/json
Body
[
            {
              "Mac": "xxxxxxxxxxxx",
              "Id": "Sample",
              "Status": {
                "Online": true,
                "CoverOpen": false,
                "CompulsionSwitch": false,
                "OverTemperature": false,
                "Recoverable": false,
                "CutterError": false,
                "MechanicalError": false,
                "ReceiveBufferOverflow": false,
                "BlackMarkError": false,
                "PresenterPaperJam": false,
                "VoltageError": false,
                "PaperEmpty": false,
                "PaperLow": false,
                "HoldPrint": false,
                "RollPositionError": false,
                "PartsReplacementNotification": false,
                "CleaningNotification": false,
                "Description": null,
                "MinWarningLevel": 0
              },
              "AccessIdentifier": "12345678",
              "HorizontalResolution": 8,
              "VerticalResolution": 8,
              "PrintableWidthMM": 72,
              "PaperWidthMM": 80,
              "PollingInterval": 1,
              "ClientType": "Star mC-Print3",
              "LastConnection": 24627231.566811,
              "QueuedJobs": 0,
              "GroupInfo": {
                "Name": "SampleName",
                "MatchPath": "SampleMatchPath",
                "Owner": "SampleOwnerName"
              },
              "SerialNumber": "xxxxxxxxxxxxxxxx",
              "Notes": "SampleNotes",
              "DeleteFlag": false,
              "MetaInfo": [
                {
                  "MetaInfoKeyId": 4,
                  "MetaInfoValueId": 3
                },
                {
                  "MetaInfoKeyId": 9,
                  "CustomValue": "SampleCustomValue"
                }
              ]
            }
          ]
Schema
{
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "Mac": {
                  "type": "string",
                  "description": "プリンターデバイスの一意のMacアドレス"
                },
                "Id": {
                  "type": "string",
                  "description": "デバイスに割り当てられたID/名前"
                },
                "Status": {
                  "type": "object",
                  "properties": {
                    "Online": {
                      "type": "boolean"
                    },
                    "CoverOpen": {
                      "type": "boolean"
                    },
                    "CompulsionSwitch": {
                      "type": "boolean"
                    },
                    "OverTemperature": {
                      "type": "boolean"
                    },
                    "Recoverable": {
                      "type": "boolean"
                    },
                    "CutterError": {
                      "type": "boolean"
                    },
                    "MechanicalError": {
                      "type": "boolean"
                    },
                    "ReceiveBufferOverflow": {
                      "type": "boolean"
                    },
                    "BlackMarkError": {
                      "type": "boolean"
                    },
                    "PresenterPaperJam": {
                      "type": "boolean"
                    },
                    "VoltageError": {
                      "type": "boolean"
                    },
                    "PaperEmpty": {
                      "type": "boolean"
                    },
                    "PaperLow": {
                      "type": "boolean"
                    },
                    "HoldPrint": {
                      "type": "boolean"
                    },
                    "RollPositionError": {
                      "type": "boolean"
                    },
                    "PartsReplacementNotification": {
                      "type": "boolean"
                    },
                    "CleaningNotification": {
                      "type": "boolean"
                    },
                    "Description": {
                      "type": "string"
                    },
                    "MinWarningLevel": {
                      "type": "number"
                    }
                  }
                },
                "AccessIdentifier": {
                  "type": "string",
                  "description": "デバイスのアプリケーションアクセスID"
                },
                "HorizontalResolution": {
                  "type": "number",
                  "description": "デバイスの水平印刷解像度(ドット/mm)"
                },
                "VerticalResolution": {
                  "type": "number",
                  "description": "デバイスの垂直印刷解像度(ドット/mm)"
                },
                "PrintableWidthMM": {
                  "type": "number",
                  "description": "デバイスの印刷可能領域 (mm)"
                },
                "PaperWidthMM": {
                  "type": "number",
                  "description": "デバイスにセットされている用紙の幅(mm)"
                },
                "PollingInterval": {
                  "type": "number",
                  "description": "CloudPRNTへポーリングリクエストを送る間隔"
                },
                "ClientType": {
                  "type": "string",
                  "description": "クライアントタイプの識別子"
                },
                "LastConnection": {
                  "type": "number",
                  "description": "StarIO.Onlineサーバーが最後にデバイスからHTTPリクエストを受信してからの経過時間(秒)※MQTT接続のデバイスは常に0となります。"
                },
                "QueuedJobs": {
                  "type": "number",
                  "description": "デバイスの印刷キューにある保留中のジョブの数"
                },
                "GroupInfo": {
                  "type": "object",
                  "properties": {
                    "Name": {
                      "type": "string"
                    },
                    "MatchPath": {
                      "type": "string"
                    },
                    "Owner": {
                      "type": "string"
                    }
                  },
                  "description": "デバイスが属するグループに関する情報"
                },
                "SerialNumber": {
                  "type": "string",
                  "description": "デバイスのシリアルナンバー"
                },
                "Notes": {
                  "type": "string",
                  "description": "デバイスに設定可能な任意の文字列"
                },
                "DeleteFlag": {
                  "type": "boolean",
                  "description": "削除フラグ"
                },
                "MetaInfo": {
                  "type": "array",
                  "description": "デバイスに付与されるメタ情報"
                }
              },
              "required": [
                "Mac",
                "Id",
                "Status",
                "AccessIdentifier",
                "HorizontalResolution",
                "VerticalResolution",
                "PrintableWidthMM",
                "PaperWidthMM",
                "PollingInterval",
                "LastConnection",
                "QueuedJobs",
                "GroupInfo",
                "SerialNumber",
                "DeleteFlag",
                "MetaInfo"
              ]
            }
          }
Response 400
Hide Show
Headers
Content-Type: text/plain
Body
Bad Request
Response 403
Hide Show
Headers
Content-Type: text/plain
Body
Forbidden

デバイスの詳細を取得、更新、削除する

デバイス詳細取得
GET/a/{groupPath}/d/{appId}{?notes}

指定したデバイスグループに接続されているデバイスの詳細情報を返します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。

必要な権限:ViewDevice

LastConnectionプロパティは、StarIO.Onlineサーバーが最後にデバイスからHTTPリクエストを受信してからの経過時間(秒)を示します。本プロパティを活用して、デバイスのStarIO.Onlineサーバーへの接続・切断を判定できます。


(参考)StarIO.Onlineのダッシュボードでは以下の条件に基づきデバイスの接続状態を判断しています。

■ 切断判定:LastConnection > PollingInterval + 30秒

■ 接続判定:LastConnection ≤ PollingInterval + 30秒

※PollingIntervalは、デバイスがサーバーに対して定期的にポーリングを行う間隔(秒)を指します。

Example URI

GET /a/ SampleGroupPath/d/ 12345678? notes= true
URI Parameters
Hide Show
appId
string (required) Example: 12345678

デバイスのアプリケーションアクセスID

groupPath
string (required) Example: SampleGroupPath

デバイスグループを識別するために使用されるパス

notes
boolean (optional) Example: true

レスポンスにNotesを含むかどうか

Request
Hide Show
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Response 200
Hide Show
Headers
Content-Type: application/json
Body
{
            "Mac": "xxxxxxxxxxxx",
            "Id": "Sample",
            "Status": {
              "Online": true,
              "CoverOpen": false,
              "CompulsionSwitch": false,
              "OverTemperature": false,
              "Recoverable": false,
              "CutterError": false,
              "MechanicalError": false,
              "ReceiveBufferOverflow": false,
              "BlackMarkError": false,
              "PresenterPaperJam": false,
              "VoltageError": false,
              "PaperEmpty": false,
              "PaperLow": false,
              "HoldPrint": false,
              "RollPositionError": false,
              "PartsReplacementNotification": false,
              "CleaningNotification": false,
              "Description": null,
              "MinWarningLevel": 0
            },
            "AccessIdentifier": "12345678",
            "HorizontalResolution": 8,
            "VerticalResolution": 8,
            "PrintableWidthMM": 50.8,
            "PaperWidthMM": 58,
            "PollingInterval": 1,
            "ClientType": "Star mC-Print2",
            "LastConnection": 922370.225284,
            "QueuedJobs": 0,
            "GroupInfo": {
              "Name": "SampleName",
              "MatchPath": "SampleMatchPath",
              "Owner": "SampleOwnerName"
            },
            "SerialNumber": "xxxxxxxxxxxxxxxx",
            "Notes": "SampleNotes",
            "MetaInfo": [
              {
                "MetaInfoKeyId": 4,
                "MetaInfoValueId": 3
              },
              {
                "MetaInfoKeyId": 9,
                "CustomValue": "SampleCustomValue"
              }
            ]
          }
Schema
{
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "object",
            "properties": {
              "Mac": {
                "type": "string",
                "description": "デバイスの一意のMacアドレス"
              },
              "Id": {
                "type": "string",
                "description": "デバイスに割り当てられたID/名前"
              },
              "Status": {
                "type": "object",
                "properties": {
                  "Online": {
                    "type": "boolean"
                  },
                  "CoverOpen": {
                    "type": "boolean"
                  },
                  "CompulsionSwitch": {
                    "type": "boolean"
                  },
                  "OverTemperature": {
                    "type": "boolean"
                  },
                  "Recoverable": {
                    "type": "boolean"
                  },
                  "CutterError": {
                    "type": "boolean"
                  },
                  "MechanicalError": {
                    "type": "boolean"
                  },
                  "ReceiveBufferOverflow": {
                    "type": "boolean"
                  },
                  "BlackMarkError": {
                    "type": "boolean"
                  },
                  "PresenterPaperJam": {
                    "type": "boolean"
                  },
                  "VoltageError": {
                    "type": "boolean"
                  },
                  "PaperEmpty": {
                    "type": "boolean"
                  },
                  "PaperLow": {
                    "type": "boolean"
                  },
                  "HoldPrint": {
                    "type": "boolean"
                  },
                  "RollPositionError": {
                    "type": "boolean"
                  },
                  "PartsReplacementNotification": {
                    "type": "boolean"
                  },
                  "CleaningNotification": {
                    "type": "boolean"
                  },
                  "Description": {
                    "type": "string"
                  },
                  "MinWarningLevel": {
                    "type": "number"
                  }
                },
                "description": "デバイスの最後にアップロードされたステータスを表すプリンターステータスオブジェクト"
              },
              "AccessIdentifier": {
                "type": "string",
                "description": "デバイスのアプリケーションアクセスID"
              },
              "HorizontalResolution": {
                "type": "number",
                "description": "デバイスの水平印刷解像度(ドット/mm)"
              },
              "VerticalResolution": {
                "type": "number",
                "description": "デバイスの垂直印刷解像度(ドット/mm)"
              },
              "PrintableWidthMM": {
                "type": "number",
                "description": "デバイスの印刷可能領域 (mm)"
              },
              "PaperWidthMM": {
                "type": "number",
                "description": "デバイスにセットされている用紙の幅(mm)"
              },
              "PollingInterval": {
                "type": "number",
                "description": "CloudPRNTへポーリングリクエストを送る間隔"
              },
              "ClientType": {
                "type": "string",
                "description": "クライアントタイプの識別子"
              },
              "LastConnection": {
                "type": "number",
                "description": "StarIO.Onlineサーバーが最後にデバイスからHTTPリクエストを受信してからの経過時間(秒)※MQTT接続のデバイスは常に0となります。"
              },
              "QueuedJobs": {
                "type": "number",
                "description": "デバイスの印刷キューにある保留中のジョブの数"
              },
              "GroupInfo": {
                "type": "object",
                "properties": {
                  "Name": {
                    "type": "string"
                  },
                  "MatchPath": {
                    "type": "string"
                  },
                  "Owner": {
                    "type": "string"
                  }
                },
                "description": "デバイスが属するグループに関する情報"
              },
              "SerialNumber": {
                "type": "string",
                "description": "デバイスのシリアルナンバー"
              },
              "Notes": {
                "type": "string",
                "description": "デバイスに設定可能な任意の文字列"
              },
              "MetaInfo": {
                "type": "array",
                "description": "デバイスに付与されるメタ情報"
              }
            },
            "required": [
              "Mac",
              "Id",
              "Status",
              "AccessIdentifier",
              "HorizontalResolution",
              "VerticalResolution",
              "PrintableWidthMM",
              "PaperWidthMM",
              "PollingInterval",
              "ClientType",
              "LastConnection",
              "QueuedJobs",
              "GroupInfo",
              "SerialNumber",
              "MetaInfo"
            ]
          }
Response 400
Hide Show
Headers
Content-Type: text/plain
Body
Bad Request
Response 403
Hide Show
Headers
Content-Type: text/plain
Body
Forbidden
Response 404
Hide Show
Headers
Content-Type: text/plain
Body
Not Found

デバイス更新
PUT/a/{groupPath}/d/{appId}

指定したデバイスグループに接続されているデバイスの情報を更新します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。

必要な権限:ModifyDevice

Example URI

PUT /a/ SampleGroupPath/d/ 12345678
URI Parameters
Hide Show
appId
string (required) Example: 12345678

デバイスのアプリケーションアクセスID

groupPath
string (required) Example: SampleGroupPath

デバイスグループを識別するために使用されるパス

Request
Hide Show
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Body
{
            "RequestIdChange": "xxxxxxxxxxxxxx",
            "RenewPageInfo": false,
            "GenerateNewAccessID": false,
            "Notes": "xxxx",
            "MetaInfo": [
              {
                "MetaInfoKeyId": 4,
                "MetaInfoValueId": 3
              },
              {
                "MetaInfoKeyId": 9,
                "CustomValue": "SampleCustomValue"
              }
            ]
          }
Schema
{
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "object",
            "properties": {
              "RequestIdChange": {
                "type": "string",
                "description": "デバイスの ID/名前の変更を要求。このリクエストはサービスのキューに入れられ、デバイスが次にサービスと通信するときに処理される"
              },
              "RenewPageInfo": {
                "type": "boolean",
                "description": "true の場合、サービスはデバイスの用紙構成を再クエリ。これは、サービスによる最後のクエリ以降、デバイスが別の用紙を使用するように構成されている場合に使用可能。"
              },
              "GenerateNewAccessID": {
                "type": "boolean",
                "description": "true の場合、サービスはデバイスに新しい ApplicationAccessID を割り当てる。"
              },
              "Notes": {
                "type": "string",
                "description": "備考として任意の文字列を追加可能なキー"
              },
              "MetaInfo": {
                "type": "array",
                "description": "デバイスに付与されるメタ情報"
              }
            },
            "required": [
              "MetaInfo"
            ]
          }
Response 200
Response 400
Hide Show
Headers
Content-Type: text/plain
Body
Bad Request
Response 403
Hide Show
Headers
Content-Type: text/plain
Body
Forbidden
Response 404
Hide Show
Headers
Content-Type: text/plain
Body
Not Found

デバイス削除
DELETE/a/{groupPath}/d/{appId}

指定したデバイスグループに接続されているデバイスを削除します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。

必要な権限:DeleteDevice

デバイスグループで「新規デバイスのキューを自動作成」が有効になっており、対象削除デバイスがオンラインの場合、次回の接続時にデバイスグループに再度追加されます。

Example URI

DELETE /a/ SampleGroupPath/d/ 12345678
URI Parameters
Hide Show
appId
string (required) Example: 12345678

デバイスのアプリケーションアクセスID

groupPath
string (required) Example: SampleGroupPath

デバイスグループを識別するために使用されるパス

Request
Hide Show
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Response 200
Response 403
Hide Show
Headers
Content-Type: application/json
Body
Forbidden
Response 404
Hide Show
Headers
Content-Type: text/plain
Body
Not Found

Template

テンプレート印刷は、印刷レイアウトを「テンプレート」として登録し、商品名や価格などの可変データ(フィールドデータ)をJSON形式で差し込んで印刷する機能です。 テンプレートは、Star Document MarkupとStarXpand Commandの2種類の形式に対応します。StarXpand Commandは、StarXpand SDKのStarXpandCommandBuilder.getCommands()で取得できるJSONデータです。 テンプレートは、登録して繰り返し利用するほか、登録せずにリクエストへ直接含めて印刷することもできます。 テンプレートの作成・取得・更新・削除はこの章で、印刷はPrint Queue章の「テンプレート印刷」「テンプレートインライン印刷」で説明します。

テンプレートの作成から印刷までの流れを、サンプルコード付きで説明します。

・Email印刷では使用できません。
・1回のリクエストで作成される印刷ジョブは1件です(印刷部数はStar-Copiesヘッダーまたはcopiesクエリパラメータで指定します)。
・テンプレート本文のサイズはUTF-8でのバイト数で判定され、その上限は2MBです。また、テンプレートとフィールドデータを合成して生成される印刷データ(印刷コマンド)のサイズは、印刷先プリンターが受信できる次のサイズまでです。上限を超えた場合は413 Payload Too Largeが返されます。
印刷先プリンター 印刷データの上限
mC-Label3、IFBD-HI01X/HI02X 2,097,151バイト(2MB未満)まで
上記以外のプリンター 524,288バイト(512KB)まで
・FormatTypeが1(StarXpand Command)の場合、テンプレート本文はJSONとして妥当であり、かつルートに"title":"StarXpandCommand"と"version"キーを含む必要があります。条件を満たさない場合、テンプレート作成・テンプレート更新では400 Bad Request、テンプレートインライン印刷では422 Unprocessable Entityが返されます。

テンプレートを作成、一覧を取得する

テンプレート作成
POST/template

新しいテンプレートを作成します。 レスポンスにテンプレート本文(TemplateBody)は含まれません。

必要な権限:CreateTemplates

・テンプレートは必ずいずれかのデバイスグループに紐づける必要があります。
・テンプレートの登録上限は10件です。

Example URI

POST /template
Request
HideShow
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Body
{
  "Name": "SampleTemplateName",
  "Description": "SampleDescription",
  "FormatType": 0,
  "TemplateBody": "[align: centre]\n${shopName}\n[cut]",
  "MatchPaths": [
    "SampleMatchPath1",
    "SampleMatchPath2"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Name": {
      "type": "string",
      "description": "テンプレート名"
    },
    "Description": {
      "type": "string",
      "description": "テンプレートの説明"
    },
    "FormatType": {
      "type": "number",
      "description": "0:Star Document Markup、1:StarXpand Command"
    },
    "TemplateBody": {
      "type": "string",
      "description": "テンプレート本文(UTF-8)。`${shopName}`や`[cut]`などのテンプレート固有の記法は、変換せずそのまま格納される"
    },
    "MatchPaths": {
      "type": "array",
      "description": "テンプレートを紐づけるデバイスグループのMatchPath。最低1件の指定が必要。同じMatchPathを重複して指定することはできない"
    }
  },
  "required": [
    "Name",
    "FormatType",
    "TemplateBody",
    "MatchPaths"
  ]
}
Response 201
HideShow
Headers
Content-Type: application/json
Body
{
  "TemplateId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
  "Name": "SampleTemplateName",
  "Format": {
    "FormatType": 0,
    "FormatValue": "Star Document Markup"
  },
  "GroupInfo": [
    {
      "Name": "SampleName",
      "MatchPath": "SampleMatchPath",
      "Owner": "SampleOwnerName"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "TemplateId": {
      "type": "string",
      "description": "作成したテンプレートを識別するためのID"
    },
    "Name": {
      "type": "string",
      "description": "テンプレート名"
    },
    "Format": {
      "type": "object",
      "properties": {
        "FormatType": {
          "type": "number",
          "description": "0:Star Document Markup、1:StarXpand Command"
        },
        "FormatValue": {
          "type": "string",
          "description": "形式の表示名"
        }
      },
      "required": [
        "FormatType",
        "FormatValue"
      ],
      "description": "テンプレートの形式"
    },
    "GroupInfo": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "Name": {
            "type": [
              "string",
              "null"
            ],
            "description": "デバイスグループ名"
          },
          "MatchPath": {
            "type": "string",
            "description": "デバイスグループを識別するために使用されるパス"
          },
          "Owner": {
            "type": "string",
            "description": "デバイスグループの所有者のユーザ名"
          }
        }
      },
      "description": "テンプレートが紐づくデバイスグループの情報"
    }
  },
  "required": [
    "TemplateId",
    "Name",
    "Format",
    "GroupInfo"
  ]
}
Response 400
HideShow

次のいずれかに該当する場合に返されます。
・NameまたはTemplateBodyに空文字を指定した場合
・MatchPathsに空配列を指定した場合
・規定値以外のFormatTypeを指定した場合
・存在しないデバイスグループのMatchPathを指定した場合
・同じMatchPathを重複して指定した場合

Headers
Content-Type: text/plain
Body
Bad Request
Response 403
HideShow
Headers
Content-Type: text/plain
Body
Forbidden
Response 409
HideShow

テンプレートの登録数が上限(10件)に達している場合に返されます。

Headers
Content-Type: text/plain
Body
Conflict
Response 413
HideShow
Headers
Content-Type: text/plain
Body
Payload Too Large

テンプレート一覧取得
GET/template

登録されているテンプレートの一覧情報を返します。 テンプレート本文(TemplateBody)は含まれません。

必要な権限:ViewTemplates

Example URI

GET /template
Request
HideShow
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Response 200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "TemplateId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
    "Name": "SampleTemplateName",
    "Description": "SampleDescription",
    "Format": {
      "FormatType": 0,
      "FormatValue": "Star Document Markup"
    },
    "GroupInfo": [
      {
        "Name": "SampleName",
        "MatchPath": "SampleMatchPath",
        "Owner": "SampleOwnerName"
      }
    ]
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "TemplateId": {
        "type": "string",
        "description": "テンプレートを識別するためのID"
      },
      "Name": {
        "type": "string",
        "description": "テンプレート名"
      },
      "Description": {
        "type": [
          "string",
          "null"
        ],
        "description": "テンプレートの説明。未設定の場合はnull"
      },
      "Format": {
        "type": "object",
        "properties": {
          "FormatType": {
            "type": "number",
            "description": "0:Star Document Markup、1:StarXpand Command"
          },
          "FormatValue": {
            "type": "string",
            "description": "形式の表示名。形式の判定にはFormatTypeを使用する"
          }
        },
        "required": [
          "FormatType",
          "FormatValue"
        ],
        "description": "テンプレートの形式"
      },
      "GroupInfo": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "Name": {
              "type": [
                "string",
                "null"
              ],
              "description": "デバイスグループ名"
            },
            "MatchPath": {
              "type": "string",
              "description": "デバイスグループを識別するために使用されるパス"
            },
            "Owner": {
              "type": "string",
              "description": "デバイスグループの所有者のユーザ名"
            }
          }
        },
        "description": "テンプレートが紐づくデバイスグループの情報"
      }
    },
    "required": [
      "TemplateId",
      "Name",
      "Description",
      "Format",
      "GroupInfo"
    ]
  }
}
Response 403
HideShow
Headers
Content-Type: text/plain
Body
Forbidden

テンプレートの詳細を取得、更新、削除する

テンプレート詳細取得
GET/template/{templateId}

指定したテンプレートの詳細情報を返します。 テンプレート本文(TemplateBody)が含まれます。

必要な権限:ViewTemplates

Example URI

GET /template/a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11
URI Parameters
HideShow
templateId
string (required) Example: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11

テンプレートを識別するためのID

Request
HideShow
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Response 200
HideShow
Headers
Content-Type: application/json
Body
{
  "TemplateId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
  "Name": "SampleTemplateName",
  "Description": "SampleDescription",
  "Format": {
    "FormatType": 0,
    "FormatValue": "Star Document Markup"
  },
  "TemplateBody": "[align: centre]\n${shopName}\n[cut]",
  "GroupInfo": [
    {
      "Name": "SampleName",
      "MatchPath": "SampleMatchPath",
      "Owner": "SampleOwnerName"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "TemplateId": {
      "type": "string",
      "description": "テンプレートを識別するためのID"
    },
    "Name": {
      "type": "string",
      "description": "テンプレート名"
    },
    "Description": {
      "type": [
        "string",
        "null"
      ],
      "description": "テンプレートの説明。未設定の場合はnull"
    },
    "Format": {
      "type": "object",
      "properties": {
        "FormatType": {
          "type": "number",
          "description": "0:Star Document Markup、1:StarXpand Command"
        },
        "FormatValue": {
          "type": "string",
          "description": "形式の表示名"
        }
      },
      "required": [
        "FormatType",
        "FormatValue"
      ],
      "description": "テンプレートの形式"
    },
    "TemplateBody": {
      "type": "string",
      "description": "テンプレート本文"
    },
    "GroupInfo": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "Name": {
            "type": [
              "string",
              "null"
            ],
            "description": "デバイスグループ名"
          },
          "MatchPath": {
            "type": "string",
            "description": "デバイスグループを識別するために使用されるパス"
          },
          "Owner": {
            "type": "string",
            "description": "デバイスグループの所有者のユーザ名"
          }
        }
      },
      "description": "テンプレートが紐づくデバイスグループの情報"
    }
  },
  "required": [
    "TemplateId",
    "Name",
    "Description",
    "Format",
    "TemplateBody",
    "GroupInfo"
  ]
}
Response 403
HideShow
Headers
Content-Type: text/plain
Body
Forbidden
Response 404
HideShow
Headers
Content-Type: text/plain
Body
Not Found

テンプレート更新
PUT/template/{templateId}

指定したテンプレートの情報を更新します。未指定の項目は現在の値が維持されます。 FormatTypeとTemplateBodyは、一方だけを変更する場合でも両方を指定する必要があります。 Descriptionを空にする場合は、空文字列("")を指定してください。

必要な権限:ModifyTemplates

Example URI

PUT /template/a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11
URI Parameters
HideShow
templateId
string (required) Example: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11

テンプレートを識別するためのID

Request
HideShow
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Body
{
  "Name": "SampleTemplateName",
  "Description": "SampleDescription",
  "FormatType": 0,
  "TemplateBody": "[align: centre]\n${shopName}\n[cut]",
  "MatchPaths": [
    "SampleMatchPath1",
    "SampleMatchPath2"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Name": {
      "type": "string",
      "description": "テンプレート名"
    },
    "Description": {
      "type": "string",
      "description": "テンプレートの説明"
    },
    "FormatType": {
      "type": "number",
      "description": "0:Star Document Markup、1:StarXpand Command"
    },
    "TemplateBody": {
      "type": "string",
      "description": "テンプレート本文"
    },
    "MatchPaths": {
      "type": "array",
      "description": "テンプレートを紐づけるデバイスグループのMatchPath。指定する場合は最低1件が必要。同じMatchPathを重複して指定することはできない"
    }
  }
}
Response 200
HideShow
Headers
Content-Type: application/json
Body
{
  "TemplateId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
  "Name": "SampleTemplateName",
  "Description": "SampleDescription",
  "Format": {
    "FormatType": 0,
    "FormatValue": "Star Document Markup"
  },
  "GroupInfo": [
    {
      "Name": "SampleName",
      "MatchPath": "SampleMatchPath",
      "Owner": "SampleOwnerName"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "TemplateId": {
      "type": "string",
      "description": "テンプレートを識別するためのID"
    },
    "Name": {
      "type": "string",
      "description": "テンプレート名"
    },
    "Description": {
      "type": [
        "string",
        "null"
      ],
      "description": "テンプレートの説明。未設定の場合はnull"
    },
    "Format": {
      "type": "object",
      "properties": {
        "FormatType": {
          "type": "number",
          "description": "0:Star Document Markup、1:StarXpand Command"
        },
        "FormatValue": {
          "type": "string",
          "description": "形式の表示名"
        }
      },
      "required": [
        "FormatType",
        "FormatValue"
      ],
      "description": "テンプレートの形式"
    },
    "GroupInfo": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "Name": {
            "type": [
              "string",
              "null"
            ],
            "description": "デバイスグループ名"
          },
          "MatchPath": {
            "type": "string",
            "description": "デバイスグループを識別するために使用されるパス"
          },
          "Owner": {
            "type": "string",
            "description": "デバイスグループの所有者のユーザ名"
          }
        }
      },
      "description": "テンプレートが紐づくデバイスグループの情報"
    }
  },
  "required": [
    "TemplateId",
    "Name",
    "Description",
    "Format",
    "GroupInfo"
  ]
}
Response 400
HideShow

次のいずれかに該当する場合に返されます。
・NameまたはTemplateBodyに空文字を指定した場合
・MatchPathsに空配列を指定した場合
・規定値以外のFormatTypeを指定した場合
・FormatTypeとTemplateBodyの一方のみの変更を指定した場合
・存在しないデバイスグループのMatchPathを指定した場合
・同じMatchPathを重複して指定した場合

Headers
Content-Type: text/plain
Body
Bad Request
Response 403
HideShow
Headers
Content-Type: text/plain
Body
Forbidden
Response 404
HideShow
Headers
Content-Type: text/plain
Body
Not Found
Response 413
HideShow
Headers
Content-Type: text/plain
Body
Payload Too Large

テンプレート削除
DELETE/template/{templateId}

指定したテンプレートを削除します。

必要な権限:DeleteTemplates

デバイスグループを削除すると、削除したデバイスグループ以外に紐付けがないテンプレートは、あわせて削除されます。

Example URI

DELETE /template/a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11
URI Parameters
HideShow
templateId
string (required) Example: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11

テンプレートを識別するためのID

Request
HideShow
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Response 200
Response 403
HideShow
Headers
Content-Type: text/plain
Body
Forbidden
Response 404
HideShow
Headers
Content-Type: text/plain
Body
Not Found

Webhook Notifications

Webhookの一覧を取得、作成する

Webhook一覧取得
GET/a/{groupPath}/n

指定したデバイスグループのWebhookの一覧情報を返します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。

必要な権限:ManageNotifications

Example URI

GET /a/ SampleGroupPath/n
URI Parameters
Hide Show
groupPath
string (required) Example: SampleGroupPath

デバイスグループを識別するために使用されるパス

Request
Hide Show
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Response 200
Hide Show
Headers
Content-Type: application/json
Body
[
            {
              "NotificationId": "12345678-1234-1234-1234-123456789ABC",
              "Name": "SampleName",
              "Target": "SampleURL",
              "TargetType": "POST",
              "Enabled": true,
              "ReportConnectionEvents": true,
              "ReportStatusEvents": true,
              "ReportPeripheralEvents": true,
              "ReportJobEvents": true
            }
          ]
Schema
{
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "NotificationId": {
                  "type": "string",
                  "description": "Webhookを識別するためのID"
                },
                "Name": {
                  "type": "string",
                  "description": "登録するWebhook名"
                },
                "Target": {
                  "type": "string",
                  "description": "webhook通知先のURL"
                },
                "TargetType": {
                  "type": "string",
                  "description": "http通信のメソッドPOSTのみ指定可能"
                },
                "Enabled": {
                  "type": "boolean",
                  "description": "Webhookの有効無効を示す"
                },
                "ReportConnectionEvents": {
                  "type": "boolean",
                  "description": "プリンターへのコネクションイベント発生時の通知の有無を示す"
                },
                "ReportStatusEvents": {
                  "type": "boolean",
                  "description": "プリンターへのジョブイベント発生時の通知の有無を示す"
                },
                "ReportPeripheralEvents": {
                  "type": "boolean",
                  "description": "周辺機器関連のイベント発生時の通知の有無を示す"
                },
                "ReportJobEvents": {
                  "type": "boolean",
                  "description": "プリンターのステータス変化時の通知の有無を示す"
                }
              }
            }
          }
Response 400
Hide Show
Headers
Content-Type: text/plain
Body
Bad Request
Response 403
Hide Show
Headers
Content-Type: text/plain
Body
Forbidden

Webhook作成
POST/a/{groupPath}/n

指定したデバイスグループにWebhookを作成します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。

必要な権限:ManageNotifications

Example URI

POST /a/ SampleGroupPath/n
URI Parameters
Hide Show
groupPath
string (required) Example: SampleGroupPath

デバイスグループを識別するために使用されるパス

Request
Hide Show
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Body
{
            "Enabled": false,
            "Name": "SampleName",
            "ReportConnectionEvents": false,
            "ReportJobEvents": false,
            "ReportPeripheralEvents": false,
            "ReportStatusEvents": false,
            "Target": "SampleURL",
            "TargetType": "POST"
          }
Schema
{
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "object",
            "properties": {
              "Enabled": {
                "type": "boolean",
                "description": "notificationの有効無効の値。"
              },
              "Name": {
                "type": "string",
                "description": "登録するWebhook名"
              },
              "ReportConnectionEvents": {
                "type": "boolean",
                "description": "プリンターへのコネクションイベント発生時に通知するか。"
              },
              "ReportJobEvents": {
                "type": "boolean",
                "description": "プリンターへのジョブイベント発生時の通知の有無を示す。"
              },
              "ReportPeripheralEvents": {
                "type": "boolean",
                "description": "周辺機器関連のイベント発生時の通知の有無を示す。"
              },
              "ReportStatusEvents": {
                "type": "boolean",
                "description": "プリンターのステータス変化時の通知の有無を示す。"
              },
              "Target": {
                "type": "string",
                "description": "webhook通知先のURL"
              },
              "TargetType": {
                "type": "string",
                "description": "http通信のメソッド。デフォルト”POST”を指定"
              }
            }
          }
Response 201
Hide Show
Headers
Content-Type: application/json
Body
{
            "Location": "/v1/a/sample/n/12345678-1234-1234-1234-123456789ABC",
            "NotificationId": "12345678-1234-1234-1234-123456789ABC"
          }
Schema
{
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "object",
            "properties": {
              "Location": {
                "type": "string",
                "description": "作成したリソースアクセスへのエンドポイント"
              },
              "NotificationId": {
                "type": "string",
                "description": "登録したnotification名"
              }
            }
          }
Response 400
Hide Show
Headers
Content-Type: text/plain
Body
Bad Request
Response 403
Hide Show
Headers
Content-Type: text/plain
Body
Forbidden
Response 404
Hide Show
Headers
Content-Type: text/plain
Body
Not Found

Webhookの詳細を取得、更新、削除する

Webhook詳細取得
GET/a/{groupPath}/n/{notificationId}

指定したデバイスグループのWebhookの詳細情報を返します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。

必要な権限:ManageNotifications

Example URI

GET /a/ SampleGroupPath/n/ 12345678-1234-1234-1234-123456789ABC
URI Parameters
Hide Show
groupPath
string (required) Example: SampleGroupPath

デバイスグループを識別するために使用されるパス

notificationId
string (required) Example: 12345678-1234-1234-1234-123456789ABC

Webhookを識別するためのID

Request
Hide Show
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Response 200
Hide Show
Headers
Content-Type: application/json
Body
{
            "NotificationId": "12345678-1234-1234-1234-123456789ABC",
            "Name": "SampleName",
            "Target": "SampleURL",
            "TargetType": "POST",
            "Enabled": true,
            "ReportConnectionEvents": true,
            "ReportStatusEvents": true,
            "ReportPeripheralEvents": true,
            "ReportJobEvents": true
          }
Schema
{
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "object",
            "properties": {
              "NotificationId": {
                "type": "string",
                "description": "Webhookを識別するためのID"
              },
              "Name": {
                "type": "string",
                "description": "登録するWebhook名"
              },
              "Target": {
                "type": "string",
                "description": "webhook通知先のURL"
              },
              "TargetType": {
                "type": "string",
                "description": "http通信のメソッドPOSTのみ指定可能"
              },
              "Enabled": {
                "type": "boolean",
                "description": "Webhookの有効無効を示す"
              },
              "ReportConnectionEvents": {
                "type": "boolean",
                "description": "プリンターへのコネクションイベント発生時の通知の有無を示す"
              },
              "ReportStatusEvents": {
                "type": "boolean",
                "description": "プリンターへのジョブイベント発生時の通知の有無を示す"
              },
              "ReportPeripheralEvents": {
                "type": "boolean",
                "description": "周辺機器関連のイベント発生時の通知の有無を示す"
              },
              "ReportJobEvents": {
                "type": "boolean",
                "description": "プリンターのステータス変化時の通知の有無を示す"
              }
            }
          }
Response 400
Hide Show
Headers
Content-Type: text/plain
Body
Bad Request
Response 403
Hide Show
Headers
Content-Type: text/plain
Body
Forbidden
Response 404
Hide Show
Headers
Content-Type: text/plain
Body
Not Found

Webhook更新
PUT/a/{groupPath}/n/{notificationId}

指定したデバイスグループのWebhookの情報を更新します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。

必要な権限:ManageNotifications

Example URI

PUT /a/ SampleGroupPath/n/ 12345678-1234-1234-1234-123456789ABC
URI Parameters
Hide Show
groupPath
string (required) Example: SampleGroupPath

デバイスグループを識別するために使用されるパス

notificationId
string (required) Example: 12345678-1234-1234-1234-123456789ABC

Webhookを識別するためのID

Request
Hide Show
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Body
{
            "Enabled": false,
            "Name": "SampleName",
            "ReportConnectionEvents": false,
            "ReportJobEvents": false,
            "ReportPeripheralEvents": false,
            "ReportStatusEvents": false,
            "Target": "SampleURL",
            "TargetType": "POST"
          }
Schema
{
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "object",
            "properties": {
              "Enabled": {
                "type": "boolean",
                "description": "notificationの有効無効の値。"
              },
              "Name": {
                "type": "string",
                "description": "登録するWebhook名"
              },
              "ReportConnectionEvents": {
                "type": "boolean",
                "description": "プリンターへのコネクションイベント発生時に通知するか。"
              },
              "ReportJobEvents": {
                "type": "boolean",
                "description": "プリンターへのジョブイベント発生時の通知の有無を示す。"
              },
              "ReportPeripheralEvents": {
                "type": "boolean",
                "description": "周辺機器関連のイベント発生時の通知の有無を示す。"
              },
              "ReportStatusEvents": {
                "type": "boolean",
                "description": "プリンターのステータス変化時の通知の有無を示す。"
              },
              "Target": {
                "type": "string",
                "description": "webhook通知先のURL"
              },
              "TargetType": {
                "type": "string",
                "description": "http通信のメソッド。デフォルト”POST”を指定"
              }
            }
          }
Response 200
Response 400
Hide Show
Headers
Content-Type: text/plain
Body
Bad Request
Response 403
Hide Show
Headers
Content-Type: text/plain
Body
Forbidden
Response 404
Hide Show
Headers
Content-Type: text/plain
Body
Not Found

Webhook削除
DELETE/a/{groupPath}/n/{notificationId}

指定したデバイスグループのWebhookを削除します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。

必要な権限:ManageNotifications

Example URI

DELETE /a/ SampleGroupPath/n/ 12345678-1234-1234-1234-123456789ABC
URI Parameters
Hide Show
groupPath
string (required) Example: SampleGroupPath

デバイスグループを識別するために使用されるパス

notificationId
string (required) Example: 12345678-1234-1234-1234-123456789ABC

Webhookを識別するためのID

Request
Hide Show
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Response 200
Response 400
Hide Show
Headers
Content-Type: text/plain
Body
Bad Request
Response 403
Hide Show
Headers
Content-Type: text/plain
Body
Forbidden
Response 404
Hide Show
Headers
Content-Type: text/plain
Body
Not Found

History

History APIはプリンターに関する履歴情報を取得できます。

履歴情報をエクスポートする

履歴情報のエクスポート
GET/history/export

取得したプリンターの履歴情報をエクスポートします。

必要な権限:ViewDeviceGroups

日時の形式はyyyy-MM-dd HH:mm:ss.ffffffの形式でUTCで出力されます。

startDateとendDateは最大7日の範囲で指定可能です。 また、startDateはリクエスト時刻から最大90日前まで指定可能です。

Example URI

GET /history/export
URI Parameters
Hide Show
startDate
DateTimeOffSet (required) Example: 2025-01-01T00:00:00+09:00

エクスポートするデータの開始日

endDate
DateTimeOffSet (required) Example: 2025-01-02T00:00:00+09:00

エクスポートするデータの終了日

type
string (required) Example: both

エクスポートする対象データを絞るクエリ。 job(印刷履歴のみ),status(プリンターステータス履歴),both(両方)から指定。 デフォルト値はboth

Request
Hide Show
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Response 200
Hide Show
Headers
Content-Type: text/csv
Content-Disposition: attachment; filename="history_yyyyMMddHHmmss.csv"
Body
Date,Status,StatusDisplay,DeviceMAC,SerialNumber,AccessIdentifier,GroupPath,Message,JobLength,JobName,JobPrintAttempts
          2025-01-01 00:00:00.000000,0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 0,Offline,xxxxxxxxxxxx,xxxxxxxxxxxxxxxx,xxxxxxxx,sample,,,,
          2025-01-01 00:00:00.000000,,Complete,xxxxxxxxxxxx,xxxxxxxxxxxxxxxx,xxxxxxxx,sample,,66954,9b815853,0
          2025-01-01 00:00:00.000000,,Received,xxxxxxxxxxxx,xxxxxxxxxxxxxxxx,xxxxxxxx,sample,,66954,9b815853,0
Response 400
Hide Show
Headers
Content-Type: text/plain
Body
Bad Request
Response 403
Hide Show
Headers
Content-Type: text/plain
Body
Forbidden
Response 404
Hide Show
Headers
Content-Type: text/plain
Body
Not Found

MetaInfo

デバイスのメタ一覧情報を取得する

デバイスメタ一覧情報取得
GET/a/{groupPath}/meta-info

指定したデバイスグループに接続されているデバイスのメタ一覧情報を返します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。

必要な権限:ViewDeviceGroups

Example URI

GET /a/ SampleGroupPath/meta-info
URI Parameters
Hide Show
groupPath
string (required) Example: SampleGroupPath

デバイスグループを識別するために使用されるパス

Request
Hide Show
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Response 200
Hide Show
Headers
Content-Type: application/json
Body
[
            {
              "MetaInfoKeyId": 1,
              "Name": "Country",
              "Kind": "List",
              "MetaInfoValues": [
                {
                  "MetaInfoValueId": 1,
                  "Name": "Japan"
                },
                {
                  "MetaInfoValueId": 2,
                  "Name": "USA"
                },
                {
                  "MetaInfoValueId": 3,
                  "Name": "UK"
                }
              ]
            },
            {
              "MetaInfoKeyId": 2,
              "Name": "Contact (phone number)",
              "Kind": "String"
            }
          ]
Schema
{
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "array"
          }
Response 403
Hide Show
Headers
Content-Type: text/plain
Body
Forbidden
Response 404
Hide Show
Headers
Content-Type: text/plain
Body
Not Found