이 페이지에서

택소노미 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이 표에 나와 있는 호스트를 사용하십시오.

고려 사항

  • 이벤트 유형, 이벤트 속성 및 사용자 속성의 이름에 특수 문자를 URL로 인코딩해야 할 수도 있습니다. 예를 들어 Play%20Song로 인코딩합니다. Play SongW3Schools 인코딩 가이드를 확인하십시오.
  • 응답에서 사용자 지정 사용자 속성에는 접두어가 gp:있습니다. 예를 들어 gp:my_custom_property.
  • 이 API를 통해 이벤트나 속성을 삭제하려면 먼저 스키마에서 계획을 세워야 합니다.

제한

각 엔드포인트에는 동시 사용 제한과 속도 제한이 있습니다. 동시 사용 제한은 동시에 실행할 수 있는 요청 수를 제한합니다. 속도 제한은 시간당 총 쿼리 수를 제한합니다.

제한은 프로젝트별로 적용됩니다. 전체 제한을 초과하면 429 오류가 반환됩니다.

엔드포인트는 쿼리당 비용 모델을 사용합니다. API 키당 최대 비용:

  • 동시 비용 한도: 합계 비용이 4가 되는 쿼리를 동시에 실행합니다.
  • 기간 비용 한도: 시간당 합계 비용 7200까지 쿼리를 실행할 수 있습니다.

각 엔드포인트의 비용 구조:

  • GET: 1 비용
  • PUT: 2 비용
  • POST: 2 비용
  • DELETE: 2 비용

이벤트 범주

이벤트 범주는 이벤트 유형을 광범위한 그룹으로 구성하는 방법입니다.

사용자가 앱에 등록하고, 체크아웃하고, 온보딩 경험과 상호작용하는 방식을 추적하려면 다음 이벤트 범주를 사용하여 이벤트를 그룹화하십시오.

  • 등록
  • 체크아웃
  • 온보딩

이벤트 범주 생성

프로젝트에 이벤트 범주를 생성합니다.

POST /api/2/taxonomy/category

curl --location --request POST 'https://amplitude.com/api/2/taxonomy/category' \
--header 'Authorization: Basic {api-key}:{secret-key}' \ #credentials must be base64 encoded
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'category_name=CATEGORY_NAME'

바디 매개변수

응답

성공적인 요청은 JSON 본문과 함께 200 OK응답을 반환합니다:

json
{
  "success": true
}

실패한 요청은 자세한 정보를 포함한 오류 메시지를 보냅니다:

json
{
  "success": false,
  "errors": [
    {
      "message": "error info"
    }
  ]
}

모든 이벤트 범주 보기

프로젝트의 모든 이벤트 범주를 가져옵니다.

GET https://amplitude.com/api/2/taxonomy/category

curl --location --request GET 'https://amplitude.com/api/2/taxonomy/category' \
-u '{api_key}:{secret_key}'

응답

성공적인 요청은 JSON 본문과 함께 200 OK상태를 반환합니다.

json
{
  "success": true,
  "data": [
    {
      "id": 412931,
      "name": "Attribution"
    },
    {
      "id": 412941,
      "name": "Conversion"
    }
  ]
}

실패한 요청은 더 많은 정보를 포함한 400 Bad Request응답을 반환합니다.

json
{
  "success": false,
  "errors": [
    {
      "message": "Not found"
    }
  ]
}

이벤트 범주 가져오기

범주 이름과 함께 GET요청을 전송하여 프로젝트에서 이벤트 범주의 ID를 가져옵니다.

GET https://amplitude.com/api/2/taxonomy/category/:category_name

curl --location --request GET 'https://amplitude.com/api/2/taxonomy/category/:category_name' \
-u '{api_key}:{secret_key}'

이라는 이벤트 범주의 ID를 가져옵니다.

curl --location --request GET 'https://amplitude.com/api/2/taxonomy/category/Attribution' \
--header 'Authorization: Basic MTIzNDU2NzgwMDoxMjM0NTY3MDA='

경로 매개변수

응답

성공적인 요청은 200 OK상태와 범주의 데이터가 포함된 JSON 본문을 반환합니다.

json
{
  "success": true,
  "data": {
    "id": 412941,
    "name": "Conversion"
  }
}

실패한 요청은 오류에 대한 자세한 정보를 포함한 400 Bad Request상태를 반환합니다.

json
{
  "success": false,
  "errors": [
    {
      "message": "Not found"
    }
  ]
}

이벤트 범주 업데이트

범주 ID와 본문에 새 이름을 포함한 PUT 요청을 전송하여 이벤트 범주의 이름을 업데이트합니다.

PUT https://amplitude.com/api/2/taxonomy/category/:category_id

curl --location --request PUT 'https://amplitude.com/api/2/taxonomy/category/CATEGORY_ID' \
-u '{api_key}:{secret_key}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'category_name=NEW_NAME'

경로 매개변수

바디 매개변수

200 OK 응답

성공적인 요청은 200 OK상태와 JSON 본문을 반환합니다.

json
{
  "success": true
}

409 충돌 응답

요청에 문제가 있는 경우 요청은 409 Conflict상태를 반환하고 자세한 정보가 포함된 JSON 본문을 반환합니다.

json
{
  "success": false,
  "errors": [
    {
      "message": "Attempted to operate on entity event_category, id \"4129\", that does not exist."
    }
  ]
}

이벤트 범주 삭제

범주 ID와 함께 요청을 전송하여 이벤트 범주를 삭제합니다DELETE.

DELETE https://amplitude.com/api/2/taxonomy/category/:category_id

curl --location --request DELETE 'https://amplitude.com/api/2/taxonomy/category/:category_id' \
-u '{api_key}:{secret_key}'

경로 매개변수

200 OK 응답

성공적인 요청은 200 OK상태와 JSON 본문을 반환합니다.

json
{
  "success": true
}

409 충돌 응답

요청에 문제가 있는 경우 요청은 409 Conflict상태를 반환하고 자세한 정보가 포함된 JSON 본문을 반환합니다.

json
{
  "success": false,
  "errors": [
    {
      "message": "Attempted to operate on entity event_category, id \"412941\", that does not exist."
    }
  ]
}

이벤트 유형

이벤트는 게임 시작 또는 _장바구니에 추가_와 같이 사용자가 수행할 수 있는 전체 동작이거나 앱 내 알림이나 푸시 알림과 같이 사용자와 관련된 전체 활동입니다.

택소노미 API를 사용하여 이벤트 유형을 생성, 가져오기, 업데이트, 삭제 및 복원할 수 있습니다.

이벤트 유형 만들기

본문에 매개변수를 포함하여 https://amplitude.com/api/2/taxonomy/event에 요청을 전송함으로써 이벤트 유형을 POST생성합니다.

curl --location --request POST 'https://amplitude.com/api/2/taxonomy/event' \
-u '{api_key}:{secret_key}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'event_type=EVENT_TYPE' \
--data-urlencode 'category=CATEGORY_NAME' \
--data-urlencode 'description=DESCRIPTION'

바디 매개변수

is_hidden_from_dropdowns, is_hidden_from_persona_results, is_hidden_from_pathfinderis_hidden_from_timeline 속성은 수집된 이벤트 유형에만 설정할 수 있습니다.

200 OK 응답

성공적인 요청은 JSON 본문과 함께 200 OK응답을 반환합니다:

json
{
  "success": true
}

409 충돌 응답

실패한 요청은 오류 메시지와 함께 409 Conflict상태를 반환합니다.

json
{
  "success": false,
  "errors": [
    {
      "message": "error info"
    }
  ]
}

모든 이벤트 유형 가져오기

프로젝트의 모든 이벤트 유형을 검색합니다. 이 요청에는 필수 매개 변수가 없습니다.

GET https://amplitude.com/api/2/taxonomy/event

숨겨진 이벤트("표시됨"이 아닌 다른 가시성을 가진 이벤트)는 응답에 나타나지 않습니다.

기본적으로 응답은 삭제된 이벤트를 제외합니다. 이러한 항목을 포함하려면 showDeleted쿼리 매개 변수를 추가하십시오:

GET https://amplitude.com/api/2/taxonomy/event?showDeleted=true

curl --location --request GET 'https://amplitude.com/api/2/taxonomy/event' \
-u '{api_key}:{secret_key}'

200 OK 응답

성공적인 요청은 JSON 본문과 함께 200 OK상태를 반환합니다.

json
{
  "success": true,
  "data": [
    {
      "event_type": "Attribution",
      "category": {
        "name": "Attribution Events"
      },
      "description": null,
      "display_name": null,
      "is_active": false,
      "is_hidden_from_dropdowns": false,
      "is_hidden_from_persona_results": false,
      "is_hidden_from_pathfinder": false,
      "is_hidden_from_timeline": false,
      "tags": [],
      "owner": null
    },
    {
      "event_type": "Conversation",
      "category": {
        "name": "Conversion Events"
      },
      "description": "This event is fired when a user converts.",
      "display_name": "User Conversion",
      "is_active": false,
      "is_hidden_from_dropdowns": false,
      "is_hidden_from_persona_results": false,
      "is_hidden_from_pathfinder": false,
      "is_hidden_from_timeline": false,
      "tags": [],
      "owner": null
    }
  ]
}

이벤트 유형 가져오기

이름별로 단일 이벤트 유형을 가져옵니다. 이벤트 이름과 함께 GET요청을 전송합니다.

GET https://amplitude.com/api/2/taxonomy/event/:event_type

curl --location --request GET 'https://amplitude.com/api/2/taxonomy/event:event_type' \
-u '{api_key}:{secret_key}'

경로 매개변수

200 OK 응답

성공적인 요청은 200 OK상태와 이벤트 유형의 데이터가 포함된 JSON 본문을 반환합니다.

json
{
  "success": true,
  "data": {
    "event_type": "Event 2",
    "category": {
      "name": "Conversion Events"
    },
    "description": null,
    "display_name": null,
    "is_active": false,
    "is_hidden_from_dropdowns": false,
    "is_hidden_from_persona_results": false,
    "is_hidden_from_pathfinder": false,
    "is_hidden_from_timeline": false,
    "tags": [],
    "owner": null
  }
}

400 잘못된 요청 응답

실패한 요청은 오류에 대한 자세한 정보를 포함한 400 Bad Request상태를 반환합니다.

json
{
  "success": false,
  "errors": [
    {
      "message": "Not found"
    }
  ]
}

이벤트 유형 업데이트

이벤트 유형 이름과 함께 요청을 전송하여 이벤트 유형을 업데이트합니다PUT.

PUT https://amplitude.com/api/2/taxonomy/event/:event_type

curl --location --request PUT 'https://amplitude.com/api/2/taxonomy/event/EVENT_TYPE_NAME' \
-u '{api_key}:{secret_key}'
--data-urlencode 'category=NEW_CATEGORY_NAME' \
--data-urlencode 'display_name=NEW_EVENT_TYPE_DISPLAY_NAME'

OnboardingBegin이 예제에서는 범주, 이벤트 유형 이름 Onboarding``OnboardStart, 표시 이름 "온보딩 시작" 및 "사용자가 로그인하여 모달에서 온보딩 작업을 완료했습니다."라는 설명을 사용하여 이벤트 유형을 업데이트합니다.

curl --location --request PUT 'https://amplitude.com/api/2/taxonomy/event/OnboardBegin' \
--header 'Authorization: Basic MTIzNDU2NzgwMDoxMjM0NTY3MDA=' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'new_event_type=OnboardStart' \
--data-urlencode 'category=Onboarding' \
--data-urlencode 'description=User signed in and completed an onboarding task from modal.' \
--data-urlencode 'display_name=Onboarding Start'

경로 매개변수

바디 매개변수

is_hidden_from_dropdowns, is_hidden_from_persona_results, is_hidden_from_pathfinderis_hidden_from_timeline 속성은 수집된 이벤트 유형에만 설정할 수 있습니다.

200 OK 응답

성공적인 요청은 200 OK상태와 JSON 본문을 반환합니다.

json
{
  "success": true
}

409 충돌 응답

요청에 문제가 있는 경우 요청은 409 Conflict상태를 반환하고 자세한 정보가 포함된 JSON 본문을 반환합니다.

json
{
  "success": false,
  "errors": [
    {
      "message": "Attempted to change the event display name for event \"Event\", but the event is not in schema."
    }
  ]
}

이벤트 유형 삭제

이벤트 유형 이름을 경로 매개 변수로 사용하여 DELETE요청을 전송하여 이벤트 유형을 삭제합니다.

DELETE https://amplitude.com/api/2/taxonomy/event/:event_type

curl --location --request DELETE 'https://amplitude.com/api/2/taxonomy/event/EVENT_TYPE'
-u '{api_key}:{secret_key}'

경로 매개변수

행동 방식

200 OK 응답

성공적인 요청은 200 OK상태와 JSON 본문을 반환합니다.

json
{
  "success": true
}

4XX 응답

요청에 문제가 있는 경우, Amplitude는 4XX상태와 더 많은 정보가 포함된 JSON 본문을 반환합니다.

json
{
  "success": false,
  "errors": [
    {
      "message": "Not found"
    }
  ]
}

이벤트 유형 복원

이벤트 유형 이름을 경로 매개 변수로 포함한 POST요청을 보내 이벤트 유형을 복원합니다.

POST https://amplitude.com/api/2/taxonomy/event/:event_type/restore

curl --location --request POST 'https://amplitude.com/api/2/taxonomy/event/EVENT_TYPE/restore'
-u '{api_key}:{secret_key}'

경로 매개변수

행동 방식

200 OK 응답

성공적인 요청은 200 OK상태와 JSON 본문을 반환합니다.

json
{
  "success": true
}

4XX 응답

요청에 문제가 있는 경우, Amplitude는 4XX상태와 더 많은 정보가 포함된 JSON 본문을 반환합니다.

json
{
  "success": false,
  "errors": [
    {
      "message": "Not found"
    }
  ]
}

이벤트 속성

이벤트 속성은 이벤트의 속성을 설명합니다. 예를 들어 Swipe가 추적하는 이벤트인 경우 이벤트 속성의 Direction값은 Left또는 일 수 Right있습니다.

이벤트 속성 만들기

본문에 필요한 정보가 포함된 요청을 전송하여 이벤트 속성을 POST생성합니다.

POST https://amplitude.com/api/2/taxonomy/event-property

curl --location --request POST 'https://amplitude.com/api/2/taxonomy/event-property' \
-u '{api_key}:{secret_key}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'event_type=EVENT_TYPE' \
--data-urlencode 'event_property=EVENT_PROPERTY' \

바디 매개변수

is_hidden 속성은 수집된 속성에만 설정할 수 있습니다.

200 OK 응답

성공적인 요청은 200 OK상태와 JSON 본문을 반환합니다.

json
{
  "success": true
}

409 충돌 응답

요청에 문제가 있는 경우 요청은 409 Conflict상태를 반환하고 자세한 정보가 포함된 JSON 본문을 반환합니다.

json
{
  "success": false,
  "errors": [
    {
      "message": "Attempted to add an event property, \"Completed Task\" for event \"Onboard Start\", that already exists."
    }
  ]
}

이벤트 속성 가져오기

공유 또는 이벤트별 이벤트 속성을 가져옵니다.

GET https://amplitude.com/api/2/taxonomy/event-property

curl --location --request GET 'https://amplitude.com/api/2/taxonomy/event-property' \
-u '{api_key}:{secret_key}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'event_type=EVENT_NAME'

바디 매개변수

200 OK 응답

성공적인 요청은 200 OK상태와 이벤트 속성 및 해당 데이터 목록이 포함된 JSON 본문을 반환합니다.

json
{
  "success": true,
  "data": [
    {
      "event_property": "Completed Task",
      "event_type": "Onboard Start",
      "description": "User completed a task during onboarding.",
      "type": "boolean",
      "regex": null,
      "enum_values": null,
      "is_array_type": false,
      "is_required": false,
      "is_hidden": false,
      "classifications": ["PII"]
    },
    {
      "event_property": "Completed Tutorial",
      "event_type": "Onboard Start",
      "description": "",
      "type": "any",
      "regex": null,
      "enum_values": null,
      "is_array_type": false,
      "is_required": false,
      "is_hidden": false,
      "classifications": []
    }
  ]
}

단일 이벤트 속성 가져오기

단일 이벤트 속성을 가져옵니다. 이벤트 속성 이름을 경로 매개 변수로 사용하고 필요에 따라 본문에 이벤트 이름을 포함하여 GET요청을 전송합니다.

GET https://amplitude.com/api/2/taxonomy/event-property

curl --location --request GET 'https://amplitude.com/api/2/taxonomy/event-property?event_property=EVENT_PROPERTY' \
-u '{api_key}:{secret_key}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'event_type=EVENT_NAME'

경로 매개변수

바디 매개변수

200 OK 응답

성공적인 요청은 200 OK상태와 이벤트 속성에 대한 정보를 포함하는 JSON 본문을 반환합니다.

json
{
  "success": true,
  "data": {
    "event_property": "Shared",
    "event_type": "Onboard Finish",
    "description": "Whether user shared content.",
    "type": "boolean",
    "regex": null,
    "enum_values": null,
    "is_array_type": false,
    "is_required": false,
    "is_hidden": false,
    "classifications": ["PII"]
  }
}

400 잘못된 요청 응답

Amplitude가 이벤트 속성을 찾을 수 없거나 요청을 잘못 구성한 경우, Amplitude는 400 Bad Request응답과 오류 메시지를 반환합니다.

json
{
  "success": false,
  "errors": [
    {
      "message": "Not found"
    }
  ]
}

이벤트 속성 업데이트

이벤트 속성 이름을 경로 매개변수로 사용하여 PUT요청을 전송하여 이벤트 속성을 업데이트합니다.

PUT https://amplitude.com/api/2/taxonomy/event-property/:event-property

curl --location --request PUT 'https://amplitude.com/api/2/taxonomy/event-property/EVENT_PROPERTY' \
-u '{api_key}:{secret_key}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'event_type=EVENT_NAME' \

경로 매개변수

바디 매개변수

is_hidden 속성은 수집된 속성에만 설정할 수 있습니다.

200 OK 응답

성공적인 요청은 200 OK상태와 JSON 본문을 반환합니다.

json
{
  "success": true
}

409 충돌 응답

실패한 일부 요청은 409 Conflict 및 자세한 내용이 포함된 오류 메시지를 반환합니다.

json
{
  "success": false,
  "errors": [
    {
      "message": "Attempted to change the event property description for property \"Completed Task\" for event \"\", but the property is not in schema."
    }
  ]
}

이벤트 속성 삭제

이벤트 속성을 경로 매개변수로 포함한 DELETE요청을 보내서 해당 이벤트 속성을 삭제합니다. 필요에 따라 요청 본문에 이벤트 유형을 포함시킵니다.

DELETE https://amplitude.com/api/2/taxonomy/event-property/:event-property

curl --location --request DELETE 'https://amplitude.com/api/2/taxonomy/event-property/EVENT_PROPERTY' \
--header 'Authorization: Basic {api-key}:{secret-key}' # credentials must be base64 encoded \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'event_type=EVENT_NAME'

경로 매개변수

바디 매개변수

행동 방식

이벤트 유형을 사용할 수 있는 경우:

이벤트 유형을 사용할 수 없는 경우, Amplitude는 글로벌 이벤트 속성을 대상으로 작동합니다.

200 OK 응답

성공적인 요청은 200 OK상태와 JSON 본문을 반환합니다.

json
{
  "success": true
}

이벤트 속성 복원

이벤트 속성을 경로 매개 변수로 사용하여 POST요청을 전송하여 이벤트 속성을 복원합니다.

POST https://amplitude.com/api/2/taxonomy/event-property/:event-property/restore

curl --location --request POST 'https://amplitude.com/api/2/taxonomy/event-property/EVENT_PROPERTY/restore' \
--header 'Authorization: Basic {api-key}:{secret-key}' # credentials must be base64 encoded

경로 매개변수

바디 매개변수

행동 방식

삭제된 속성 및 GET 엔드포인트.

Get 이벤트 속성 엔드포인트는 삭제된 속성을 반환하지 않습니다. 존재하지만 삭제된 이벤트 속성을 생성하려고 하면 이벤트 속성 생성 엔드포인트가 해당 속성이 이미 존재한다는 것을 나타내는 409 Conflict오류를 반환합니다. 삭제된 속성으로 작업하려면:

  • 복원 엔드포인트를 사용하여 삭제된 속성을 복원하십시오.
  • 속성을 작성할 때 409 Conflict오류가 발생하는지 확인하십시오. 이 오류는 속성이 존재하지만 삭제되었음을 나타낼 수 있습니다.

201 OK 응답

성공적인 요청은 201 OK상태와 JSON 본문을 반환합니다.

json
{
  "success": true
}

사용자 속성

사용자 속성은 제품을 사용하는 개인에 대한 특성을 반영합니다.

사용자 속성 만들기

본문에 사용자 속성 이름을 포함한 요청을 전송하여 사용자 속성을 POST생성합니다.

POST https://amplitude.com/api/2/taxonomy/user-property/

curl --location --request POST 'https://amplitude.com/api/2/taxonomy/user-property' \
--header 'Authorization: Basic {api-key}:{secret-key}' # credentials must be base64 encoded \
--data-urlencode 'user_property=USER_PROPERTY' \

바디 매개변수

is_hidden 속성은 수집된 속성에만 설정할 수 있습니다.

응답

이 요청은 참 또는 거짓 응답을 반환합니다.

json
{
  "success": true
}
json
{
  "success": false
}

모든 사용자 속성 가져오기

귀하의 계정에 있는 모든 사용자 속성을 검색합니다. 요청에 필수 매개 변수가 없습니다.

GET https://amplitude.com/api/2/taxonomy/user-property

숨겨진 사용자 속성("표시됨"이 아닌 다른 표시 범위를 가진 속성)은 응답에 나타나지 않습니다.

기본적으로 이 엔드포인트는 삭제된 사용자 속성을 제외합니다. 이러한 항목을 포함하려면 showDeleted쿼리 매개 변수를 추가하십시오:

GET https://amplitude.com/api/2/taxonomy/user-property?showDeleted=true

curl --location --request GET 'https://amplitude.com/api/2/taxonomy/user-property' \
-u '{api_key}:{secret_key}''

응답

성공적인 요청은 200 OK응답과 사용자 속성 세부 정보가 포함된 JSON 본문을 반환합니다.

json
{
  "success": true,
  "data": [
    {
      "user_property": "device_id",
      "description": null,
      "type": null,
      "enum_values": null,
      "regex": null,
      "is_array_type": false,
      "is_hidden": false,
      "classifications": ["PII"],
      "deleted": false
    },
    {
      "user_property": "event_id",
      "description": null,
      "type": null,
      "enum_values": null,
      "regex": null,
      "is_array_type": false,
      "is_hidden": false,
      "classifications": [],
      "deleted": false
    },
    {
      "user_property": "amplitude_id",
      "description": null,
      "type": null,
      "enum_values": null,
      "regex": null,
      "is_array_type": false,
      "is_hidden": false,
      "classifications": [],
      "deleted": false
    },
    {
      "user_property": "location_lat",
      "description": null,
      "type": null,
      "enum_values": null,
      "regex": null,
      "is_array_type": false,
      "is_hidden": false,
      "classifications": [],
      "deleted": false
    },
    {
      "user_property": "location_lng",
      "description": null,
      "type": null,
      "enum_values": null,
      "regex": null,
      "is_array_type": false,
      "is_hidden": false,
      "classifications": [],
      "deleted": false
    },
    {
      "user_property": "server_upload_time",
      "description": null,
      "type": null,
      "enum_values": null,
      "regex": null,
      "is_array_type": false,
      "is_hidden": false,
      "classifications": [],
      "deleted": false
    },
    {
      "user_property": "session_id",
      "description": null,
      "type": null,
      "enum_values": null,
      "regex": null,
      "is_array_type": false,
      "is_hidden": false,
      "classifications": [],
      "deleted": false
    },
    {
      "user_property": "user_id",
      "description": null,
      "type": null,
      "enum_values": null,
      "regex": null,
      "is_array_type": false,
      "is_hidden": false,
      "classifications": [],
      "deleted": false
    }
  ]
}

사용자 속성 가져오기

단일 사용자 속성을 이름별로 검색합니다.

GET https://amplitude.com/api/2/taxonomy/user-property/:user_property

기본적으로 이 엔드포인트는 삭제된 사용자 속성을 제외합니다. 이러한 항목을 포함하려면 showDeleted쿼리 매개 변수를 추가하십시오:

GET https://amplitude.com/api/2/taxonomy/user-property/:user_property?showDeleted=true

curl --location --request GET 'https://amplitude.com/api/2/taxonomy/user-property/USER_PROPERTY' \
-u '{api_key}:{secret_key}'

경로 매개변수

200 OK 응답

성공적인 요청은 200 OK응답과 사용자 속성 세부 정보가 포함된 JSON 본문을 반환합니다.

json
{
  "success": true,
  "data": {
    "user_property": "device_id",
    "description": null,
    "type": null,
    "enum_values": null,
    "regex": null,
    "is_array_type": false,
    "is_hidden": false,
    "classifications": ["PII"],
    "deleted": false
  }
}

404 잘못된 요청 응답

실패한 요청은 404 Bad Request상태와 오류 메시지를 반환합니다.

json
{
  "success": false,
  "errors": [
    {
      "message": "Not found"
    }
  ]
}

사용자 속성 업데이트

사용자 속성 이름을 경로 매개 변수로 사용하여 PUT요청을 전송하여 사용자 속성을 업데이트합니다.

PUT https://amplitude.com/api/2/taxonomy/user-property/:user_property

curl --location --request PUT 'https://amplitude.com/api/2/taxonomy/user-property/USER_PROPERTY' \
-u '{api_key}:{secret_key}'
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'new_user_property_value=VALUE' \
--data-urlencode 'description=DESCRIPTION'

경로 매개변수

바디 매개변수

is_hidden 속성은 수집된 속성에만 설정할 수 있습니다.

응답

이 요청은 참 또는 거짓 응답을 반환합니다.

json
{
  "success": true
}
json
{
  "success": false
}

사용자 속성 삭제

이름별로 사용자 속성 하나를 삭제합니다.

DELETE https://amplitude.com/api/2/taxonomy/user-property/USER_PROPERTY

curl --location --request DELETE 'https://amplitude.com/api/2/taxonomy/user-property/USER_PROPERTY' \
-u '{api_key}:{secret_key}'

경로 매개변수

행동 방식

200 OK 응답

성공적인 요청은 200 OK응답과 JSON 메시지를 반환합니다.

json
{
  "success": true
}

사용자 속성 복원

단일 사용자 속성을 이름별로 복원합니다.

POST https://amplitude.com/api/2/taxonomy/user-property/USER_PROPERTY/restore

curl --location --request POST 'https://amplitude.com/api/2/taxonomy/user-property/USER_PROPERTY/restore' \
-u '{api_key}:{secret_key}'

경로 매개변수

행동 방식

200 OK 응답

성공적인 요청은 200 OK응답과 JSON 메시지를 반환합니다.

json
{
  "success": true
}

그룹 속성

그룹 속성은 계정 수준의 속성입니다. 그룹 속성은 해당 계정에 속한 모든 사용자에게 적용됩니다.

그룹 속성 만들기

본문에 필요한 정보가 포함된 요청을 전송하여 그룹 속성을 POST생성합니다.

POST https://amplitude.com/api/2/taxonomy/group-property

curl --location --request POST 'https://amplitude.com/api/2/taxonomy/group-property' \
-u '{api_key}:{secret_key}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'group_type=GROUP_TYPE' \
--data-urlencode 'group_property=GROUP_PROPERTY' \

바디 매개변수

is_hidden 속성은 수집된 속성에만 설정할 수 있습니다.

200 OK 응답

성공적인 요청은 200 OK상태와 JSON 본문을 반환합니다.

json
{
  "success": true
}

409 충돌 응답

요청에 문제가 있는 경우, 요청은 409 Conflict상태와 자세한 정보가 포함된 JSON 본문을 반환합니다.

json
{
  "success": false,
  "errors": [
    {
      "message": "Attempted to add a group property, \"Group Property 1\", that already exists."
    }
  ]
}

그룹 속성 가져오기

공유 또는 그룹별 그룹 속성을 가져옵니다.

GET https://amplitude.com/api/2/taxonomy/group-property

curl --location --request GET 'https://amplitude.com/api/2/taxonomy/group-property' \
-u '{api_key}:{secret_key}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'group_type=GROUP_TYPE'
curl --location --request GET 'https://amplitude.com/api/2/taxonomy/group-property' \
--header 'Authorization: Basic MTIzNDU2NzgwMDoxMjM0NTY3MDA==' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'group_type=Group 1'

바디 매개변수

200 OK 응답

성공적인 요청은 200 OK상태와 그룹 속성 및 해당 데이터 목록이 포함된 JSON 본문을 반환합니다.

json
{
  "success": true,
  "data": [
    {
      "group_type": "Group 1",
      "group_property": "grp:Group Property 1",
      "description": "First Group Property",
      "type": "string",
      "enum_values": null,
      "regex": null,
      "is_array_type": false,
      "is_hidden": false,
      "classifications": ["PII"]
    },
    {
      "group_type": "Group 1",
      "group_property": "grp:Group Property 2",
      "description": "Second Group Property",
      "type": "string",
      "enum_values": null,
      "regex": null,
      "is_array_type": false,
      "is_hidden": false,
      "classifications": []
    }
  ]
}

단일 그룹 속성 가져오기

그룹 속성 이름을 경로 매개 변수로 사용하여 GET요청을 전송하여 단일 그룹 속성을 가져옵니다. 필요에 따라 본문에 그룹 유형을 포함시킵니다.

GET https://amplitude.com/api/2/taxonomy/group-property/:group_property

curl --location --request GET 'https://amplitude.com/api/2/taxonomy/group-property/GROUP_PROPERTY' \
-u '{api_key}:{secret_key}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'group_type=GROUP_TYPE'

경로 매개변수

쿼리 또는 본문 매개변수

200 OK 응답

성공적인 요청은 200 OK상태와 그룹 속성에 대한 정보를 포함하는 JSON 본문을 반환합니다.

json
{
  "success": true,
  "data": {
    "group_type": "Group 1",
    "group_property": "grp:Group Property 1",
    "description": "First Group Property",
    "type": "string",
    "enum_values": null,
    "regex": null,
    "is_array_type": false,
    "is_hidden": false,
    "classifications": ["PII"]
  }
}

400 잘못된 요청 응답

Amplitude가 그룹 속성을 찾을 수 없거나 요청을 잘못 구성한 경우, 400 Bad Request응답과 오류 메시지를 반환합니다.

json
{
  "success": false,
  "errors": [
    {
      "message": "Not found"
    }
  ]
}

그룹 속성 업데이트

그룹 속성 이름을 경로 매개 변수로 사용하여 PUT요청을 전송하여 그룹 속성을 업데이트합니다.

PUT https://amplitude.com/api/2/taxonomy/group-property/:group_property

curl --location --request PUT 'https://amplitude.com/api/2/taxonomy/group-property/GROUP_PROPERTY' \
-u '{api_key}:{secret_key}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'group_type=GROUP_TYPE' \

이름을 "그룹 속성 1 - 이름 바뀜"으로 변경하고 설명을 추가합니다.

curl --location --request PUT 'https://amplitude.com/api/2/taxonomy/group-property/grp:Group Property 1' \
--header 'Authorization: Basic MTIzNDU2NzgwMDoxMjM0NTY3MDA==' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'description=First Group Property Updated' \
--data-urlencode 'new_group_property_value=grp:Group Property - Renamed' \

경로 매개변수

바디 매개변수

is_hidden 속성은 수집된 속성에만 설정할 수 있습니다.

200 OK 응답

성공적인 요청은 200 OK상태와 JSON 본문을 반환합니다.

json
{
  "success": true
}

409 충돌 응답

실패한 일부 요청은 409 Conflict 및 자세한 내용이 포함된 오류 메시지를 반환합니다.

json
{
  "success": false,
  "errors": [
    {
      "message": "Attempted to update classifications for an overridden group property, \"grp:Group Property 1\" on group type \"Group 1\". Call the Update API without the \"group_type\" parameter to update classifications of the shared property."
    }
  ]
}

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