refined-musician-86340
09/30/2025, 9:51 PMassignmentQueryId="user_id",
trackingKey="example_experiment_trackingKey",
name="example-experiment",
project="my-project-id",
variations=[variation1, variation2],
owner="test-user@test.com"
However, I am now getting a message when I submit the request of the following: {"message":"Unknown metric: string"} since my default metric value is just "string". Based on the API Docs it doesn't looks like metrics is a required value. However, when I set metrics = None and pass that in the request body I get {"message":"Request body: [metrics] Expected array, received null"}
Is there a default value I can pass for metrics, (and other), fields that will let me create a minimum experiment and is there a list of all fields that need to have valid data passed in as it seems that some fields which are not marked as required in the docs do require valid input. Thank you!
If there is a better question for a different channel I am happy to post there, just let me know.strong-mouse-55694
10/01/2025, 2:28 PMrefined-musician-86340
10/01/2025, 2:30 PMdatasourceId is listed as required in the docs. Do you know if there are other fields that might not have the "required" label that are needed?strong-mouse-55694
10/01/2025, 3:42 PMconst response = await fetch("<https://api.growthbook.io/api/v1/experiments>", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer secret_admin_123`,
},
body: JSON.stringify({
name: "Test exp",
assignmentQueryId: "user_id",
trackingKey: "text-exp",
variations: [
{ key: "0", name: "control" },
{ key: "1", name: "treatment" },
],
}),
});refined-musician-86340
10/01/2025, 3:44 PMstrong-mouse-55694
10/01/2025, 3:50 PMuser_id is the default one used.refined-musician-86340
10/01/2025, 6:30 PM