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
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
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"
]
}
}
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
デバイスグループ作成
POST/a
新しいデバイスグループを作成します。
パス(MatchPath)は「グループプレフィックス-任意の文字列」の形で指定します。
グループプレフィックスはアカウントごとに決まっている文字列で、通常は最初から用意されているデバイスグループのパスと同じです。
例:グループプレフィックスが「sample」なら「sample-store01」
「-」より後ろは英数字とアンダースコア(_)で1~20文字です(グループプレフィックスと「-」は文字数に含みません)。グループプレフィックスの大文字・小文字は区別されます。
※Enabled と AutoCreateDeviceQueue は、省略すると false になります。プリンターを接続してすぐに使う場合は、どちらも true を指定してください。
必要な権限:CreateDeviceGroups
Example URI
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"
]
}
201
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": "作成したデバイスグループのパス"
}
}
}
400
次のいずれかに該当する場合に返ります。
・名称(Name)が3~100文字でない場合
・パス(MatchPath)の「-」より後ろが、英数字とアンダースコア(_)で1~20文字でない場合
Name・MatchPath が未指定または空の場合や、JobExpirationTime が範囲外の場合は、Content-Type が application/json となり、エラーの詳細が JSON 形式で返ります。
Headers
Content-Type: text/plain
Body
Bad Request
403
必要な権限がない場合や、パスがグループプレフィックスで始まっていない場合に返ります。
Headers
Content-Type: text/plain
Body
Forbidden
409
同じパスのデバイスグループが既にある場合や、作成数が上限に達している場合に返ります。
Headers
Content-Type: text/plain
Body
Conflict
デバイスグループの詳細を取得、更新する ¶
デバイスグループ詳細取得
GET/a/{groupPath}
デバイスグループの詳細情報を返します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。
必要な権限:ViewDeviceGroups
Example URI
- groupPath
-
string(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
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"
]
}
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
デバイスグループ更新
PUT/a/{groupPath}
指定したデバイスグループの情報を更新します。 デバイスグループはAPIキーで認証されるアカウントに属している必要があります。
必要な権限:ModifyDeviceGroups
Example URI
- groupPath
-
string(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
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印刷機能自体の有効無効を切り替えるための設定値"
}
}
}
200
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"
]
}
400
名称(Name)が3~100文字でない場合に返ります。
JobExpirationTime が範囲外の場合は、Content-Type が application/json となり、エラーの詳細が JSON 形式で返ります。
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
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
- 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形式でメタ情報を検索。メタ情報の取得は こちらを参照
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
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"
]
}
}
400
Headers
Content-Type: text/plain
Body
Bad Request
403
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
- appId
-
string(required) Example: 12345678デバイスのアプリケーションアクセスID
- groupPath
-
string(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
- notes
-
boolean(optional) Example: trueレスポンスにNotesを含むかどうか
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
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"
]
}
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
デバイス更新
PUT/a/{groupPath}/d/{appId}
指定したデバイスグループに接続されているデバイスの情報を更新します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。
必要な権限:ModifyDevice
Example URI
- appId
-
string(required) Example: 12345678デバイスのアプリケーションアクセスID
- groupPath
-
string(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
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"
]
}
200
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
デバイス削除
DELETE/a/{groupPath}/d/{appId}
指定したデバイスグループに接続されているデバイスを削除します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。
必要な権限:DeleteDevice
デバイスグループで「新規デバイスのキューを自動作成」が有効になっており、対象削除デバイスがオンラインの場合、次回の接続時にデバイスグループに再度追加されます。
Example URI
- appId
-
string(required) Example: 12345678デバイスのアプリケーションアクセスID
- groupPath
-
string(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
403
Headers
Content-Type: application/json
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
Print Queue ¶
ドキュメントを印刷、削除する ¶
ドキュメント印刷
POST/a/{groupPath}/d/{appId}/q{?name}{&copies}{&startbuzzer}{&endbuzzer}{&drawer}{&endcut}{&endfeed}
ドキュメントをデバイスの印刷キューに送信します。
送信されたドキュメントは、ジョブとしてキューに入った順に印刷されます。
必要な権限:PrintToDevice
指定通りに動作しない事があるため「Star-Pre-BuzzerまたはStar-Post-Buzzer」と、「Star-Cash-Drawer」ヘッダーを同時に指定しないでください。
Star-End-Doc-Cut/endcut および Star-End-Doc-Feed/endfeed は、ドキュメントの一部としてカットまたはカット/フィード操作を指定できない形式で提供される印刷ジョブにのみ適用されます。例えば、HTML、JPEG、PNG、プレーンテキストベースの印刷ジョブには適用されますが、マークアップタグとしてすでにカット/フィード操作を提供しているStar Document Markupベースのジョブでは無視されます。
「Star-Pre-Buzzer/startbuzzerまたはStar-Post-Buzzer/endbuzzer」の指定可能範囲は1
~ 20です。
(mC-Soundでは回数指定は機能しませんので、1回を指定してください)
MQTTで接続されたデバイスで、変更した印字幅で印刷されない場合は、以下のいずれかを実行してください。
1.
ダッシュボードのデバイス詳細ダイアログで「用紙サイズの情報をデバイスと同期する」ボタンをクリックする
2. デバイス更新APIで、リクエストパラメータに
"RenewPageInfo": true を設定して実行する
Example URI
- appId
-
string(required) Example: 12345678デバイスのアプリケーションアクセスID
- groupPath
-
string(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
- name
-
string(optional) Example: sample印刷ジョブの名前を指定します。名前は、ジョブの印刷結果を確認するためにWebhookで使用されます。
Star-Job-Nameヘッダーでも指定できます。両方を指定した場合は、ヘッダーの値が優先されます。 - copies
-
number(optional) Example: 1印刷部数を指定します。指定できる範囲は1 ~ 10です。
Star-Copiesヘッダーでも指定できます。両方を指定した場合は、ヘッダーの値が優先されます。 - startbuzzer
-
number(optional) Example: 1印刷前に、デバイスに接続されているブザーを鳴らす回数を指定します。指定できる範囲は1 ~ 20です。
Star-Pre-Buzzerヘッダーでも指定できます。両方を指定した場合は、ヘッダーの値が優先されます。 - endbuzzer
-
number(optional) Example: 1印刷後に、デバイスに接続されているブザーを鳴らす回数を指定します。指定できる範囲は1 ~ 20です。
Star-Post-Buzzerヘッダーでも指定できます。両方を指定した場合は、ヘッダーの値が優先されます。 - drawer
-
string(optional) Example: noneプリンタに接続されているキャッシュドロワーを開くタイミングを指定します。指定できる値は
none、start、endです。Star-Cash-Drawerヘッダーでも指定できます。両方を指定した場合は、ヘッダーの値が優先されます。 - endcut
-
string(optional) Example: none印刷ジョブの最後に実行するカットの種類を指定します。指定できる値は
none、partial、fullです。Star-End-Doc-Cutヘッダーでも指定できます。両方を指定した場合は、ヘッダーの値が優先されます。 - endfeed
-
string(optional) Example: noneカットする前に、ドキュメントの端をオートカッターの上に送るかどうかを指定します。指定できる値は
none、false、true、feedです。Star-End-Doc-Feedヘッダーでも指定できます。両方を指定した場合は、ヘッダーの値が優先されます。
Headers
Content-Type: text/vnd.star.markup、text/html、text/plain、image/png、image/jpeg
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Star-Job-Name: `sample-job` (string) - 任意のジョブ名
Star-Copies: `1` (number) - 任意のコピー数
Star-Pre-Buzzer: `1` (number) - 任意の印刷前ブザー回数
Star-Post-Buzzer: `1` (number) - 任意の印刷後ブザー回数
Star-Cash-Drawer: `none` (string) - 任意のキャッシュドロワー設定,none,start,endを指定
Star-End-Doc-Cut: `none` (string) - 任意のドキュメント終了時のカット設定,none,partial,fullを指定
Star-End-Doc-Feed: `none` (string) - 任意のドキュメント終了時のフィード設定,none,false,true,feedを指定
Body
バイナリデータ
201
Headers
Content-Type: application/json
Body
{
"Location": "/v1/a/SampleGroupPath/d/12345678/q/1234567",
"JobId": "1234567",
"Name": "xxxxxxxx"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Location": {
"type": "string",
"description": "作成したリソースアクセスへのエンドポイント"
},
"JobId": {
"type": "string",
"description": "印刷ジョブの ID"
},
"Name": {
"type": "string",
"description": "印刷ジョブに付与される任意の名前です。未指定の場合は、ランダムな文字列が自動的に付与されます。※本JobNameは、WebhookのJobNameプロパティと同一の値となります。また、XSS対策のため、「"」は「\"」に、「\」は「\\」に自動的にエスケープされます。"
}
}
}
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
411
Headers
Content-Type: text/plain
Body
Length Required
415
Headers
Content-Type: text/plain
Body
Unsupported Media Type
422
Headers
Content-Type: text/plain
Body
Unprocessable Entity
429
Headers
Content-Type: text/plain
Body
Too Many Requests
ドキュメント削除
DELETE/a/{groupPath}/d/{appId}/q
デバイスの印刷キューから保留中のジョブをすべて削除します。
通常、プリンターがオフラインになっている場合に蓄積される、不要なジョブを削除するために使用されます。
必要な権限:FlushQueue
Example URI
- appId
-
string(required) Example: 12345678デバイスのアプリケーションアクセスID
- groupPath
-
string(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
Headers
Content-Type: application/json
Body
[
"2027655",
"2027656"
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
}
]
}
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
409
Headers
Content-Type: text/plain
Body
Conflict
テンプレートを使い印刷する ¶
テンプレート印刷
POST/a/{groupPath}/d/{appId}/q/template{?name}{&copies}{&startbuzzer}{&endbuzzer}{&drawer}
登録済みのテンプレートにフィールドデータを差し込み、デバイスの印刷キューに送信します。 送信されたドキュメントは、ジョブとしてキューに入った順に印刷されます。 テンプレートの作成・更新・削除についてはTemplate章を参照してください。
必要な権限:PrintToDevice
指定通りに動作しない事があるため「Star-Pre-BuzzerまたはStar-Post-Buzzer」と、「Star-Cash-Drawer」ヘッダーを同時に指定しないでください。
「Star-Pre-Buzzer/startbuzzerまたはStar-Post-Buzzer/endbuzzer」の指定可能範囲は1
~ 20です。
(mC-Soundでは回数指定は機能しませんので、1回を指定してください)
Example URI
- appId
-
string(required) Example: 12345678デバイスのアプリケーションアクセスID
- groupPath
-
string(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
- name
-
string(optional) Example: sample印刷ジョブの名前を指定します。名前は、ジョブの印刷結果を確認するためにWebhookで使用されます。
Star-Job-Nameヘッダーでも指定できます。両方を指定した場合は、ヘッダーの値が優先されます。 - copies
-
number(optional) Example: 1印刷部数を指定します。指定できる範囲は1 ~ 10です。
Star-Copiesヘッダーでも指定できます。両方を指定した場合は、ヘッダーの値が優先されます。 - startbuzzer
-
number(optional) Example: 1印刷前に、デバイスに接続されているブザーを鳴らす回数を指定します。指定できる範囲は1 ~ 20です。
Star-Pre-Buzzerヘッダーでも指定できます。両方を指定した場合は、ヘッダーの値が優先されます。 - endbuzzer
-
number(optional) Example: 1印刷後に、デバイスに接続されているブザーを鳴らす回数を指定します。指定できる範囲は1 ~ 20です。
Star-Post-Buzzerヘッダーでも指定できます。両方を指定した場合は、ヘッダーの値が優先されます。 - drawer
-
string(optional) Example: noneプリンタに接続されているキャッシュドロワーを開くタイミングを指定します。指定できる値は
none、start、endです。Star-Cash-Drawerヘッダーでも指定できます。両方を指定した場合は、ヘッダーの値が優先されます。
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Star-Job-Name: `sample-job` (string) - 任意のジョブ名
Star-Copies: `1` (number) - 任意のコピー数
Star-Pre-Buzzer: `1` (number) - 任意の印刷前ブザー回数
Star-Post-Buzzer: `1` (number) - 任意の印刷後ブザー回数
Star-Cash-Drawer: `none` (string) - 任意のキャッシュドロワー設定,none,start,endを指定
Body
{
"templateId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"data": {
"shopName": "Star Cafe Tokyo",
"orderId": "1001",
"total": 1430
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"templateId": {
"type": "string",
"description": "印刷する登録済みテンプレートのID"
},
"data": {
"type": "object",
"properties": {
"shopName": {
"type": "string"
},
"orderId": {
"type": "string"
},
"total": {
"type": "number"
}
},
"description": "テンプレートに差し込むフィールドデータ。テンプレートに存在しない項目を指定した場合や、値が対応しない記法が残った場合もエラーにはならず、そのまま印刷される"
}
},
"required": [
"templateId",
"data"
]
}
201
Headers
Content-Type: application/json
Body
{
"Name": "xxxxxxxx"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Name": {
"type": "string",
"description": "印刷ジョブに付与される任意の名前です。未指定の場合は、ランダムな文字列が自動的に付与されます。※本JobNameは、WebhookのJobNameプロパティと同一の値となります。また、XSS対策のため、「\"」は「\\\"」に、「\\」は「\\」に自動的にエスケープされます。"
}
}
}
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
413
Headers
Content-Type: text/plain
Body
Payload Too Large
422
Headers
Content-Type: text/plain
Body
Unprocessable Entity
429
Headers
Content-Type: text/plain
Body
Too Many Requests
テンプレートを直接指定して印刷する ¶
テンプレートインライン印刷
POST/a/{groupPath}/d/{appId}/q/template/inline{?name}{&copies}{&startbuzzer}{&endbuzzer}{&drawer}
リクエストに含めたテンプレートにフィールドデータを差し込み、デバイスの印刷キューに送信します。 テンプレートを登録せずに印刷できるため、動作確認や単発の印刷に使用します。 テンプレート本文の形式についてはTemplate章を参照してください。
必要な権限:PrintToDevice
指定通りに動作しない事があるため「Star-Pre-BuzzerまたはStar-Post-Buzzer」と、「Star-Cash-Drawer」ヘッダーを同時に指定しないでください。
「Star-Pre-Buzzer/startbuzzerまたはStar-Post-Buzzer/endbuzzer」の指定可能範囲は1
~ 20です。
(mC-Soundでは回数指定は機能しませんので、1回を指定してください)
Example URI
- appId
-
string(required) Example: 12345678デバイスのアプリケーションアクセスID
- groupPath
-
string(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
- name
-
string(optional) Example: sample印刷ジョブの名前を指定します。名前は、ジョブの印刷結果を確認するためにWebhookで使用されます。
Star-Job-Nameヘッダーでも指定できます。両方を指定した場合は、ヘッダーの値が優先されます。 - copies
-
number(optional) Example: 1印刷部数を指定します。指定できる範囲は1 ~ 10です。
Star-Copiesヘッダーでも指定できます。両方を指定した場合は、ヘッダーの値が優先されます。 - startbuzzer
-
number(optional) Example: 1印刷前に、デバイスに接続されているブザーを鳴らす回数を指定します。指定できる範囲は1 ~ 20です。
Star-Pre-Buzzerヘッダーでも指定できます。両方を指定した場合は、ヘッダーの値が優先されます。 - endbuzzer
-
number(optional) Example: 1印刷後に、デバイスに接続されているブザーを鳴らす回数を指定します。指定できる範囲は1 ~ 20です。
Star-Post-Buzzerヘッダーでも指定できます。両方を指定した場合は、ヘッダーの値が優先されます。 - drawer
-
string(optional) Example: noneプリンタに接続されているキャッシュドロワーを開くタイミングを指定します。指定できる値は
none、start、endです。Star-Cash-Drawerヘッダーでも指定できます。両方を指定した場合は、ヘッダーの値が優先されます。
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Star-Job-Name: `sample-job` (string) - 任意のジョブ名
Star-Copies: `1` (number) - 任意のコピー数
Star-Pre-Buzzer: `1` (number) - 任意の印刷前ブザー回数
Star-Post-Buzzer: `1` (number) - 任意の印刷後ブザー回数
Star-Cash-Drawer: `none` (string) - 任意のキャッシュドロワー設定,none,start,endを指定
Body
{
"rawTemplate": {
"formatType": 0,
"body": "[align: centre]\n${message}\n[cut]"
},
"data": {
"message": "Hello, World!"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"rawTemplate": {
"type": "object",
"properties": {
"formatType": {
"type": "number",
"description": "0:Star Document Markup、1:StarXpand Command"
},
"body": {
"type": "string",
"description": "テンプレート本文(UTF-8)"
}
},
"required": [
"formatType",
"body"
],
"description": "印刷するテンプレート"
},
"data": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"description": "テンプレートに差し込むフィールドデータ"
}
},
"required": [
"rawTemplate",
"data"
]
}
201
Headers
Content-Type: application/json
Body
{
"Name": "xxxxxxxx"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Name": {
"type": "string",
"description": "印刷ジョブに付与される任意の名前です。未指定の場合は、ランダムな文字列が自動的に付与されます。※本JobNameは、WebhookのJobNameプロパティと同一の値となります。また、XSS対策のため、「\"」は「\\\"」に、「\\」は「\\」に自動的にエスケープされます。"
}
}
}
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
413
Headers
Content-Type: text/plain
Body
Payload Too Large
422
Headers
Content-Type: text/plain
Body
Unprocessable Entity
429
Headers
Content-Type: text/plain
Body
Too Many Requests
Welcomeページを印刷する ¶
welcomeページ印刷
PUT/a/{groupPath}/d/{appId}/welcome
welcomeページを再生成し、印刷キューに追加します。
必要な権限:PrintToDevice
Example URI
- appId
-
string(required) Example: 12345678デバイスのアプリケーションアクセスID
- groupPath
-
string(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
429
Headers
Content-Type: text/plain
Body
Too Many Requests
507
Headers
Content-Type: text/plain
Body
Insufficient Storage
StarConfigurationを送信する ¶
StarConfigurationを送信
POST/a/{groupPath}/d/{appId}/configuration
デバイスにStarConfigurationを送信します。
必要な権限:ConfigureDevice
Example URI
- appId
-
string(required) Example: 12345678デバイスのアプリケーションアクセスID
- groupPath
-
string(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
Headers
Content-Type: application/vnd.star.starconfiguration
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Body
StarConfigurationFormatData
201
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
415
Headers
Content-Type: text/plain
Body
Unsupported Media Type
429
Headers
Content-Type: text/plain
Body
Too Many Requests
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
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"
]
}
201
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"
]
}
400
次のいずれかに該当する場合に返されます。
・NameまたはTemplateBodyに空文字を指定した場合
・MatchPathsに空配列を指定した場合
・規定値以外のFormatTypeを指定した場合
・存在しないデバイスグループのMatchPathを指定した場合
・同じMatchPathを重複して指定した場合
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
409
テンプレートの登録数が上限(10件)に達している場合に返されます。
Headers
Content-Type: text/plain
Body
Conflict
413
Headers
Content-Type: text/plain
Body
Payload Too Large
テンプレート一覧取得
GET/template
登録されているテンプレートの一覧情報を返します。 テンプレート本文(TemplateBody)は含まれません。
必要な権限:ViewTemplates
Example URI
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
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"
]
}
}
403
Headers
Content-Type: text/plain
Body
Forbidden
テンプレートの詳細を取得、更新、削除する ¶
テンプレート詳細取得
GET/template/{templateId}
指定したテンプレートの詳細情報を返します。 テンプレート本文(TemplateBody)が含まれます。
必要な権限:ViewTemplates
Example URI
- templateId
-
string(required) Example: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11テンプレートを識別するためのID
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
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"
]
}
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
テンプレート更新
PUT/template/{templateId}
指定したテンプレートの情報を更新します。未指定の項目は現在の値が維持されます。
FormatTypeとTemplateBodyは、一方だけを変更する場合でも両方を指定する必要があります。
Descriptionを空にする場合は、空文字列("")を指定してください。
必要な権限:ModifyTemplates
Example URI
- templateId
-
string(required) Example: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11テンプレートを識別するためのID
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を重複して指定することはできない"
}
}
}
200
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"
]
}
400
次のいずれかに該当する場合に返されます。
・NameまたはTemplateBodyに空文字を指定した場合
・MatchPathsに空配列を指定した場合
・規定値以外のFormatTypeを指定した場合
・FormatTypeとTemplateBodyの一方のみの変更を指定した場合
・存在しないデバイスグループのMatchPathを指定した場合
・同じMatchPathを重複して指定した場合
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
413
Headers
Content-Type: text/plain
Body
Payload Too Large
テンプレート削除
DELETE/template/{templateId}
指定したテンプレートを削除します。
必要な権限:DeleteTemplates
デバイスグループを削除すると、削除したデバイスグループ以外に紐付けがないテンプレートは、あわせて削除されます。
Example URI
- templateId
-
string(required) Example: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11テンプレートを識別するためのID
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
Webhook Notifications ¶
Webhookの一覧を取得、作成する ¶
Webhook一覧取得
GET/a/{groupPath}/n
指定したデバイスグループのWebhookの一覧情報を返します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。
必要な権限:ManageNotifications
Example URI
- groupPath
-
string(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
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": "プリンターのステータス変化時の通知の有無を示す"
}
}
}
}
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
Webhook作成
POST/a/{groupPath}/n
指定したデバイスグループにWebhookを作成します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。
必要な権限:ManageNotifications
Example URI
- groupPath
-
string(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
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”を指定"
}
}
}
201
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名"
}
}
}
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
Webhookの詳細を取得、更新、削除する ¶
Webhook詳細取得
GET/a/{groupPath}/n/{notificationId}
指定したデバイスグループのWebhookの詳細情報を返します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。
必要な権限:ManageNotifications
Example URI
- groupPath
-
string(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
- notificationId
-
string(required) Example: 12345678-1234-1234-1234-123456789ABCWebhookを識別するためのID
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
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": "プリンターのステータス変化時の通知の有無を示す"
}
}
}
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
Webhook更新
PUT/a/{groupPath}/n/{notificationId}
指定したデバイスグループのWebhookの情報を更新します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。
必要な権限:ManageNotifications
Example URI
- groupPath
-
string(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
- notificationId
-
string(required) Example: 12345678-1234-1234-1234-123456789ABCWebhookを識別するためのID
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”を指定"
}
}
}
200
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
Webhook削除
DELETE/a/{groupPath}/n/{notificationId}
指定したデバイスグループのWebhookを削除します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。
必要な権限:ManageNotifications
Example URI
- groupPath
-
string(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
- notificationId
-
string(required) Example: 12345678-1234-1234-1234-123456789ABCWebhookを識別するためのID
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
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
- 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
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
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
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
MetaInfo ¶
デバイスのメタ一覧情報を取得する ¶
デバイスメタ一覧情報取得
GET/a/{groupPath}/meta-info
指定したデバイスグループに接続されているデバイスのメタ一覧情報を返します。
デバイスグループはAPIキーで認証されるアカウントに属している必要があります。
必要な権限:ViewDeviceGroups
Example URI
- groupPath
-
string(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
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"
}
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found

