集成 API 提供了某些端点以便于与第三方软件集成。使用以下方法和密钥将 Lexmark Cloud Fleet Management 集成到您的系统:
此调用检索组织及其子组织中资产的计数器,例如计量器。组织由 Authorization 标头中指定的令牌确定,该令牌必须从 Retrieve Token 调用中检索。
方法 | URL |
---|---|
GET | <INTEGRATION_SERVICE_URL>/assets/inventory/counters |
无。
{ "type": "array", "items": { "type": "object", "required": [ "serialNumber", "dateCollected", "counters" ], "properties": { "serialNumber": { "type": "string" }, "dateCollected": { "type": "integer" }, "counters": { "type": "object", "properties": { "lifetimeCount": { "type": "integer" }, "colorPrintSideCount": { "type": "integer" }, "colorPrintSheetCount": { "type": "integer" }, "monoPrintSideCount": { "type": "integer" }, "monoPrintSheetCount": { "type": "integer" }, "printSideCount": { "type": "integer" }, "printSheetCount": { "type": "integer" }, "colorCopySideCount": { "type": "integer" }, "colorCopySheetCount": { "type": "integer" }, "monoCopySideCount": { "type": "integer" }, "monoCopySheetCount": { "type": "integer" }, "copySideCount": { "type": "integer" }, "copySheetCount": { "type": "integer" }, "colorFaxSideCount": { "type": "integer" }, "colorFaxSheetCount": { "type": "integer" }, "monoFaxSideCount": { "type": "integer" }, "monoFaxSheetCount": { "type": "integer" }, "faxSideCount": { "type": "integer" }, "faxSheetCount": { "type": "integer" }, "colorSideCount": { "type": "integer" }, "colorSheetCount": { "type": "integer" }, "monoSideCount": { "type": "integer" }, "monoSheetCount": { "type": "integer" }, "totalSideCount": { "type": "integer" }, "totalSheetCount": { "type": "integer" }, "largeSideCount": { "type": "integer" }, "largeSheetCount": { "type": "integer" }, "duplexSideCount": { "type": "integer" }, "duplexSheetCount": { "type": "integer" }, "coverageTierBusinessSideCount": { "type": "integer" }, "coverageTierBusinessSheetCount": { "type": "integer" }, "coverageTierGraphicsSideCount": { "type": "integer" }, "coverageTierGraphicsSheetCount": { "type": "integer" }, "coverageTierHighlightSideCount": { "type": "integer" }, "coverageTierHighlightSheetCount": { "type": "integer" }, }, }, }, }, "minItems": 0 }
[ { "serialNumber": "14", "dateCollected": 1557259523000, "counters": { "monoPrintSideCount": 262, "printSideCount": 262, "printSheetCount": 262, "monoCopySideCount": 40, "copySideCount": 40, "copySheetCount": 40, "monoFaxSideCount": 0, "faxSideCount": 0, "faxSheetCount": 0, "monoSideCount": 302, "totalSideCount": 302, "totalSheetCount": 302, "duplexSheetCount": 0 } }, { "serialNumber": "29", "dateCollected": 1557259523000, "counters": { "lifetimeCount": 139, "monoPrintSideCount": 139, "printSideCount": 139, "printSheetCount": 136, "copySideCount": 0, "monoSideCount": 139, "totalSideCount": 139, "totalSheetCount": 136, "duplexSheetCount": 3 } }, { "serialNumber": "36", "dateCollected": null, "counters": { } } ]
此调用生成一个适合与 Retrieve Asset Counters 调用一起使用的令牌。
方法 | URL |
---|---|
POST | <IDP_URL>oauth/token |
{ "grant_type": "client_credentials", "client_id": "<CLIENT_ID>", "client_secret": "<CLIENT_SECRET>" }
{ "properties" : { "access_token": {"type": "string"}, "token_type": {"type": "string"}, "expires_in": {"type": "integer"}, "created_at": {"type": "integer"} }, "required": ["access_token", "token_type", "expires_in", "created_at"] }
{ "access_token": "abcd1234", "token_type": "bearer", "expires_in": 7200, "created_at": 1572633120 }