POST V1 stability/experiments

Creates a stability experiment based on the information given in the content body.

Authentication

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

Request Information

Parameters

NameDescriptionAdditional information
stabilityExperiment
The stability experiment to be created. See the method description for more information

Define this parameter in the request body.

Example Request

To create a stability experiment make the following api call:
POST /stability/experiments
supplying a stability experiment definition in the request body.

Request body formats

application/json, text/json

Sample:
{
  "StudyId": 10001,
  "ExperimentName": "Test experiment 1",
  "ExperimentObjectives": "Test objectives",
  "Format": "EFD",
  "Formulations": [
    {
      "FlowId": 2000
    },
    {
      "FlowId": 3000
    }
  ],
  "Temperatures": [
    "RT",
    "10"
  ],
  "Schedule": {
    "EstimatedStartDate": "2021-08-03T16:27:28.2805725+01:00",
    "Units": "weeks",
    "Timepoints": [
      1,
      3
    ]
  },
  "Measurements": [
    {
      "ID": 1,
      "SettingId": 111,
      "MethodId": 11,
      "DispenseSettings": null
    },
    {
      "ID": 3,
      "SettingId": null,
      "MethodId": 33,
      "DispenseSettings": [
        {
          "SettingId": 331,
          "FlowId": 2000
        },
        {
          "SettingId": 332,
          "FlowId": 3000
        }
      ]
    }
  ],
  "SpecificationLimits": [
    {
      "Timepoint": 0,
      "FieldId": 400,
      "FlowId": 2000,
      "LowerLimit": 1.1,
      "UpperLimit": null
    },
    {
      "Timepoint": 1,
      "FieldId": 400,
      "FlowId": 2000,
      "LowerLimit": null,
      "UpperLimit": 2.1
    },
    {
      "Timepoint": 3,
      "FieldId": 400,
      "FlowId": 2000,
      "LowerLimit": 1.2,
      "UpperLimit": 2.2
    },
    {
      "Timepoint": 0,
      "FieldId": 400,
      "FlowId": 3000,
      "LowerLimit": 1.3,
      "UpperLimit": 2.3
    },
    {
      "Timepoint": 0,
      "FieldId": 401,
      "FlowId": 3000,
      "LowerLimit": 1.3,
      "UpperLimit": 2.3
    }
  ],
  "Plates": [
    {
      "Temperature": "RT",
      "FlowId": 2000,
      "Wells": [
        {
          "Timepoint": 0,
          "Measurements": [
            1,
            3
          ]
        },
        {
          "Timepoint": 1,
          "Measurements": [
            1
          ]
        },
        {
          "Timepoint": 3,
          "Measurements": [
            3
          ]
        }
      ]
    },
    {
      "Temperature": "10",
      "FlowId": 2000,
      "Wells": [
        {
          "Timepoint": 0,
          "Measurements": []
        },
        {
          "Timepoint": 1,
          "Measurements": [
            1,
            3
          ]
        },
        {
          "Timepoint": 3,
          "Measurements": [
            1,
            3
          ]
        }
      ]
    },
    {
      "Temperature": "RT",
      "FlowId": 3000,
      "Wells": [
        {
          "Timepoint": 0,
          "Measurements": [
            1,
            3
          ]
        },
        {
          "Timepoint": 1,
          "Measurements": [
            1,
            3
          ]
        },
        {
          "Timepoint": 3,
          "Measurements": [
            1,
            3
          ]
        }
      ]
    },
    {
      "Temperature": "10",
      "FlowId": 3000,
      "Wells": [
        {
          "Timepoint": 0,
          "Measurements": [
            1,
            3
          ]
        },
        {
          "Timepoint": 1,
          "Measurements": [
            1,
            3
          ]
        },
        {
          "Timepoint": 3,
          "Measurements": [
            1,
            3
          ]
        }
      ]
    }
  ]
}

application/xml, text/xml

Sample:
<StabilityExperiment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Unilever.Urdps.Hts.EmsApi.EntityRepresentations.Stability.V1.Request">
  <ExperimentName>Test experiment 1</ExperimentName>
  <ExperimentObjectives>Test objectives</ExperimentObjectives>
  <Format>EFD</Format>
  <Formulations>
    <Formulation>
      <FlowId>2000</FlowId>
    </Formulation>
    <Formulation>
      <FlowId>3000</FlowId>
    </Formulation>
  </Formulations>
  <Measurements>
    <Measure>
      <DispenseSettings i:nil="true" />
      <ID>1</ID>
      <MethodId>11</MethodId>
      <SettingId>111</SettingId>
    </Measure>
    <Measure>
      <DispenseSettings>
        <DispenseSetting>
          <FlowId>2000</FlowId>
          <SettingId>331</SettingId>
        </DispenseSetting>
        <DispenseSetting>
          <FlowId>3000</FlowId>
          <SettingId>332</SettingId>
        </DispenseSetting>
      </DispenseSettings>
      <ID>3</ID>
      <MethodId>33</MethodId>
      <SettingId i:nil="true" />
    </Measure>
  </Measurements>
  <Plates>
    <Plate>
      <FlowId>2000</FlowId>
      <Temperature>RT</Temperature>
      <Wells>
        <Well>
          <Measurements xmlns:d6p1="http://schemas.datacontract.org/2004/07/System">
            <d6p1:long>1</d6p1:long>
            <d6p1:long>3</d6p1:long>
          </Measurements>
          <Timepoint>0</Timepoint>
        </Well>
        <Well>
          <Measurements xmlns:d6p1="http://schemas.datacontract.org/2004/07/System">
            <d6p1:long>1</d6p1:long>
          </Measurements>
          <Timepoint>1</Timepoint>
        </Well>
        <Well>
          <Measurements xmlns:d6p1="http://schemas.datacontract.org/2004/07/System">
            <d6p1:long>3</d6p1:long>
          </Measurements>
          <Timepoint>3</Timepoint>
        </Well>
      </Wells>
    </Plate>
    <Plate>
      <FlowId>2000</FlowId>
      <Temperature>10</Temperature>
      <Wells>
        <Well>
          <Measurements xmlns:d6p1="http://schemas.datacontract.org/2004/07/System" />
          <Timepoint>0</Timepoint>
        </Well>
        <Well>
          <Measurements xmlns:d6p1="http://schemas.datacontract.org/2004/07/System">
            <d6p1:long>1</d6p1:long>
            <d6p1:long>3</d6p1:long>
          </Measurements>
          <Timepoint>1</Timepoint>
        </Well>
        <Well>
          <Measurements xmlns:d6p1="http://schemas.datacontract.org/2004/07/System">
            <d6p1:long>1</d6p1:long>
            <d6p1:long>3</d6p1:long>
          </Measurements>
          <Timepoint>3</Timepoint>
        </Well>
      </Wells>
    </Plate>
    <Plate>
      <FlowId>3000</FlowId>
      <Temperature>RT</Temperature>
      <Wells>
        <Well>
          <Measurements xmlns:d6p1="http://schemas.datacontract.org/2004/07/System">
            <d6p1:long>1</d6p1:long>
            <d6p1:long>3</d6p1:long>
          </Measurements>
          <Timepoint>0</Timepoint>
        </Well>
        <Well>
          <Measurements xmlns:d6p1="http://schemas.datacontract.org/2004/07/System">
            <d6p1:long>1</d6p1:long>
            <d6p1:long>3</d6p1:long>
          </Measurements>
          <Timepoint>1</Timepoint>
        </Well>
        <Well>
          <Measurements xmlns:d6p1="http://schemas.datacontract.org/2004/07/System">
            <d6p1:long>1</d6p1:long>
            <d6p1:long>3</d6p1:long>
          </Measurements>
          <Timepoint>3</Timepoint>
        </Well>
      </Wells>
    </Plate>
    <Plate>
      <FlowId>3000</FlowId>
      <Temperature>10</Temperature>
      <Wells>
        <Well>
          <Measurements xmlns:d6p1="http://schemas.datacontract.org/2004/07/System">
            <d6p1:long>1</d6p1:long>
            <d6p1:long>3</d6p1:long>
          </Measurements>
          <Timepoint>0</Timepoint>
        </Well>
        <Well>
          <Measurements xmlns:d6p1="http://schemas.datacontract.org/2004/07/System">
            <d6p1:long>1</d6p1:long>
            <d6p1:long>3</d6p1:long>
          </Measurements>
          <Timepoint>1</Timepoint>
        </Well>
        <Well>
          <Measurements xmlns:d6p1="http://schemas.datacontract.org/2004/07/System">
            <d6p1:long>1</d6p1:long>
            <d6p1:long>3</d6p1:long>
          </Measurements>
          <Timepoint>3</Timepoint>
        </Well>
      </Wells>
    </Plate>
  </Plates>
  <Schedule>
    <EstimatedStartDate>2021-08-03T16:27:28.2805725+01:00</EstimatedStartDate>
    <Timepoints xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:int>1</d3p1:int>
      <d3p1:int>3</d3p1:int>
    </Timepoints>
    <Units>weeks</Units>
  </Schedule>
  <SpecificationLimits>
    <SpecificationLimit>
      <FieldId>400</FieldId>
      <FlowId>2000</FlowId>
      <LowerLimit>1.1</LowerLimit>
      <Timepoint>0</Timepoint>
      <UpperLimit i:nil="true" />
    </SpecificationLimit>
    <SpecificationLimit>
      <FieldId>400</FieldId>
      <FlowId>2000</FlowId>
      <LowerLimit i:nil="true" />
      <Timepoint>1</Timepoint>
      <UpperLimit>2.1</UpperLimit>
    </SpecificationLimit>
    <SpecificationLimit>
      <FieldId>400</FieldId>
      <FlowId>2000</FlowId>
      <LowerLimit>1.2</LowerLimit>
      <Timepoint>3</Timepoint>
      <UpperLimit>2.2</UpperLimit>
    </SpecificationLimit>
    <SpecificationLimit>
      <FieldId>400</FieldId>
      <FlowId>3000</FlowId>
      <LowerLimit>1.3</LowerLimit>
      <Timepoint>0</Timepoint>
      <UpperLimit>2.3</UpperLimit>
    </SpecificationLimit>
    <SpecificationLimit>
      <FieldId>401</FieldId>
      <FlowId>3000</FlowId>
      <LowerLimit>1.3</LowerLimit>
      <Timepoint>0</Timepoint>
      <UpperLimit>2.3</UpperLimit>
    </SpecificationLimit>
  </SpecificationLimits>
  <StudyId>10001</StudyId>
  <Temperatures xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>RT</d2p1:string>
    <d2p1:string>10</d2p1:string>
  </Temperatures>
</StabilityExperiment>

application/x-www-form-urlencoded

Sample:
StudyId=10001&ExperimentName=Test experiment&ExperimentObjectives=Test objectives&Format=EFD&Formulations[0].FlowId=2000&Formulations[1].FlowId=3000&Temperatures[0]=RT&Temperatures[1]=10&Schedule.EstimatedStartDate=2021-08-03&Schedule.Units=weeks&Schedule.Timepoints[0]=1&Schedule.Timepoints[1]=3&Measurements[0].ID=1&Measurements[0].SettingId=111&Measurements[0].MethodId=11&Measurements[1].ID=3&Measurements[1].MethodId=33&Measurements[1].DispenseSettings[0].SettingId=331&Measurements[1].DispenseSettings[0].FlowId=2000&Measurements[1].DispenseSettings[1].SettingId=333&Measurements[1].DispenseSettings[1].FlowId=3000&SpecificationLimits[0].Timepoint=0&SpecificationLimits[0].FieldId=400&SpecificationLimits[0].FlowId=2000&SpecificationLimits[0].LowerLimit=1.1&SpecificationLimits[1].Timepoint=1&SpecificationLimits[1].FieldId=400&SpecificationLimits[1].FlowId=2000&SpecificationLimits[1].UpperLimit=2.1&SpecificationLimits[2].Timepoint=3&SpecificationLimits[2].FieldId=400&SpecificationLimits[2].FlowId=2000&SpecificationLimits[2].LowerLimit=1.2&SpecificationLimits[2].UpperLimit=2.2&SpecificationLimits[3].Timepoint=0&SpecificationLimits[3].FieldId=400&SpecificationLimits[3].FlowId=3000&SpecificationLimits[3].LowerLimit=1.3&SpecificationLimits[3].UpperLimit=2.3&SpecificationLimits[4].Timepoint=0&SpecificationLimits[4].FieldId=401&SpecificationLimits[4].FlowId=3000&SpecificationLimits[4].LowerLimit=1.3&SpecificationLimits[4].UpperLimit=2.3&Plates[0].Temperature=RT&Plates[0].FlowId=2000&Plates[0].Wells[0].Timepoint=0&Plates[0].Wells[0].Measurements[0]=1&Plates[0].Wells[0].Measurements[1]=3&Plates[0].Wells[1].Timepoint=1&Plates[0].Wells[1].Measurements[0]=1&Plates[0].Wells[2].Timepoint=3&Plates[0].Wells[2].Measurements[0]=3&Plates[1].Temperature=10&Plates[1].FlowId=2000&Plates[1].Wells[0].Timepoint=0&Plates[1].Wells[1].Timepoint=1&Plates[1].Wells[1].Measurements[0]=1&Plates[1].Wells[1].Measurements[1]=3&Plates[1].Wells[2].Timepoint=3&Plates[1].Wells[2].Measurements[0]=1&Plates[1].Wells[2].Measurements[1]=3&Plates[2].Temperature=RT&Plates[2].FlowId=3000&Plates[2].Wells[0].Timepoint=0&Plates[2].Wells[0].Measurements[0]=1&Plates[2].Wells[0].Measurements[1]=3&Plates[2].Wells[1].Timepoint=1&Plates[2].Wells[1].Measurements[0]=1&Plates[2].Wells[1].Measurements[1]=3&Plates[2].Wells[2].Timepoint=3&Plates[2].Wells[2].Measurements[0]=1&Plates[2].Wells[2].Measurements[1]=3&Plates[3].Temperature=10&Plates[3].FlowId=3000&Plates[3].Wells[0].Timepoint=0&Plates[3].Wells[0].Measurements[0]=1&Plates[3].Wells[0].Measurements[1]=3&Plates[3].Wells[1].Timepoint=1&Plates[3].Wells[1].Measurements[0]=1&Plates[3].Wells[1].Measurements[1]=3&Plates[3].Wells[2].Timepoint=3&Plates[3].Wells[2].Measurements[0]=1&Plates[3].Wells[2].Measurements[1]=3

Request Detail

These are additional notes to help with requests in addition to the sample objects.

Study ID

The supplied study ID must refer to an existing open study that the user making the call has write access to.

Experiment Name

The experiment name must unqiue within the target study.

Experiment Objectives

This is optional.

Format

Currently the only experiment formats available are "CUP" and "EFD".

Formulations

Supply the ID of the Formulation, Material or Substrate. If the item is batch/lot, use the ID of the batch/lot.

Schedule

The units must be either "weeks" or "days".

Measurements

Use this API call to get the available measures and their methods and fields.
Currently only measures with ID 1,2,3,4,5,6 exist.

For CUP experiments only measurements 1,2,6 can be used. No measurements in CUP experiments should have a setting ID.

All measurements in EFD experiments (with the exception of malvern/particle size measures, ID 3, and observational measurements, ID 6) should have a setting ID.
For malvern measurements dispense parameters must be defined for each Formulation in the experiment. Dispense parameters should ony be defined for metrohm measurements.
If both metrohm (ID 2) and spectrophotometer (ID 5) measurements are being used then they must have the same setting ID.

Specification Limits

If any of the defined measurements contain fields that support specification limits then these may be supplied.
These are optional for each field and Formulation in the experiment.
Both a lower bound and upper bound do not need to be supplied. If both are supplied, the lower bound must not be greater than or equal to the upper bound.
Use this API call to get the fields available for each measurement.

Plates and Wells

A plate for each Formulation at each temperature must be defined.
Each plate must contain a well for each timepoint defined in the Schedule as well as the starting date, timepoint 0. The first well (X=0, Y=0) in every plate must have a corresponding Measurement. If you need to have a well without a measurement it's recommended to place it after wells with measurements, plates where all wells have no measurements are not supported.

Response Information

HTTP Status Codes

Status CodeMeaning
201 (Created) The request has completed successfully. The ID of the newly created experiment will be returned in the response body.
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 create an experiment in the specified study.
404 (Not Found) One or more entities defined in the input could not be found amongst existing EMS/FLOW entities.
409 (Conflict) An experiment with the supplied name already exists.
503 (ServiceUnavailable) EMS is currently unavailable.
Please try again later or contact a system administrator to ask when EMS will be back online.