登録プロセスの開始
post
/iot/api/v2/registrations/{registration-id}
一括登録ファイルがアップロードされた後、「登録ファイルのアップロード」APIによって返された登録識別子を使用して、登録プロセスを開始します。
リクエスト
サポートされているメディア・タイプ
- application/json
パス・パラメータ
トップに戻る
レスポンス
サポートされているメディア・タイプ
- application/json
- application/vnd.oracle.resource+json;type=singular
例
次の例では、cURLを使用してRESTリソースに対するPOSTリクエストを発行することによって、登録プロセスを開始する方法を示しています。 リクエストとレスポンスの両方で、iotserverが、実際に割り当てられたOracle IoT Cloud Serviceインスタンスの名前とポートに置き換えられることに注意してください。 Cloud Serviceインスタンスの形式は, myinstance-myidentitydomain.iot.us.oraclecloud.comであり、デフォルトのポートは443です。 cURLの詳細は、「cURLの使用」を参照してください。
curl -X POST -k -u username@example.com:welcome1 -H "Accept: application/json" -H "Content-Type: application/json" -d '{"conflictResolution":"RESOLUTION_APPEND_UPDATE_METADATA"}' https://iotserver/iot/api/v2/registrations/0-AI
レスポンス・ヘッダーの例
レスポンス・ヘッダーの例を次に示します。
HTTP/1.1 200 OK Content-Type: application/json
レスポンス本文の例
JSON形式のレスポンス本文のコンテンツの例を次に示します。
{
"id" : "0-AI",
"name" : "batchRegistration-02.01.2016",
"description" : "example",
"status" : "COMPLETED",
"resolutionMethod" : "RESOLUTION_APPEND_UPDATE_METADATA",
"successCount" : 3,
"failedCount" : 0,
"ignoredCount" : 0,
"registeredCount" : 3,
"updatedCount" : 0,
"links" : [ {
"href" : "https://iotserver/iot/api/v2/registrations/0-AI",
"rel" : "self"
}, {
"href" : "https://iotserver/iot/api/v2/registrations/0-AI",
"rel" : "canonical"
} ],
"successEntries" : {
"links" : [ {
"href" : "https://iotserver/iot/api/v2/registrations/0-AI/successEntries",
"rel" : "canonical"
} ]
},
"ignoredEntries" : {
"links" : [ {
"href" : "https://iotserver/iot/api/v2/registrations/0-AI/ignoredEntries",
"rel" : "canonical"
} ]
},
"failedEntries" : {
"links" : [ {
"href" : "https://iotserver/iot/api/v2/registrations/0-AI/failedEntries",
"rel" : "canonical"
} ]
}
}
curl -X POST
-u <username>:<password>
-H 'Accept: application/json'
-H 'Content-Type: application/json'
https://iotserver/iot/api/v2/registrations/{registration-id}
完全なcURLの例
以下の例は、記述された操作を実行するために使用できる完全なcURLコマンドを示しています:
curl -X POST
-u <username>:<password>
-H 'Accept: application/json'
-H 'Content-Type: application/json'
-d '{"conflictResolution":"RESOLUTION_APPEND_UPDATE_METADATA"}'
https://iotserver/iot/api/v2/registrations/555f17445e3a-76cd
このリクエストでは、
https://iotserverは、割り当てられたIoTクラウド・サービス・インスタンスの名前とポートに置き換えられます。 クラウド・サービスのインスタンスの形式はhttps://myinstance-myidentitydomain.iot.us.oraclecloud.comで、デフォルトのポートは443です。