POST V1 ems/experimentFactors/conditions

Adds a condition factor to an Experiment.

Authentication

This endpoint requires the api-username and api-usertoken headers for authentication.

Request Information

Parameters

NameDescriptionAdditional information
experimentCondition
Object describing the Condition to add to the Experiment:
            
  • ConditionId - the ID of the Condition to add to the Experiment.
  • ExperimentId - the ID of the Experiment to add the Condition to.
  • UnitId - the ID of the Condition units. -1 signifies no units.
  • Visible - whether the Condition is visible to EMS users.
  • Editable - whether the Condition is editable by EMS users.
  • ValuesEditable - whether the Condition values are editable by EMS users

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 CodeMeaning
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.