--- title: "요청 및 응답" slug: "api-call-lgc-requestresponse" updated: 2026-10-22T10:46:03Z published: 2026-10-22T10:46:03Z canonical: "api-gov.ncloud-docs.com/api-call-lgc-requestresponse" --- > ## Documentation Index > Fetch the complete documentation index at: https://api-gov.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # 요청 및 응답 Classic/VPC 환경에서 이용 가능합니다. Legacy API에서 공통으로 사용하는 요청 형식과 응답 형식을 설명합니다. 참고 일부 서비스의 API는 요청 형식과 응답 형식이 상이할 수 있습니다. [대상 API](/docs/api-call-lgc)를 참조해 주십시오. ## 요청 공통 요청 형식을 설명합니다. ### API URL 서비스별 API 가이드에서 확인해 주십시오. ### 요청 헤더 요청 헤더에 대한 설명은 다음과 같습니다. | 필드 | 필수 여부 | 설명 | | --- | --- | --- | | `x-ncp-apigw-timestamp` | Required | 1970년 1월 1일 00:00:00 협정 세계시(UTC)부터의 경과 시간 (밀리초) - API Gateway 서버와 5분 이상 시간차 발생 시 유효하지 않은 요청으로 간주 | | `x-ncp-iam-access-key` | Required | 네이버 클라우드 플랫폼에서 발급받은 Access Key - Access Key 발급 및 확인: [인증키 생성](/docs/common-ncpapi-ncpapi) 참조 - 서브 계정의 Access Key 발급 및 확인: [서브 계정 생성](https://guide-gov.ncloud-docs.com/docs/subaccount-use#%EC%84%9C%EB%B8%8C-%EA%B3%84%EC%A0%95-%EC%83%9D%EC%84%B1) 참조 | | `x-ncp-apigw-signature-v2` | Required | 네이버 클라우드 플랫폼에서 발급받은 Access Key에 맵핑되는 Secret Key 및 HMAC 암호화 알고리즘(HmacSHA256)으로 요청 정보를 암호화한 후 Base64로 인코딩한 서명 - Secret Key 발급 및 확인: [인증키 생성](/docs/common-ncpapi-ncpapi) 참조 - 서명 생성: [시그니처 생성](/docs/common-ncpapi-ncpapi) 참조 | 주의 `x-ncp-apigw-timestamp` 값은 시그니처 생성 시 입력한 timestamp 값과 반드시 동일한 값이어야 합니다. ### 요청 예시 요청 예시는 다음과 같습니다. ``` curl --location --request GET 'https://example.gov-apigw.ntruss.com/photos/puppy.jpg?query1=&query2' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \ ``` ## 응답 공통 응답 형식을 설명합니다. ### 응답 상태 코드 Legacy API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 [오류 처리](/docs/api-call-lgc-errorhandling)를 참조해 주십시오. ### 응답 예시 응답 예시는 다음과 같습니다. - `Content-type: application/json` ``` { "status": { "code": "20000", "message": "OK" }, "result": {...} } ``` - `Content-type: application/xml` ``` 20000 OK ... ```