API 응답
API 응답은 서버에게 요청한 Cocktail 작업에 대한 결과로 받는 데이터입니다.
요청한 작업의 성공 여부, 데이터, 에러 메시지 등이 포함될 수 있습니다.
아래는 간단한 JSON 형식의 API 응답 예시입니다.
요청한 작업이 성공한 경우의 응답
// 클러스터 목록 조회의 예시
{
"code": "200",
"result": [
{
"apiUrl": "https://0.0.0.0:0",
"authType": "CERT",
"clusterId": "thingcluster",
"clusterName": "thingcluster",
"clusterSeq": 1,
"clusterState": "RUNNING",
"created": "2023-12-19 09:27:00",
"cubeType": "MANAGED",
"description": "thingcluster",
"ingressSupported": "Y",
"k8sVersion": "1.26.1",
"loadbalancerSupported": "N",
"nodePortRange": "30000-32767",
"nodePortSupported": "Y",
"nodePortUrl": "0.0.0.0",
"persistentVolumeSupported": "Y",
"providerAccountSeq": 1,
"regionCode": "Acornsoft",
"updated": "2023-12-20 04:09:29",
"useYn": "Y"
}
],
"status": "ok"
}
항목명
데이터 유형
설명
code
string
내부 응답 상태 코드
성공한 경우: 200
result
요청한 작업에 따라 유형이 달라짐
조회 내용
status
string
내부 응답 상태
// 일부 모니터링(V1) 예시
{
"code": "",
"message": "",
"metadata": null,
"result": [
{
"metrics": {
"cluster": "thingcluster",
"controller_class": "k8s.io/ingress-nginx"
},
"timestamp": 1706597820,
"value": 0.16666666666666669
}
],
"status": "ok"
}
status로 작업의 성공 여부를 판단할 수 있습니다.
항목명
데이터 유형
설명
code
string
값: ""
message
string
값: ""
metadata
string
값: null
result
요청한 작업에 따라 유형이 달라짐
조회 내용
status
string
내부 응답 상태
값: "ok"
요청한 작업이 실패한 경우의 응답
{
"code": "CCCM1044000",
"message": "Not Authorized."
"status: "error"
}
항목명
데이터 유형
설명
code
string
내부 응답 상태 코드
message
string
내부 응답 상태 메시지
status
string
내부 응답 상태
API REFERENCE
Last updated
Was this helpful?