Update Experiment.

PUT /api/teams/{team}/experiments/{experiment}

Path parameters

  • team integer Required

    The ID of the team that the experiment belongs to.

  • experiment string Required

    The experiment key to show.

application/json

Body

  • key string

    The key to use for the experiment.

  • description string

    The description of the experiment.

  • algorithm_type string

    The algorithm to use for enrolling participants.

    Values are blockRandomization, weightedSample, or whiplash.

  • event_key string

    The key of the event to track the experiment against.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • data object
      Hide data attributes Show data attributes object
      • id string
      • type string
      • attributes object
        Hide attributes attributes Show attributes attributes object
        • id integer
        • team_id integer
        • key string
        • description string
        • status string
        • created object
          Hide created attributes Show created attributes object
          • human string
          • string string
        • updated object
          Hide updated attributes Show updated attributes object
          • human string
          • string string
        • started object
          Hide started attributes Show started attributes object
          • human string
          • string string
        • stopped object
          Hide stopped attributes Show stopped attributes object
          • human string
          • string string
  • 403 application/json
    Hide response attribute Show response attribute object
    • message string
  • 404 application/json
    Hide response attribute Show response attribute object
    • message string
  • 422 application/json
    Hide response attributes Show response attributes object
    • message string
    • errors object
      Hide errors attribute Show errors attribute object
      • key array[string]
PUT /api/teams/{team}/experiments/{experiment}
curl \
 -X PUT https://checkmango.com/api/teams/10/experiments/MY_NEW_EXPERIMENT \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"key":"REGISTER_OR_SIGNUP","description":"Mollitia expedita totam in dolorem quos voluptate debitis.","algorithm_type":"whiplash","event_key":"REGISTERED"}'
Request example
{
  "key": "REGISTER_OR_SIGNUP",
  "description": "Mollitia expedita totam in dolorem quos voluptate debitis.",
  "algorithm_type": "whiplash",
  "event_key": "REGISTERED"
}
Response examples (200)
{
  "data": {
    "id": "LABORUM_INVENTORE_VEL_QUIDEM",
    "type": "experiments",
    "attributes": {
      "id": 6,
      "team_id": 16,
      "key": "LABORUM_INVENTORE_VEL_QUIDEM",
      "description": "Magni ut necessitatibus eveniet dolorem non animi. Quisquam omnis a officiis quidem excepturi at officia. Est debitis dolorem architecto corrupti doloribus. Qui reprehenderit enim alias neque dolore reiciendis.",
      "status": "draft",
      "created": {
        "human": "1 second ago",
        "string": "2024-04-08 10:42:02"
      },
      "updated": {
        "human": "1 second ago",
        "string": "2024-04-08 10:42:02"
      },
      "started": {
        "human": null,
        "string": null
      },
      "stopped": {
        "human": null,
        "string": null
      }
    },
    "links": {
      "self": {
        "href": "http://checkmango.com/api/teams/16/experiments/LABORUM_INVENTORE_VEL_QUIDEM"
      }
    }
  }
}
Response examples (403)
{
  "message": "Unauthenticated."
}
Response examples (404)
{
  "message": "Not Found"
}
Response examples (422)
{
  "message": "The given data was invalid.",
  "errors": {
    "key": [
      "The key has already been taken."
    ]
  }
}