이 페이지에서

실험 API 관리 배포 엔드포인트

EU 데이터 레지던시

이 페이지의 예제에서는 기본 URL https://experiment.amplitude.com을(를) 사용합니다. 프로젝트에서 Amplitude의 EU 데이터 센터를 사용하고 있다면 대신 https://experiment.eu.amplitude.com을(를) 사용하십시오. 자세한 내용은 지역을 참조하십시오.

배포 내역 목록

bash
GET https://experiment.amplitude.com/api/1/deployments

실험이나 플래그를 할당할 수 있는 배포 목록을 가져옵니다.

쿼리 매개 변수

응답

성공적인 요청은 응답 본문에 JSON으로 인코딩된 배포 목록과 함께 200 OK 응답을 반환합니다.

요청

curl
curl --request GET \
    --url 'https://experiment.amplitude.com/api/1/deployments?limit=1000' \
    --header 'Accept: application/json' \
    --header 'Authorization: Bearer <management-api-key>'

응답

json
    {
        "deployments": [
            {
                "id": <id>,
                "projectId": <projectId>,
                "label": "deployment-1",
                "key": <key>,
                "deleted": true
            },
            {
                "id": <id>,
                "projectId": <projectId>,
                "label": "deployment-2",
                "key": <key>,
                "deleted": false
            }
        ]
    }

배포 작성

bash
POST https://experiment.amplitude.com/api/1/deployments

실험이나 플래그를 할당할 수 있는 배포를 생성합니다.

쿼리 매개 변수

요청

json
{
  "projectId": "<projectId>",
  "label": "hello-world",
  "type": "client"
}

응답

성공적인 요청은 200 OK 응답과 배포의 id을(를) 반환합니다.

요청

curl
curl --request POST \
    --url 'https://experiment.amplitude.com/api/1/deployments' \
    --header 'Accept: application/json' \
    --header 'Authorization: Bearer <management-api-key>'
json
    {
        "id": <id>
    }

배포 편집

bash
PATCH https://experiment.amplitude.com/api/1/deployments/<id>

실험이나 플래그를 할당할 수 있는 배포를 편집합니다.

쿼리 매개 변수

요청

json
{
  "label": "updated-label"
}

응답

성공적인 요청은 200 OK응답과 OK 텍스트를 반환합니다.

요청

curl
curl --request PATCH \
    --url 'https://experiment.amplitude.com/api/1/deployments/<id>' \
    --header 'Accept: application/json' \
    --header 'Authorization: Bearer <management-api-key>'

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