将“云设备群管理”集成到第三方软件

集成 API 提供了某些端点以便于与第三方软件集成。使用以下方法和密钥将 Lexmark Cloud Fleet Management 集成到您的系统:

检索资产计数器

此调用检索组织及其子组织中资产的计数器,例如计量器。组织由 Authorization 标头中指定的令牌确定,该令牌必须从 Retrieve Token 调用中检索。

注意: 随着 API 版本 1.0 端点的引入,该端点现已弃用。

方法

URL

GET

<INTEGRATION_SERVICE_URL>/assets/inventory/counters


标头

密钥

描述

Authorization

Bearer <TOKEN>

Retrieve Token 调用可返回令牌。


主体

无。

返回模式

{ "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 }

Sample response

[ { "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


注意: 对于欧盟数据中心中的组织,<IDP_URL> 为 https://idp.eu.iss.lexmark.com,或对于美国数据中心中的组织,则为 https://idp.us.iss.lexmark.com/
标头

密钥

Content-Type

application/json


主体

{ "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"] }

Sample response

{ "access_token": "abcd1234", "token_type": "bearer", "expires_in": 7200, "created_at": 1572633120 }