POST V1 ems/experiments

Adds a new standard Experiment to a study.

Authentication

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

Request Information

Parameters

NameDescriptionAdditional information
experiment
Object describing the Standard Experiment to create:
            
  • StudyId - the ID of the Study to assign the experiment to.
  • ProtocolId - the ID of the Protocol for the experiment.
  • ExperimentName - the name of the experiment to create.
  • ExperimentObjectives - the objectives to assign to the experiment.
  • Define this parameter in the request body.

    Example Request

    To add an Experiment with Name Experiment 1 to a Study with ID 1234, with a Protocol ID of 5678 and Example Objectives of Example Objectives, make the following API call:

    POST /ems/experiment

    and put the following content in the request body:

    StudyId=1234&ProtocolId=5678&ExperimentName=Experiment 1&ExperimentObjectives=Example Objectives

    Request body formats

    application/json, text/json

    Sample:
    {
      "StudyId": 1,
      "ExperimentName": "Example Experiment Name",
      "ExperimentObjectives": "Example Experiment Objectives",
      "ProtocolId": 2
    }

    application/xml, text/xml

    Sample:
    <StandardExperiment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Unilever.Urdps.Hts.EmsApi.EntityRepresentations.Request.V1">
      <ExperimentName>Example Experiment Name</ExperimentName>
      <ExperimentObjectives>Example Experiment Objectives</ExperimentObjectives>
      <ProtocolId>2</ProtocolId>
      <StudyId>1</StudyId>
    </StandardExperiment>

    application/x-www-form-urlencoded

    Sample:
    StudyId=1&ExperimentName=Example Experiment Name&ExperimentObjectives=Example Experiment Objectives&ProtocolId=2

    Request Detail

    This request should be made with the Content-Type header set to 'application/x-www-form-urlencoded', 'application/json' or 'application/xml'.

    This endpoint requires the api-username and api-usertoken headers to be present. If these headers are not present, a 401 (Unauthorized) response will be returned.

    Response Information

    HTTP Status Codes

    Status CodeMeaning
    201 (Created) The request has completed successfully. The ID of the experiment 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.
    409 (Conflict) The experiment name already exists and must be unique.
    503 (ServiceUnavailable) EMS is currently unavailable.
    Please try again later or contact a system administrator to ask when EMS will be back online.