API를 통해 보고 데이터베이스에 액세스합니다
Cloud Insights의 강력한 API를 사용하면 Cognos 보고 환경을 거치지 않고 Cloud Insights 보고 데이터베이스를 직접 쿼리할 수 있습니다.
|
이 설명서는 에서 사용할 수 있는 Cloud Insights 보고 기능을 참조합니다 "Premium Edition을 참조하십시오". |
OData입니다
Cloud Insights 보고 API는 에 따릅니다 "OData v4" (Open Data Protocol) Reporting 데이터베이스 쿼리에 대한 표준입니다. 자세한 정보 또는 자세한 내용은 를 참조하십시오 "이 자습서" OData.
모든 요청은 URL_\https://<Cloud Insights URL>/REST/v1/dWh-management/OData_로 시작됩니다
APIKey를 생성하는 중입니다
에 대해 자세히 알아보십시오 "Cloud Insights API".
API 키를 생성하려면 다음을 수행합니다.
-
Cloud Insights 환경에 로그인하고 * 관리자 > API 액세스 * 를 선택합니다.
-
“+API 액세스 토큰”을 클릭합니다.
-
이름 및 설명을 입력합니다.
-
유형으로 _ 데이터 웨어하우스 _ 를 선택합니다.
-
권한을 읽기/쓰기로 설정합니다.
-
욕망 만료 날짜를 설정합니다.
-
"저장"을 클릭한 다음 * 키를 복사하여 안전한 곳에 저장합니다 *. 나중에 전체 키에 액세스할 수 없습니다.
APIkeys는 _Sync_or_Async_에 적합합니다.
테이블 직접 쿼리
API 키가 있으면 이제 보고 데이터베이스의 직접 쿼리를 수행할 수 있습니다. 긴 URL은 전체 https://<Cloud Insights URL > /REST/v1/dWh-management/OData/ 대신 표시 목적으로 https://…/odata/ 으로 단순화될 수 있습니다
과 같은 간단한 쿼리를 사용해 보세요
-
https://<Cloud Insights URL>/Rest/v1/dWh-management/OData/dWh_CUSTOM
-
https://<Cloud Insights URL>/REST/v1/dWh-management/OData/dWh_inventory
-
https://<Cloud Insights URL>/Rest/v1/dWh-management/OData/dWh_inventory/storage
-
https://<Cloud Insights URL>/Rest/v1/dWh-management/OData/dWh_inventory/disk
REST API 예제
모든 통화의 URL은 _\https://<Cloud Insights URL>/REST/v1/dWh-management/OData_입니다.
-
Get/{schema}/** - 보고 데이터베이스에서 데이터를 검색합니다.
Format:_\https://<Cloud Insights URL>/REST/v1/dWh-management/OData/<schema_name>/<query> _
예:
https://<domain>/rest/v1/dwh-management/odata/dwh_inventory/fabric?$count=true&$orderby=name 결과:
{ "@odata.context": "$metadata#fabric", "@odata.count": 2, "value": [ { "id": 851, "identifier": "10:00:50:EB:1A:40:3B:44", "wwn": "10:00:50:EB:1A:40:3B:44", "name": "10:00:50:EB:1A:40:3B:44", "vsanEnabled": "0", "vsanId": null, "zoningEnabled": "0", "url": "https://<domain>/web/#/assets/fabrics/941716" }, { "id": 852, "identifier": "10:00:50:EB:1A:40:44:0C", "wwn": "10:00:50:EB:1A:40:44:0C", "name": "10:00:50:EB:1A:40:44:0C", "vsanEnabled": "0", "vsanId": null, "zoningEnabled": "0", "url": "https://<domain>/web/#/assets/fabrics/941836" } ] }
유용한 힌트
보고 API 쿼리 작업 시 다음 사항을 염두에 두십시오.
-
쿼리 페이로드는 올바른 JSON 문자열이어야 합니다
-
쿼리 페이로드는 한 줄에 포함되어야 합니다
-
큰따옴표는 이스케이프되어야 합니다. 즉, \"
-
탭은 \t로 지원됩니다
-
의견을 피합니다
-
소문자 테이블 이름이 지원됩니다
추가 사항:
-
헤더 2개 필요:
-
이름 "X-CloudInsights - ApiKey"
-
속성 값 "<apikey>"
-
API 키는 Cloud Insights 환경에 따라 다릅니다.