セルフサービス・アプリケーション API
IBM® QRadar® on Cloud Self Serve アプリケーション API を使用して、 QRadar on Cloud インスタンスのプロビジョニングおよび構成に関連する管理タスクをプログラムで実行します。
Self Serve アプリケーション API の対話式 API ページにアクセスするには、 をクリックします。
Swagger API ページを使用して要求を送信できます。 API ページの外部で要求を送信することもできます。
Swagger API ページを使用した要求の送信
重要:
POST, PUT, or DELETE 要求を送信する前に、まず GET /security_api/get_csrf_token 要求を送信して有効な許可トークンを取得する必要があります。CSRF トークンを取得して
POST/PUT/DELETE 要求を送信するには、以下の手順に従ってください。- 対話式 API ページの
GET /security_api/get_csrf_tokenエンドポイントで、 「GET」をクリックします。 - 「試行する (Try it out)」をクリックし、 「実行」をクリックします。
- トークン値をコピーし、 「許可」をクリックします。
- 「値」 フィールドにトークンを貼り付け、 「許可」をクリックします。
API ページ外での要求の送信
対話式 API ページの外部のアプリケーション・エンドポイントに API GET/POST/PUT/DELETE 要求を送信するには、要求ヘッダーで許可サービス・トークンを渡す必要があります。 QRadar on Cloud Self Serve アプリケーションを使用して、許可サービス・トークンを作成します。
例:
Calling API endpoints using external services:
Requests to these endpoints from external sources should have Authorized Service Token passed to request header e.g.
curl -X POST \
'https://< console_hostname >/console/plugins/< app_id >/app_proxy/authorizedservices_api/authorized_services?label=test1&user_role_id=3&security_profile_id=1' \
-H 'SEC: < *Auth Service Token with Security Administrator user role* > ' \
-H 'accept: application/json'
予期される応答:
{"security_profile_id": 1, "last_used_date": null, "created_by": "QRoC Self Serve", "tenant_id": null, "label": "test1", "id": 26, "user_role_id": 3, "creation_date": 1673373549079, "expiration_date": null, "token": "2b5547bb-f2e1-4aad......"}