StarIO.Online Web API
StarIO.Online サービスは、プリンターの制御と管理、印刷ジョブの送信と監視、イベント通知の受信に使用できるRESTスタイルのhttp APIを提供します。
最初に、アプリケーションから API を安全に呼び出すために使用できる
API キーを生成 します。 APIキーにはそれぞれのAPIキーに対する権限が付与されるため、権限の有無によりAPIを呼び出せない場合があります。
HOST: https://jp-api.stario.online/v1
Device Groups ¶
デバイスグループの一覧を取得する ¶
デバイスグループ一覧取得
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": "ドメイン名、常にnullとなる"
},
"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
デバイスグループの詳細を取得、更新する ¶
デバイスグループ詳細取得
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": "ドメイン名、常にnullとなる"
},
"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": "このデバイスグループを所有するアカウントの名前、常にnullとなる"
},
"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キーで認証されるアカウントに属している必要があります。
必要な権限:ModifyDeviceGroup
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": "デバイスグループ名"
},
"MatchDomain": {
"type": "string",
"description": "ドメイン名、常にnullとなる"
},
"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": "DeviceGroup名"
},
"MatchPath": {
"type": "string",
"description": "デバイスグループを識別するために使用されるパス"
}
},
"required": [
"Name",
"MatchPath"
]
}
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
Devices ¶
デバイスの一覧を取得する ¶
デバイス一覧取得
GET/a/{groupPath}/d{?notes}{&s}{&metaInfo}
指定したデバイスグループに接続されているデバイスの一覧情報を返します。 デバイスグループはAPIキーで認証されるアカウントに属している必要があります。
必要な権限:EnumDevices
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
},
"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"
}
}
},
"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": "クラウドプリントへポーリングリクエストを送る間隔"
},
"ClientType": {
"type": "string",
"description": "クライアントタイプの識別子"
},
"LastConnection": {
"type": "number",
"description": "サーバーがデバイスから最後に更新を受信してからの時間(秒)"
},
"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
Example URI
- appId
string
(required) Example: 12345678デバイスのアプリケーションアクセスID
- groupPath
string
(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
- notes
boolea
(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,
"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"
},
"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": "クラウドプリントへポーリングリクエストを送る間隔"
},
"ClientType": {
"type": "string",
"description": "クライアントタイプの識別子"
},
"LastConnection": {
"type": "number",
"description": "サーバーがデバイスから最後に更新を受信してからの時間(秒)"
},
"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",
"RequestSetJobIPFilter": "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/名前の変更を要求。このリクエストはサービスのキューに入れられ、デバイスが次にサービスと通信するときに処理される"
},
"RequestSetJobIPFilter": {
"type": "string",
"description": "SME SPO互換のため残しているプロパティ。通常は使用しない"
},
"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はドキュメントの一部としてカット方法を指定できない形式で提供される印刷ジョブにのみ適用されます。たとえば、HTML、Jpeg、PNG、プレーンテキストベースの印刷ジョブには適用されますが、マークアップタグとして既にカッター操作を提供している Star Document Markupベースのジョブでは無視されます。
Star-End-Doc-Feed/endfeedはドキュメントの一部としてカット/フィード操作を指定できない形式で提供される印刷ジョブにのみ適用されます。たとえば、HTML、Jpeg、PNG、プレーンテキストベースの印刷ジョブには適用されますが、マークアップタグとして既にカッター/フィード操作を提供している Star Document Markupベースのジョブでは無視されます。
Example URI
- appId
string
(required) Example: 12345678デバイスのアプリケーションアクセスID
- groupPath
string
(required) Example: SampleGroupPathデバイスグループを識別するために使用されるパス
- name
string
(optional) Example: sample印刷ジョブの名前は、Star-Job-Name ヘッダーまたは star クエリ パラメータとして指定可能。名前は、ジョブの印刷結果を確認するために、Webhookで使用される
- copies
number
(optional) Example: 1印刷部数は、Star-Copies ヘッダーまたは copies クエリ オプションを介して 1 ~ 10 の範囲で指定可能
- startbuzzer
number
(optional) Example: 1Star-Pre-Buzzer ヘッダー、または startbuzzer クエリパラメータとしてドキュメントを印刷前に、デバイスに接続されているブザーを鳴らすよう0 ~ 3の範囲で指定可能
- endbuzzer
number
(optional) Example: 1Star-Post-Buzzer ヘッダー、または endbuzzer クエリパラメータとしてドキュメントを印刷後に、デバイスに接続されているブザーを鳴らすよう0 ~ 3の範囲で指定可能
- drawer
string
(optional) Example: noneジョブの印刷の開始時または終了時に、Star-Cash-Drawer ヘッダーまたは drawer クエリ オプションを使用して、none,start,endを指定しプリンタに接続されているキャッシュ ドロワーを開く
- endcut
string
(optional) Example: none印刷ジョブの最後に実行するカットの種類をnone,partial,fullから指定。これは、Star-End-Doc-Cut ヘッダーまたは endcut クエリ オプションを介して制御可能
- endfeed
string
(optional) Example: noneカットする前に、ドキュメントの端をオートカッターの上に送るかどうかをnone,false,true,feedから指定。Star-End-Doc-Feed ヘッダーまたは endfeed クエリ オプションを介して制御可能
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: `false` (boolean) - 任意のキャッシュドロワー設定
Star-End-Doc-Cut: `false` (boolean) - 任意のドキュメント終了時のカット設定
Star-End-Doc-Feed: `false` (boolean) - 任意のドキュメント終了時のフィード設定
Body
バイナリデータ
201
Headers
Content-Type: application/json
Body
{
"Location": "/v1/a/sample/d/xxxxxxxx/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": "印刷ジョブの名前"
}
}
}
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
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
StarConfigrationを送信する ¶
StarConfigrationを送信
POST/a/{groupPath}/d/{appId}/configuration
デバイスにStarConfigrationを送信します。
必要な権限: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
StarConfigrationFormatData
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
Webhook Notifications ¶
Webhookの一覧を取得、作成する ¶
Webhook一覧取得
GET/v1/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/v1/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": {
"description": "作成したリソースアクセスへのエンドポイント"
"type": "string",
},
"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/v1/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/v1/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/v1/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/v1/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