POST V1 ems/experimentFactors/conditions
Adds a condition factor to an Experiment.
Request Information
Parameters
| Name | Description | Additional information |
|---|---|---|
| experimentCondition | Object describing the Condition to add to the Experiment:
|
Define this parameter in the request body. |
Example Request
To add a Condition, with ID 1234 and Units with ID 9 and that is Visible and Editable but the condition values can't be edited, to an Experiment with ID 5678, make the following API call:
POST /ems/experimentFactors/conditions
and put the following content in the request body:
ConditionId=1234&ExperimentId=5678&UnitId=9&Visible=true&Editable=true&ValuesEditable=false
Request body formats
application/json, text/json
Sample:
{
"ConditionId": 123,
"ExperimentId": 456,
"UnitId": 789,
"Visible": true,
"Editable": false,
"ValuesEditable": true
}
application/xml, text/xml
Sample:
<ExperimentCondition xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Unilever.Urdps.Hts.EmsApi.EntityRepresentations.Request.V1"> <ConditionId>123</ConditionId> <Editable>false</Editable> <ExperimentId>456</ExperimentId> <UnitId>789</UnitId> <ValuesEditable>true</ValuesEditable> <Visible>true</Visible> </ExperimentCondition>
application/x-www-form-urlencoded
Sample:
ConditionId=123&ExperimentId=456&UnitId=789&Visible=true&Editable=false&ValuesEditable=true
Request Detail
This request should be made with the Content-Type header set to 'application/x-www-form-urlencoded', 'application/json' or 'application/xml'.
Response Information
HTTP Status Codes
| Status Code | Meaning |
|---|---|
| 201 (Created) | The request has completed successfully. The ID of the experiment condition will be contained in the response. |
| 400 (Bad Request) | The data in the request body was invalid. The nature of the error will be indicated in the Response content. |
| 401 (Unauthorized) | The user has not been authorised. Please ensure that the client provides the api-username and api-usertoken headers. |
| 403 (Forbidden) | The user does not have permission to access the specified experiment. Please use EMS to add the user to the experiment access control list. |