Created date作成日Updated date | 更新日 | Affects version影響を受けるバージョンFix version | 修正バージョン |
---|---|---|---|
|
| Management Portal | N/A |
Table of Contents |
---|
This page will cover basics on how to utilize Management Portal APIs when exporting reports from the system.
More detailed examples and full descriptions for all available endpoint and their respective parameters can be found from API Guide available within the "Support"-tab in Management Portal.
Below table describes currently available report export endpoints and their differences on a higher level and allows user to choose the best option for the requirements.
...
この記事では、システムからレポートをエクスポートする際に、Management Portal APIを使用する基本的な方法について説明します。
利用可能なすべてのエンドポイントと対応する各パラメーターに関する詳細な例と説明は、Management Portalの「サポート」タブ内にあるAPIガイドを参照してください。
次の表は、現在利用可能なレポートエクスポートのエンドポイントとその違いを上位のレベルで説明し、要件に最適なオプションを選択できるようにしたものです。
エンドポイント | メソッド | リクエストフォーマット | 1つのリクエストで複数レポートがエクスポート可能 | レポートのフィルター機能が利用可能 | 説明 | |
---|---|---|---|---|---|---|
Export reports | /report/export/{uuid} | GET | N/A | ![]() | ![]() | Export a single report with its UUID.単一のレポートをそのUUIDでエクスポートします。 |
Export reports (GET) | /report/export?@imei={imei} | GET | N/A | ![]() | ![]() | Export past month's reports with optional IMEI filtering.オプションのIMEIフィルターを使用して、過去1か月のレポートをエクスポートします。 |
Export reports (POST) | /report/export | POST | application/json | ![]() | ![]() | Export reports with more advanced filters/options provided in the request body. |
Export Report
The most simple form of exporting an individual report, requires the report UUID to be provided as part of the endpoint.
...
リクエスト本文 (body) で指定されたフィルタ/オプションを使用してレポートをエクスポートします。 |
レポートのエクスポート
個々のレポートをエクスポートする最もシンプルな形式を使用する場合、エンドポイントの中にレポートUUIDを指定する必要があります。
次の例では、{UUID}を有効なレポートUUIDに、{API_KEY} with the key string of your API key. If you don't have an API key yet, see more details from API Keys documentation.をAPIキーのキー文字列に置き換えてください。まだAPIキーをお持ちでない場合は、API Keys の記事を参照してください。
Code Block | ||
---|---|---|
| ||
curl -X "GET" \ "https://api.eu-west-1.blancco.cloud/v1/report/export/{UUID}" \ -H "accept: */*" \ -H "X-BLANCCO-API-KEY: {API_KEY}" |
By default the report is exported in XML format. Also PDF and JSON are supported, the format can be changed by defining デフォルトでは、レポートはXML形式でエクスポートされます。PDFとJSONもサポートされており、UUIDの後にリクエストURLの一部として "?format=" parameter as part of the request URL after the UUID. Supported values for the format parameter are XML, JSON and PDF.パラメータを指定することで形式を変更することができます。formatパラメータでサポートされている値は、XML、JSON、PDFです。
Code Block | ||
---|---|---|
| ||
curl -X "GET" \ "https://api.eu-west-1.blancco.cloud/v1/report/export/{UUID}?format=PDF" \ -H "accept: */*" \ -H "X-BLANCCO-API-KEY: {API_KEY}" |
...
レポートのエクスポート (GET)
Export past month's reports with optional IMEI filtering. If the report is not created during the past month it will not be included in the results.
In the following examples replace {IMEI} with a valid device IMEI and オプションのIMEIフィルターを使用して、過去1か月のレポートをエクスポートします。過去1ヶ月の間にレポートが作成されていない場合、レポートは結果に含まれません。
次の例では、{IMEI}をデバイスの有効なIMEIに、{API_KEY} with the key string of your API key. If you don't have an API key yet, see more details from API Keys documentation.をAPIキーのキー文字列に置き換えます。まだAPIキーをお持ちでない場合は、API Keys の記事を参照してください。
Code Block | ||
---|---|---|
| ||
curl -X "GET" \ "https://api.eu-west-1.blancco.cloud/v1/report/export?@imei={IMEI}" \ -H "accept: */*" \ -H "X-BLANCCO-API-KEY: {API_KEY}" |
...
レポートのエクスポート (POST)
Export reports with the options provided in the request body. Allows user to define more defined search criteria and only return matching reports.
Supported report fields
...
リクエスト本文で指定されたオプションを使用してレポートをエクスポートします。より明確な検索条件を指定して、一致するレポートのみを返すことができます。
サポートされるレポートのフィールド
フィールド名 | XMLフィールドパス | 名前 |
---|---|---|
IMEI | blancco_hardware_report.system.imei | @imei |
System Serial | blancco_hardware_report.system.serial | @system_serial |
Erasure State | blancco_erasure_report.erasures.erasure.state | @erasure_state |
Custom field | user_data.fields.{CUSTOM_FIELD_NAME} | @custom-{CUSTOM_FIELD_NAME} |
Additionally multiple other parameters can be defined to further limit the returned results and the output format.
Additional parameters
...
他にも複数のパラメータを指定して返される結果を絞り込み、出力形式を指定することもできます。
追加パラメータ
パラメータ | 説明 |
---|---|
date | エクスポートするレポートの日付範囲。このオブジェクトは、次の有効な名前を持つプロパティで構成されます:lte (less than or equal), lt 以下)、lt (less than, 未満), eq 、eq (equal, 等しい) , gt 、gt (greater than, 以上) , and gte 、gte (greater than or equal, 以上) . If this isn't defined, the default is to export reports from the past month. For example, in order to export all reports from January 2021, you'd use the following。 定義されていない場合、デフォルトでは過去1か月のレポートがエクスポートされます。 例えば、2021年1月のすべてのレポートをエクスポートするには、次のように指定します: {"gte". "2021-01-01T00:00:00Z", "lt": "2021-02-01T00:00:00Z"}. In order to disable date filtering, use an empty object. Default range of past month is derived by decreasing the "number" of the month. E.g. if the current date at the time the export is executed is 2021dateのフィルター機能を無効にするには、空のオブジェクトを使用します。過去1ヶ月のデフォルトの範囲は、月の 「数値」を減らすことで導き出されます。例えば、エクスポートが実行時の現在の日時が2021-03-01T07:00:00Z, then that becomes the end of the date range and start would be 202100Zであれば、それが日付範囲の終了日時になり、開始は2021-02-01T07:00:00Z.00Zになります。 |
format | Format of the exported report. If omitted, default format for ERASURE reports is エクスポートされるレポートの形式。省略した場合、消去レポートのデフォルトの形式は"XML".です。 Valid values有効な値:"CSV", 、"JSON", and 、および"XML". |
container Container in which all individual reports are wrapped in. | Valid valuesすべての個別レポートが含まれるコンテナの形式。 有効な値: "NONE " and および "ZIP" (default).(デフォルト)。 With "NONE", the reports are wrapped into a single document of the same format as the reports themselves. For example, if format is を指定すると、レポートはレポート自体と同じ形式の単一のファイルにまとめられます。例えば、formatが"XML" and container is でcontainerが"NONE", a single XML document is returned that contains all individual XML reports. When container is の場合、個々のXMLレポートをすべて含む1つのXMLファイルが返されます。containerが"ZIP", all reports have their own file within the returned ZIP file.の場合、返されたZIPファイル内にはすべての個別のファイルが含まれます。 |
Code Block | ||
---|---|---|
| ||
{ "filter": { "date": { "gte": "2023-01-01T00:00:00Z" }, "fields": [ { "name": "@imei", "like": "{IMEI}" }, { "name": "@custom-my custom field", "like": "{CUSTOM_FIELD_VALUE}" } ] }, "format": "XML", "container": "ZIP" } |
Example Request
This example request would export XML format reports for IMEI 123456789012345 created after 1st of January 2023. The exported reports will be returned in a zip folder (each report in its own separate file).
...
リクエストの例
このリクエスト例では、2023年1月1日以降に作成されたIMEI 123456789012345のXML形式のレポートをエクスポートします。エクスポートされたレポートはzipフォルダで返されます (各レポートは個別ファイル) 。
次の例では、IMEIを有効なIMEIに、{API_KEY} with the key string of your API key. If you don't have an API key yet, see more details from API Keys documentation.をAPIキーのキー文字列に置き換えます。まだAPIキーをお持ちでない場合は、API Keysの記事を参照してください。
Code Block |
---|
curl -X 'POST' \ 'https://api.eu-west-1.blancco.cloud/v1/report/export' \ -H 'accept: */*' \ -H 'X-BLANCCO-API-KEY: {API_KEY}' \ -H 'Content-Type: application/json' \ -d '{ "filter": { "date": { "gte": "2023-01-01T00:00:00Z" }, "fields": [ { "name": "@imei", "like": "123456789012345" }, { "name": "@custom-my custom field", "like": "my custom field value" } ] }, "format": "XML", "container": "ZIP" }' |
...