이 페이지에서

내보내기 API

지역

기본 URL은 프로젝트의 데이터 상주 위치에 따라 달라집니다. 이 페이지의 모든 예제에서 프로젝트가 Amplitude의 EU 데이터 센터를 사용하지 않는 한 기본 URL을 사용하십시오. 이 경우 이 표의 EU 기본 URL을 사용하십시오.

요청은 https://amplitude.com(기본값) 또는 https://analytics.eu.amplitude.com (EU)로 이동합니다. https://analytics.amplitude.com호스트 이름은 분석 웹 앱(브라우저 UI)입니다. REST 요청에는 analytics.amplitude.com이 표에 나와 있는 호스트를 사용하십시오.

고려 사항

  • 날짜 범위는 이벤트 데이터가 Amplitude 서버에 업로드된 시간을 나타냅니다(server_upload_time 참조). 내보내기 API는 UTC로 표시된 이벤트 타임스탬프를 반환합니다. 데이터는 서버가 수신한 시점으로부터 2시간 이내에 내보낼 수 있습니다. 예를 들어 오후 8시와 9시 대상 구간 전송된 데이터는 오후 9시에 로딩되기 시작하며 오후 11시에 내보내기 API를 통해 사용할 수 있습니다. 플랫폼 보고는 지연되지 않습니다. 내보내기만 지연됩니다.
  • 내보내기 API는 프로젝트 간 뷰를 지원하지 않습니다. 뷰는 전체 데이터를 소유하지 않기 때문입니다. 뷰의 모든 데이터를 내보내려면 데이터를 수집한 기본 프로젝트에서 내보내기 API를 호출하십시오.
  • 용량 제한은 4GB입니다. 크기가 4GB를 초과하면 요청은 400 응답을 반환합니다. 이 경우 데이터를 내보낼 더 작은 시간 범위를 선택하십시오. 한 시간 분량의 데이터가 4GB를 초과하는 경우 Amazon S3 내보내기를 사용하십시오.
  • 하루 종일을 내보내려면 T00 ~ T23 를 사용하십시오. 예를 들어, GET 'https://amplitude.com/api/2/export?start=20220101T00&end=20220101T23'
  • 한 번에 쿼리할 수 있는 최대 기간은 365일입니다.

요청

GET https://amplitude.com/api/2/export

curl --location --request GET 'https://amplitude.com/api/2/export?start=<starttime>&end=<endtime>' \
-u '{api_key}:{secret_key}'

쿼리 매개 변수

응답

응답은 JSON 파일의 압축 아카이브입니다. 데이터 양에 따라 시간당 여러 파일이 생성될 수 있습니다. 요청한 시간 범위에 해당하는 데이터가 없을 경우 API는 404 응답을 반환합니다.

2014년 11월 12일 이전의 이벤트는 시간별이 아닌 날짜별로 그룹화됩니다.

응답 스키마

응답에는 각 파일의 한 줄에 하나의 이벤트 JSON 객체가 포함되며 다음과 같은 스키마가 있습니다.

json
{
 "server_received_time": UTC ISO-8601 formatted timestamp,
 "app": int,
 "device_carrier": string,
 "city": string,
 "user_id": string,
 "uuid": UUID,
 "event_time": UTC ISO-8601 formatted timestamp,
 "platform": string,
 "os_version": string,
 "amplitude_id": long,
 "processed_time": UTC ISO-8601 formatted timestamp,
 "version_name": string,
 "ip_address": string,
 "paying": boolean,
 "dma": string,
 "group_properties": dict,
 "user_properties": dict,
 "client_upload_time": UTC ISO-8601 formatted timestamp,
 "$insert_id": string,
 "event_type": string,
 "library": string,
 "amplitude_attribution_ids": string,
 "device_type": string,
 "start_version": string,
 "location_lng": float,
 "server_upload_time": UTC ISO-8601 formatted timestamp,
 "event_id": int,
 "location_lat": float,
 "os_name": string,
 "groups": dict,
 "event_properties": dict,
 "data": dict,
 "device_id": string,
 "language": string,
 "country": string,
 "region": string,
 "session_id": long,
 "device_family": string,
 "sample_rate": null,
 "client_event_time": UTC ISO-8601 formatted timestamp,
}

상태 코드

이 내용이 도움이 되었나요?