管理対象サーバーの起動

POSTリクエストを送信して、WebLogicドメインで管理対象サーバーを同期的に起動することができます。次のステップは、cURLを使用してこのPOSTリクエストを構築する方法を示しています。
  1. ドメインの管理サーバーのホスト名およびポートを識別し、/management/weblogic/{version}/domainRuntime/serverLifeCycleRuntimes/{name}/startエンドポイントを使用してGETリクエストを構成します。このWebLogic Serverリクエストは次のURL構造を使用します:
    http://localhost:7001/management/weblogic/{version}/domainRuntime/serverLifeCycleRuntimes/{name}/start
  2. cURLコマンド・ラインでヘッダーを指定します。
    • -H X-Requested-By:MyClient

    • -H Accept:application/json

    • -H Content-Type:application/json

  3. POSTリクエストを作成します。URLに、起動するサーバーの名前を指定します。この例では、Cluster1Server1というサーバーを起動します。

    http://localhost:7001/management/weblogic/latest/domainRuntime/serverLifeCycleRuntimes/Cluster1Server1/start

POSTリクエストの全体は、次のサンプルのとおりです。

curl -v \
--user admin:admin123 \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-X POST http://localhost:7001/management/weblogic/latest/domainRuntime/serverLifeCycleRuntimes/Cluster1Server1/start

このPOSTリクエストはタスクの進行状況を返します。サーバーが正常に起動すると、COMPLETEDステータスが返されます。

HTTP/1.1 200 OK

Response Body:
{
    "links": [{
        "rel": "job",
        "href": "http:\/\/localhost:7001\/management\/weblogic\/latest\/domainRuntime\/serverLifeCycleRuntimes\/Cluster1Server1\/tasks\/_0_start"
    }],
    "identity": [
        "serverLifeCycleRuntimes",
        "Cluster1Server1",
        "tasks",
        "_0_start"
    ],
    "running": false,
    "systemTask": false,
    "endTimeAsLong": 1507164728441,
    "name": "_0_start",
    "progress": "success",
    "description": "Starting Cluster1Server1 server ...",
    "serverName": "Cluster1Server1",
    "taskError": null,
    "startTimeAsLong": 1507164708726,
    "type": "ServerLifeCycleTaskRuntime",
    "operation": "start",
    "taskStatus": "TASK COMPLETED",
    "parentTask": null,
    "completed": true,
    "intervalToPoll": 1000,
    "startTime": "2017-10-04T20:51:48.726-04:00",
    "endTime": "2017-10-04T20:52:08.441-04:00"
}