2.2. 使用 API 导出公告服务数据
使用公告服务 API 以以下方法之一导出数据:
对于 CSV 文件类型
请求 URL:
curl
Copy to Clipboard Copied! Toggle word wrap Toggle overflow curl -X GET "https://console.redhat.com/api/insights/v1/export/hits.csv" -H "accept: */*"
curl -X GET "https://console.redhat.com/api/insights/v1/export/hits.csv" -H "accept: */*"
对于 JSON 文件类型
请求 URL:
curl
Copy to Clipboard Copied! Toggle word wrap Toggle overflow curl -X GET "https://console.redhat.com/api/insights/v1/export/hits.json" -H "accept: application/json"
curl -X GET "https://console.redhat.com/api/insights/v1/export/hits.json" -H "accept: application/json"
Red Hat Enterprise Linux API 提供了所有 Insights for Red Hat Enterprise Linux 服务的 API 文档。