Snapshot 생성 이력 조회

Prev Next

Snapshot을 생성 이력을 조회합니다.

요청

요청 URL

GET https://vpcsearchengine.apigw.gov-ntruss.com/api/v2/snapshot/getSnapshotHistory/{service-group-instance-no}?pageNo={pageNo}&pageSize={pageSize} [수도권]
GET https://vpcsearchengine.apigw.gov-ntruss.com/api/krs-v2/snapshot/getSnapshotHistory/{service-group-instance-no}?pageNo={pageNo}&pageSize={pageSize} [남부권]

요청 헤더

헤더명 설명
x-ncp-apigw-timestamp 1970년 1월 1일 00:00:00 협정 세계시(UTC)부터의 경과 시간을 밀리초(Millisecond)로 나타내며
API Gateway 서버와 시간 차가 5분 이상 나는 경우 유효하지 않은 요청으로 간주
x-ncp-apigw-timestamp:{Timestamp}
x-ncp-iam-access-key 네이버 클라우드 플랫폼 포털에서 발급받은 Access Key ID 값
x-ncp-iam-access-key:{Account Access Key}
x-ncp-apigw-signature-v2 Access Key ID 값과 Secret Key로 암호화한 서명
x-ncp-apigw-signature-v2:{API Gateway Signature}
Content-Type Request body content type을 application/json으로 지정
Content-Type: application/json

요청 파라미터

파라미터 타입 필수 여부 설명
serviceGroupInstanceNo String Y Snapshot 생성 이력을 조회할 Cluster 번호
pageNo Integer N 페이지 번호
Default : 1
<예시> 1, 2
pageSize Integer N 페이지 사이즈
Defatlt : 10
<예시> 10, 20

요청 예시

GET https://vpcsearchengine.apigw.gov-ntruss.com/api/v2/snapshot/getSnapshotHistory/1531843?pageNo=1&pageSize=10
HOST: vpcsearchengine.apigw.gov-ntruss.com
Content-Type: application/json
x-ncp-apigw-signature-v2: zq0FrtlU8JZJi9esTK31bCQUNG3H+jo4CMjMkJDoWSc=
x-ncp-apigw-timestamp: 1593848345548
x-ncp-iam-access-key: 7fIvgFY428mtY6sY8maw
curl -X POST "https://vpcsearchengine.apigw.gov-ntruss.com/api/v2/snapshot/getSnapshotHistory/1531843?pageNo=1&pageSize=10 \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "x-ncp-iam-access-key: 7fIvgFY428mtY6sY8maw" \
-H "x-ncp-apigw-timestamp: 1601971222179" \
-H "x-ncp-apigw-signature-v2: zrCelnR48AADdK/uh6Xe3yy468i8KpQoewYHUmeqYh4=" 

응답 파라미터

public class SnapshotHistoryListResponseVo extends PagerResponseVo{
    List<SnapshotHistoryResponseVo> snapshotHistoryResponseList;
}

public class SnapshotHistoryResponseVo {
    Integer idx;
    String clusterName;
    String snapshotName;
    String memberNo;
    Integer serviceGroupInstanceNo;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Seoul")
    Date actionDate;
    String duration;
    String requestType;
    String message;
    String bucketName;
    boolean hasErrorLog;
}

public class PagerResponseVo {
    Integer currentPage;
    Boolean isFirst;
    Boolean isLast;
    Integer pageSize;
    Long totalCount;
    Integer totalPage;
}

응답 예시

{
  "code": 0,
  "message": "SUCCESS",
  "result": {
    "currentPage": 1,
    "isFirst": true,
    "isLast": true,
    "pageSize": 10,
    "totalCount": 4,
    "totalPage": 1,
    "snapshotHistoryResponseList": [
      {
        "idx": 40,
        "clusterName": "common",
        "snapshotName": "commonsnapshot2",
        "memberNo": "703",
        "serviceGroupInstanceNo": 1728943,
        "actionDate": "2021-06-16 17:51:05",
        "duration": "600ms",
        "requestType": "C",
        "message": "commonsnapshot2 스냅샷 생성 완료",
        "bucketName": "common-1473858190",
        "hasErrorLog": false
      },
      {
        "idx": 39,
        "clusterName": "common",
        "snapshotName": "commonsnapshot2",
        "memberNo": "703",
        "serviceGroupInstanceNo": 1728943,
        "actionDate": "2021-06-16 17:51:04",
        "duration": null,
        "requestType": "R",
        "message": "commonsnapshot2 스냅샷 생성 시작",
        "bucketName": "common-1473858190",
        "hasErrorLog": false
      },
      {
        "idx": 38,
        "clusterName": "common",
        "snapshotName": "commonsnapshot",
        "memberNo": "703",
        "serviceGroupInstanceNo": 1728943,
        "actionDate": "2021-06-16 17:50:07",
        "duration": "1.2s",
        "requestType": "C",
        "message": "commonsnapshot 스냅샷 생성 완료",
        "bucketName": "common-1473858190",
        "hasErrorLog": false
      },
      {
        "idx": 37,
        "clusterName": "common",
        "snapshotName": "commonsnapshot",
        "memberNo": "703",
        "serviceGroupInstanceNo": 1728943,
        "actionDate": "2021-06-16 17:50:05",
        "duration": null,
        "requestType": "R",
        "message": "commonsnapshot 스냅샷 생성 시작",
        "bucketName": "common-1473858190",
        "hasErrorLog": false
      }
    ]
  },
  "requestId": "93fd2a5a-7a0-4ea3-a040-a69204947048"
}