API 워크플로우 스크립트 예제
이 예제에서 스크립트를 사용하여 CSV 형식으로 유스 케이스 탐색기 보고서를 다운로드하십시오.
중요: 형식화 문제로 인해 스크립트를 텍스트 편집기에 붙여넣은 후 캐리지 리턴 또는 줄 바꾸기 문자를 제거하십시오.
필터 코드를 다른 필터 세부사항으로 대체할 수 있습니다. 다음 행에서 굵은체 컨텐츠를 유스 케이스 탐색기 필터에 설명된 다른 필터 컨텐츠로 대체하십시오.
--data-raw '{"filters": [{"name":"rule","type":"ATTRIBUTE","recursive":true,"matchCriteria":"PARTIAL","values":[true],"attributeName":"",valueType":"EXCLUSIVE_COMMON"}],"columns":["N","GR","RC","T","RO","EN","RE","CD","MD"]}' /* Begin by initiating the report generation with POST/api/use_case_explorer. */
curl --header 'SEC: xxxx-xxxxx-xxxxx-xxxx' --location --request POST 'https://{qradar ip}/console/plugins/{UCM App ID}/app_proxy/api/use_case_explorer' \
--header 'Content-Type: application/json' \
--data-raw '{"filters":[{"name":"rule","type":"ATTRIBUTE","recursive":true,"matchCriteria":"PARTIAL","values":[true],"attributeName":"",valueType":"EXCLUSIVE_COMMON"}],"columns":["N","GR","RC","T","RO","EN","RE","CD","MD"]}'
/* Return the current status of report generation from POST/api/use_case_explorer by calling GET /api/use_case_explorer/{reportId}/status. */
curl --header 'SEC: xxxx-xxxxx-xxxxx-xxxx' --location --request GET 'https://{qradar ip}/console/plugins/{UCM App ID}/app_proxy/api/use_case_explorer/{report id}/status' \
/* To download the report in CSV format, once GET /api/use_case_explorer/{reportId}/status
returns a status of COMPLETED, use POST /api/use_case_explorer/{reportId}/download_csv
to initiate the job to generate a CSV report */
curl --header 'SEC: xxxx-xxxxx-xxxxx-xxxx' --location --request POST 'https://{qradar ip}/console/plugins/{UCM App ID}/app_proxy/api/use_case_explorer/{report id}/download_csv' \
--header 'Content-Type: application/json' \
--data-raw '{"columns":"N,GR,RC,T,RO,EN,RE,CD,MD"}'
/* Return the current status of CSV report generation from POST /api/use_case_explorer/{reportId}/download_csv by calling GET /api/use_case_explorer/download_csv/{jobId}/status */
curl --header 'SEC: xxxx-xxxxx-xxxxx-xxxx' --location --request GET 'https://{qradar ip}/console/plugins/{UCM App ID}/app_proxy/api/use_case_explorer/download_csv/{download csv job id}/status' \
--header 'Content-Type: application/json' \
--data-raw '{"columns":"N,GR,RC,T,RO,EN,RE,CD,MD"}'
/* Finally, when GET /api/use_case_explorer/download_csv/{jobId}/status
returns a status of COMPLETED, call GET /api/use_case_explorer/download_csv/{jobId}/result
to download your generated report in CSV file format */
curl --header 'SEC: xxxx-xxxxx-xxxxx-xxxx' --location --request GET 'https://{qradar ip}/console/plugins/{UCM App ID}/app_proxy/api/use_case_explorer/download_csv/{download csv job id}/result?csvName=test.csv' \
--header 'Content-Type: application/json' \
--data-raw '{"columns":"N,GR,RC,T,RO,EN,RE,CD,MD"}'