プライマリ・コンテンツに移動
Oracle Fusion Middleware Oracle WebLogic Server 12.1.3 RESTful管理インタフェース・リファレンス
12c (12.1.3)
E57542-02
  目次へ移動
目次

前
 
次
 

/management/wls/{version}/datasources/id/{data-source-name}

このリソースは、リソースURLで識別されるデータ・ソースを管理します。

リソースでは、次のメソッドがサポートされます。

DELETEメソッド

DELETEメソッドは、リソースURLで識別されるデータ・ソースを削除します。

ロール

管理者

レスポンス本文

返されるレスポンス本文には、データ・ソースの構成が削除されたことを示すメッセージが含まれます。

レスポンス・コード

このメソッドは、標準のHTTPステータス・コードのいずれかを返します。

例1   データ・ソースの削除

この例は、DELETEメソッドを使用して、データ・ソース構成を削除します。

リクエストの例

curl -v \
--user username:password \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-X DELETE http://localhost:7001/management/wls/latest/datasources/id/TestDataSource

レスポンスの例

HTTP/1.1 200 OK

Response Body:
{"messages": [{
    "message": "Successfully deleted 'TestDataSource'.",
    "severity": "SUCCESS"
}]}

GETメソッド

このリソースのGETメソッドは、リソースURLによって識別されるデータ・ソースに関する情報を返します。

ロール

管理者、デプロイヤ、オペレータ、モニター

レスポンス本文

返されるレスポンス本文には、指定したデータ・ソースに関する情報を含むDataSourceエンティティが含まれます。

このメソッドは次のリンクを返すことができます。

  • uri=/management/wls/{version}/datasources rel=parent

  • uri=/management/wls/{version}/datasources/id/{data-source-name}/start rel=action title=start

  • uri=/management/wls/{version}/datasources/id/{data-source-name}/shutdown rel=action title=shutdown

  • uri=/management/wls/{version}/datasources/id/{data-source-name}/test rel=action title=test

  • uri=/management/wls/{version}/datasources/id/{data-source-name}/clearStatementCache rel=action title=clearStatementCache

  • uri=/management/wls/{version}/datasources/id/{data-source-name}/reset rel=action title=reset

  • uri=/management/wls/{version}/datasources/id/{data-source-name}/shrink rel=action title=shrink

  • uri=/management/wls/{version}/datasources/id/{data-source-name}/suspend rel=action title=suspend

  • uri=/management/wls/{version}/datasources/id/{data-source-name}/resume rel=action title=resume

レスポンス・コード

このメソッドは、標準のHTTPステータス・コードのいずれかを返します。

例1   データ・ソースの表示

この例は、GETメソッドを使用して、特定のデータ・ソースに関する情報を検索します。

リクエストの例

curl -v \
--user username:password \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-X GET http://localhost:7001/management/wls/latest/datasources/id/TestDataSource

レスポンスの例

HTTP/1.1 200 OK

Response Body:
{
    "links": [
        {
            "rel": "parent",
            "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources"
        },
        {
            "rel": "action",
            "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/id\/TestDataSource\/start",
            "title": "start"
        },
        {
            "rel": "action",
            "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/id\/TestDataSource\/shutdown",
            "title": "shutdown"
        },
        {
            "rel": "action",
            "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/id\/TestDataSource\/test",
            "title": "test"
        },
        {
            "rel": "action",
            "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/id\/TestDataSource\/clearStatementCache",
            "title": "clearStatementCache"
        },
        {
            "rel": "action",
            "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/id\/TestDataSource\/reset",
            "title": "reset"
        },
        {
            "rel": "action",
            "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/id\/TestDataSource\/shrink",
            "title": "shrink"
        },
        {
            "rel": "action",
            "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/id\/TestDataSource\/suspend",
            "title": "suspend"
        },
        {
            "rel": "action",
            "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/id\/TestDataSource\/resume",
            "title": "resume"
        }
    ],
    "item": {
        "name": "TestDataSource",
        "targets": [
            "myserver",
            "Cluster-0"
        ],
        "jdbcDataSourceParams": {
            "scope": "global",
            "dataSourceList": null,
            "globalTransactionsProtocol": "one phase commit",
            "rowPrefetchSize": 96,
            "streamChunkSize": 256,
            "algorithmType": "failover",
            "connectionPoolFailoverCallbackHandler": null,
            "failoverRequestIfBusy": false,
            "rowPrefetch": true,
            "jndiNames": [
                "jndiName1",
                "jndiName2",
                "jndiName3"
            ],
            "keepConnAfterLocalTx": true,
            "keepConnAfterGlobalTx": false
        },
        "jdbcConnectionPoolParams": {
            "driverInterceptor": "",
            "connectionHarvestMaxCount": 1,
            "connectionHarvestTriggerCount": -1,
            "minCapacity": 1,
            "profileType": 0,
            "connectionLabelingCallback": "",
            "maxCapacity": 30,
            "highestNumWaiters": 2147483647,
            "loginDelaySeconds": 0,
            "secondsToTrustAnIdlePoolConnection": 10,
            "initialCapacity": 2,
            "shrinkFrequencySeconds": 900,
            "testFrequencySeconds": 120,
            "testTableName": "SQL SELECT 1 FROM SYS.SYSTABLES",
            "testConnectionsOnReserve": false,
            "connectionReserveTimeoutSeconds": 10,
            "connectionCreationRetryFrequencySeconds": 0,
            "inactiveConnectionTimeoutSeconds": 0,
            "statementCacheSize": 10,
            "statementCacheType": "least recently used",
            "statementTimeout": -1,
            "countOfTestFailuresTillFlush": 2,
            "countOfRefreshFailuresTillDisable": 2,
            "profileHarvestFrequencySeconds": 300,
            "initSql": "",
            "fatalErrorCodes": "",
            "removeInfectedConnections": true,
            "jdbcXaDebugLevel": 10,
            "ignoreInUseConnectionsEnabled": true,
            "credentialMappingEnabled": false,
            "pinnedToThread": false,
            "identityBasedConnectionPoolingEnabled": false,
            "wrapTypes": true,
            "wrapJdbc": true
        },
        "jdbcDriverParams": {
            "properties": [
                {
                    "name": "portNumber",
                    "value": "1527"
                },
                {
                    "name": "databaseName",
                    "value": "demo;create=true"
                },
                {
                    "name": "serverName",
                    "value": "localhost"
                }
            ],
            "driverName": "org.apache.derby.jdbc.ClientXADataSource",
            "systemProperties": [],
            "url": "jdbc:derby:\/\/localhost:1527\/demo",
            "useXaDataSourceInterface": true,
            "usePasswordIndirection": false
        },
        "aggregateMetrics": {
            "reserveRequestCount": 3,
            "failedReserveRequestCount": 0,
            "waitingForConnectionTotal": 0,
            "waitingForConnectionSuccessTotal": 0,
            "waitingForConnectionFailureTotal": 0,
            "currCapacityHighCount": 3,
            "state": "Shutdown",
            "prepStmtCacheAccessCount": 0,
            "prepStmtCacheAddCount": 0,
            "prepStmtCacheDeleteCount": 0,
            "prepStmtCacheCurrentSize": 0,
            "prepStmtCacheHitCount": 0,
            "prepStmtCacheMissCount": 0,
            "currCapacity": 0,
            "numAvailable": 0,
            "highestNumAvailable": 3,
            "numUnavailable": 0,
            "highestNumUnavailable": 3,
            "leakedConnectionCount": 0,
            "failuresToReconnectCount": 0,
            "connectionDelayTime": 238,
            "activeConnectionsCurrentCount": 0,
            "waitingForConnectionCurrentCount": 0,
            "activeConnectionsHighCount": 3,
            "waitingForConnectionHighCount": 0,
            "waitSecondsHighCount": 0,
            "connectionsTotalCount": 3,
            "activeConnectionsAverageCount": 0
        },
        "dataSourceMetrics": [
            {
                "reserveRequestCount": 1,
                "failedReserveRequestCount": 0,
                "waitingForConnectionTotal": 0,
                "waitingForConnectionSuccessTotal": 0,
                "waitingForConnectionFailureTotal": 0,
                "currCapacityHighCount": 1,
                "state": "Shutdown",
                "prepStmtCacheAccessCount": 0,
                "prepStmtCacheAddCount": 0,
                "prepStmtCacheDeleteCount": 0,
                "prepStmtCacheCurrentSize": 0,
                "prepStmtCacheHitCount": 0,
                "prepStmtCacheMissCount": 0,
                "currCapacity": 0,
                "numAvailable": 0,
                "highestNumAvailable": 1,
                "numUnavailable": 0,
                "highestNumUnavailable": 1,
                "leakedConnectionCount": 0,
                "failuresToReconnectCount": 0,
                "connectionDelayTime": 4,
                "activeConnectionsCurrentCount": 0,
                "waitingForConnectionCurrentCount": 0,
                "activeConnectionsHighCount": 1,
                "waitingForConnectionHighCount": 0,
                "waitSecondsHighCount": 0,
                "connectionsTotalCount": 1,
                "activeConnectionsAverageCount": 0,
                "serverName": "myserver"
            }
        ]
    }
}

POSTメソッド

このリソースのPOSTメソッドは、リソースURLによって識別されるデータ・ソースを再構成します。

ロール

管理者

リクエスト本文

POSTリクエスト本文には、完全に移入された、必要なデータ・ソース構成を含むDataSourceエンティティが含まれている必要があります。読取り専用パラメータ値は無視されます。

レスポンス本文

返されるレスポンス本文には、データ・ソースの構成が更新されたことを示すメッセージが含まれます。

レスポンス・コード

このメソッドは、標準のHTTPステータス・コードのいずれかを返します。

例1   データ・ソースの編集

この例は、POSTメソッドを使用して、データ・ソース構成を更新します。

リクエストの例

curl -v \
--user username:password \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-H Content-Type:application/json \
-d "{
    'name': 'TestDataSource',
    'targets': [ 'myserver', 'Cluster-0' ],
    'jdbcDriverParams': {
        'properties': [
             { name: 'portNumber', value: '1527' }, 
             { name: 'databaseName', value: 'demo;create=true' }, 
             { name: 'serverName', value: 'localhost' }
        ],
        'password': 'password1',
        'driverName': 'org.apache.derby.jdbc.ClientXADataSource',
        'url': 'jdbc:derby://localhost:1527/demo',
        'systemProperties': [],
        'usePasswordIndirection': false,
        'useXaDataSourceInterface': true
    },
    'jdbcDataSourceParams': {
        'scope': 'global',
        'algorithmType': 'failover',
        'connectionPoolFailoverCallbackHandler': null,
        'failoverRequestIfBusy': false,
        'dataSourceList': null,
        'globalTransactionsProtocol': 'one phase commit',
        'rowPrefetchSize': 96,
        'streamChunkSize': 256,
        'rowPrefetch': true,
        'keepConnAfterLocalTx': true,
        'keepConnAfterGlobalTx': false,
        'jndiNames': [ 'jndiName1', 'jndiName2', 'jndiName3' ]
    },
    'jdbcConnectionPoolParams': {
        'profileHarvestFrequencySeconds': 300,
        'driverInterceptor': '',
        'connectionHarvestMaxCount': 1,
        'connectionHarvestTriggerCount': -1,
        'minCapacity': 1,
        'profileType': 0,
        'connectionLabelingCallback': '',
        'maxCapacity': 30,
        'highestNumWaiters': 2147483647,
        'loginDelaySeconds': 0,
        'secondsToTrustAnIdlePoolConnection': 10,
        'initialCapacity': 2,
        'shrinkFrequencySeconds': 900,
        'testFrequencySeconds': 120,
        'testTableName': 'SQL SELECT 1 FROM SYS.SYSTABLES',
        'testConnectionsOnReserve': false,
        'connectionReserveTimeoutSeconds': 10,
        'connectionCreationRetryFrequencySeconds': 0,
        'inactiveConnectionTimeoutSeconds': 0,
        'statementCacheSize': 10,
        'statementCacheType': 'least recently used',
        'statementTimeout': -1,
        'countOfTestFailuresTillFlush': 2,
        'countOfRefreshFailuresTillDisable': 2,
        'fatalErrorCodes': '',
        'initSql': '',
        'ignoreInUseConnectionsEnabled': true,
        'removeInfectedConnections': true,
        'credentialMappingEnabled': false,
        'pinnedToThread': false,
        'identityBasedConnectionPoolingEnabled': false,
        'wrapTypes': true,
        'wrapJdbc': true,
        'jdbcXaDebugLevel': 10
    }
}" \
-X POST http://localhost:7001/management/wls/latest/datasources/id/TestDataSource

レスポンスの例

HTTP/1.1 200 OK

Response Body:
{"messages": [{
    "message": "Successfully updated 'TestDataSource'.",
    "severity": "SUCCESS"
}]}