GET V1 ems/experiments/{id}

Gets the Experiment with the specified id. The Experiment returned contains a collection of Protocol Conditions applied to it.

Request Information

Parameters

Name Description Additional information
id
The ID of the Experiment to get.

Define this parameter in the request URI.

Example Request

To get the Experiment with ID 1234, make the following API call: GET /ems/experiments/1234

Response Information

HTTP Status Codes

Status Code Meaning
200 (OK) The request has completed successfully. The Experiment will be contained in the response body (see below).
401 (Unauthorized) The user has not been authorised due to the below reasons which will be displayed in the response content.
API Key is not found. Data received apiKey
Secret Key is wrong. Data received apiKey
Username not found. Data received apiKey
Received token not found in EMS issuer. Data received username, version
Lifetime validation failed. The token is expired. ValidTo (UTC): expiry, Current time (UTC): UTC DateTime
Token creation failed. Reason: The given username or password is wrong. For input: username, version
Please ensure that the client provides the api-username and api-usertoken headers.
404 (Not Found) The Experiment with the specified ID could not be found or has been closed. Ensure the ID has been correctly specified.

Response Detail

An empty ProtocolConditions collection for an Experiment means that the Experiment does not have any Protocol Conditions associated with it.

Response Body Formats

application/json, text/json

Sample:
{
  "ID": 1234,
  "Name": "Experiment 1234",
  "ProtocolName": "Experiment Protocol",
  "Objectives": "Experiment Objectives",
  "Author": "Experiment Author",
  "CoAuthors": [
    "Experiment Co-Author 1",
    "Experiment Co-Author 2"
  ],
  "CreationDate": "2013-05-21T15:30:00.012",
  "ProtocolConditions": [
    {
      "Id": 0,
      "Name": "Protocol Condition 1",
      "TabName": null,
      "Value": "12",
      "Units": "kg"
    },
    {
      "Id": 0,
      "Name": "Protocol Condition 2",
      "TabName": null,
      "Value": "abcd",
      "Units": "None"
    }
  ],
  "SiloID": 0
}

application/xml, text/xml

Sample:
<Experiment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Unilever.Urdps.Hts.EmsApi.EntityRepresentations.EMS.V1">
  <Author>Experiment Author</Author>
  <CoAuthors xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>Experiment Co-Author 1</d2p1:string>
    <d2p1:string>Experiment Co-Author 2</d2p1:string>
  </CoAuthors>
  <CreationDate>2013-05-21T15:30:00.012</CreationDate>
  <ID>1234</ID>
  <Name>Experiment 1234</Name>
  <Objectives>Experiment Objectives</Objectives>
  <ProtocolConditions>
    <ProtocolCondition>
      <Units>kg</Units>
      <Value>12</Value>
      <Id>0</Id>
      <Name>Protocol Condition 1</Name>
      <TabName i:nil="true" />
    </ProtocolCondition>
    <ProtocolCondition>
      <Units>None</Units>
      <Value>abcd</Value>
      <Id>0</Id>
      <Name>Protocol Condition 2</Name>
      <TabName i:nil="true" />
    </ProtocolCondition>
  </ProtocolConditions>
  <ProtocolName>Experiment Protocol</ProtocolName>
  <SiloID>0</SiloID>
</Experiment>