ThingWorx を使用する前に > ThingWorx でのインポートとエクスポート > 手動によるインポートおよびエクスポート
手動によるインポートおよびエクスポート
Composer では、管理者ユーザーは「インポート/エクスポート」メニューを表示できます。このメニューを使用して、データ、エンティティ、拡張機能のインポートおよびエクスポートが可能です。管理者以外のユーザーは、API を使用して ThingWorx との間でデータを手動でインポートおよびエクスポートできますが、これには特定の デザインタイムのアクセス許可が必要です。
手動インポートおよびエクスポート時には、次のデザインタイムのアクセス許可が適用されます。
ユーザーがエクスポートするには、デザインタイムの読み取りアクセス許可が必要です。
ユーザーがインポートするには、デザインタイムの作成アクセス許可が必要です。
手動によるエクスポート
ブラウザから、次の表の呼び出しを使用して、データとエンティティをエクスポートします。
エンティティのエクスポートでは、バイナリ (application/octet-stream) または XML (TEXT/XML) がサポートされます。
データのエクスポート (ブログ、wiki、ストリーム、ストリームの値、データテーブルのデータ) では、バイナリ (octet-stream) がサポートされます。
エンティティのエクスポート
説明
URL の例
ファイル (バイナリ) にすべてのエンティティをエクスポート
/Thingworx/Exporter/Exporter/?Accept=application/octet-stream&startdate=2015-08-26T11:33:50&enddate=2015-08-28T11:33:52&searchTags=Applications:testTag&repositoryName=SystemRepository&path=/mydir
この例では、すべての入力パラメータが定義されています。
Start Date=
2015-08-26T11:33:50
End Date=
2015-08-28T11:33:52
終了日が定義されていない場合、現在の日付と時刻が使用されます。
Model Tags=
Applications:testTag
Repository=
SystemRepository
Path=
mydir
ファイル (XML) にすべてのエンティティをエクスポート
/Thingworx/Exporter/?Accept=text/xml&startdate=2015-08-26T11:33:50&enddate=2015-08-28T11:33:52&searchTags=Applications:testTag&repositoryName=SystemRepository&path=/mydir
この例では、すべての入力パラメータが定義されています。
Start Date=
2015-08-26T11:33:50
End Date=
2015-08-28T11:33:52
終了日が定義されていない場合、現在の日付と時刻が使用されます。
Model Tags=
Applications:testTag
Repository=
SystemRepository
Path=
mydir
ファイル (バイナリ) に 1 つのエンティティをエクスポート
/Thingworx/Exporter/ThingTemplates/GenericThing?Accept=application/octet-stream&repositoryName=SystemRepository&path=/mydir
この例では、すべての入力パラメータが定義されています。
Entity=ThingTemplate, GenericThing
Repository=System Repository
Path=mydir
ファイル (XML) に 1 つのエンティティをエクスポート
/Thingworx/Exporter/ThingTemplates/GenericThing?Accept=text/xml&repositoryName=SystemRepository&path=/mydir
この例では、すべての入力パラメータが定義されています。
Entity=ThingTemplate, GenericThing
Repository=System Repository
Path=mydir
データのエクスポート
説明
URL の例
ファイルにすべてのデータをエクスポート
/Thingworx/DataExporter/?Accept=application/octet-stream&repositoryName=SystemRepository&path=/mydir
Repository=SystemRepository
Path=mydir
ファイルにデータテーブルのデータをエクスポート
/Thingworx/DataExporter/DataTables/?Accept=application/octet-stream&searchTags=Applications:testTag&repositoryname=SystemRepository&path=/mydir
Model tags=Applications:testTag
Repository=SystemRepository
Path=mydir
ファイルに 1 つのデータをエクスポート
/Thingworx/DataExporter/Streams/AlertHistoryStream?Accept=application/octet-stream&startDate=2015-08-26T11:38:46&endDate=2015-08-28T11:38:49&searchTags=Applications:testTag&respositoryName=SystemRepository&path=/mydir
この例では、すべての入力パラメータが定義されています。
Collection=Streams
Entity Name=AlertHistoryStream
Start Date=
2015-08-26T11:38:46
End Date=
2015-08-28T11:38:49
終了日が定義されていない場合、現在の日付と時刻が使用されます。
Repository=
SystemRepository
Path=
mydir
手動によるインポート
インポートはマルチパートリクエストです。次のようにシンプルな HTML フォームを構築することをお勧めします。
<html>
<body>
<FORM action="/Thingworx/Importer?purpose=import&usedefaultdataprovider=true&WithSubsystems=false"
enctype="multipart/form-data"
method="post"
<P>
<BR>
What files are you sending? <INPUT type="file" name="files"><BR>
<INPUT type="submit" value="Send"> <INPUT type="reset">
</FORM>
</body>
</html>