<ph type="x-smartling-placeholder"></ph>
현재 Apigee Edge 문서를 보고 있습니다.
Apigee X 문서. 정보
Edge API를 사용하여 한 조직 환경에서 다른 조직 환경으로 커스텀 보고서를 내보내고 가져올 수 있습니다. 이 유용한 방법을 사용하면 원하는 맞춤 보고서 디자인을 여러 조직이나 다른 부서에서 재사용할 수 있습니다. 지원합니다 또한 디자인 (간단한 JSON 텍스트 파일)을 CSV에 저장할 수 있습니다.
먼저 목록 분석 보고서 정의를 사용합니다. API를 사용하여 조직에 정의된 모든 보고서의 UUID를 가져올 수 있습니다.
curl -X GET "https://api.enterprise.apigee.com/v1/organizations/org-name/reports" \ -u email:password
각 보고서의 출력에는 표시 이름 (에지 UI에 표시되는 이름)과 UUID가 포함됩니다.
{
"qualifier": [
{
"displayName": "My Report 1",
"name": "cb7cd16a-44c4-0bc83c3b9c92"
},
{
"displayName": "My Other Report",
"name": "a7e3fc4e-992a2ffc0e3d49d"
},
...
]
}이제 원하는 보고서의 UUID를 사용하여 분석 보고서 정의 가져오기 API에 액세스할 수 있습니다. 이 예에서는 'My Report 1'이라는 보고서의 정의를 알 수 있습니다.
curl -X GET "https://api.enterprise.apigee.com/v1/organizations/org-name/reports/cb7cd16a-44c4-0bc83c3b9c92" \ -u email:password
출력에는 보고서 정의가 포함됩니다.
{
"chartType": "column",
"comments": [],
"createdAt": 1506922614000,
"createdBy": "11.111.121.57",
"dimensions": [
"apiproxy",
"proxy_pathsuffix",
"proxy_client_ip"
],
"displayName": "My Report 1",
"environment": "prod",
"lastModifiedAt": 1512435450000,
"lastModifiedBy": "111.111.121.57",
"lastViewedAt": 1512435450000,
"metrics": [
{
"function": "avg",
"name": "response_size"
},
{
"function": "avg",
"name": "request_size"
}
],
"name": "cb7cd16a-44c4-0bc83c3b9c92",
"organization": "myOrg",
"properties": [
{
"property": "__ui__",
"value": [
{
"name": "description"
},
{
"name": "accuracy"
}
]
}
],
"sortbyCols": [],
"tags": [],
"timeUnit": "hour"
}JSON 출력을 복사하고 environment 및 organization 필드를 업데이트합니다.
필요에 맞게 변경한 다음
분석 보고서 정의 만들기 API
예를 들어 이름이 destOrg인 조직의 test 환경으로 정의를 가져오려면 다음 안내를 따르세요.
curl -X POST -H "Content-Type: application/json" "https://api.enterprise.apigee.com/v1/organizations/destOrg/reports" \
-d "{
"chartType": "column",
"comments": [],
"createdAt": 1506922614000,
"createdBy": "11.111.121.57",
"dimensions": [
"apiproxy",
"proxy_pathsuffix",
"proxy_client_ip"
],
"displayName": "My Report 1",
"environment": "test",
"lastModifiedAt": 1512435450000,
"lastModifiedBy": "111.111.121.57",
"lastViewedAt": 1512435450000,
"metrics": [
{
"function": "avg",
"name": "response_size"
},
{
"function": "avg",
"name": "request_size"
}
],
"name": "cb7cd16a-44c4-0bc83c3b9c92",
"organization": "destOrg",
"properties": [
{
"property": "__ui__",
"value": [
{
"name": "description"
},
{
"name": "accuracy"
}
]
}
],
"sortbyCols": [],
"tags": [],
"timeUnit": "hour"
}" \
-u email:password 이제 조직의 에지 UI에 보고서가 표시됩니다.