GET api-v1/results/sample?property={property}&value={value}&pageNumber={pageNumber}&pageSize={pageSize}

A basic search function to retrieve samples. Supports pagination so that large datasets can be traversed. Samples returned in the order that they have been uploaded to labPortal. Therefore the first sample will be the most recently updated Sample.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
property

The sample property name that you want to search by

string

Required

value

The sample property value that you want to search on

string

Required

pageNumber

A numerical value indicating the page number; default is 1

integer

Default value is 1

pageSize

A numerical value indicating the number of samples to return within a page; default is 10

integer

Default value is 10

Body Parameters

None.

Response Information

Resource Description

A containing the result of the specified search

SampleResponseMessage
NameDescriptionTypeAdditional information
Samples

Collection of SampleMessage

None.

Grid

DataTable

None.

TotalPages

decimal number

None.

SampleCount

decimal number

None.

NextPage

URI

None.

PreviousPage

URI

None.

Breaches

Dictionary of CellColour [key] and Collection of string [value]

None.

Response Formats

application/json,text/json

Sample:
{
  "Samples": [
    {
      "Status": "sample string 1",
      "Id": 2,
      "LimsId": "sample string 3",
      "Attachment": true,
      "Properties": {
        "sample string 1": {},
        "sample string 3": {}
      },
      "Results": [
        {
          "Text": "sample string 1",
          "Val": {},
          "Det": "sample string 3",
          "Suite": "sample string 4",
          "Unit": "sample string 5",
          "ShortName": "sample string 6",
          "LongName": "sample string 7"
        },
        {
          "Text": "sample string 1",
          "Val": {},
          "Det": "sample string 3",
          "Suite": "sample string 4",
          "Unit": "sample string 5",
          "ShortName": "sample string 6",
          "LongName": "sample string 7"
        }
      ],
      "Comments": [
        {
          "Author": "sample string 1",
          "Text": "sample string 2"
        },
        {
          "Author": "sample string 1",
          "Text": "sample string 2"
        }
      ]
    },
    {
      "Status": "sample string 1",
      "Id": 2,
      "LimsId": "sample string 3",
      "Attachment": true,
      "Properties": {
        "sample string 1": {},
        "sample string 3": {}
      },
      "Results": [
        {
          "Text": "sample string 1",
          "Val": {},
          "Det": "sample string 3",
          "Suite": "sample string 4",
          "Unit": "sample string 5",
          "ShortName": "sample string 6",
          "LongName": "sample string 7"
        },
        {
          "Text": "sample string 1",
          "Val": {},
          "Det": "sample string 3",
          "Suite": "sample string 4",
          "Unit": "sample string 5",
          "ShortName": "sample string 6",
          "LongName": "sample string 7"
        }
      ],
      "Comments": [
        {
          "Author": "sample string 1",
          "Text": "sample string 2"
        },
        {
          "Author": "sample string 1",
          "Text": "sample string 2"
        }
      ]
    }
  ],
  "Grid": null,
  "TotalPages": 1.0,
  "SampleCount": 2.0,
  "NextPage": "http://webapihelppage3.com",
  "PreviousPage": "http://webapihelppage4.com",
  "Breaches": {
    "None": [
      "sample string 1",
      "sample string 2"
    ]
  }
}

application/xml,text/xml

Sample:
<SampleResponseMessage xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/labPortal.Api.Export">
  <Breaches xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfCellColourArrayOfstring8TOjTIaw>
      <d2p1:Key>None</d2p1:Key>
      <d2p1:Value>
        <d2p1:string>sample string 1</d2p1:string>
        <d2p1:string>sample string 2</d2p1:string>
      </d2p1:Value>
    </d2p1:KeyValueOfCellColourArrayOfstring8TOjTIaw>
  </Breaches>
  <Grid i:nil="true" />
  <NextPage>http://webapihelppage3.com/</NextPage>
  <PreviousPage>http://webapihelppage4.com/</PreviousPage>
  <SampleCount>2</SampleCount>
  <Samples>
    <SampleMessage>
      <Attachment>true</Attachment>
      <Comments>
        <CommentMessage>
          <Author>sample string 1</Author>
          <Text>sample string 2</Text>
        </CommentMessage>
        <CommentMessage>
          <Author>sample string 1</Author>
          <Text>sample string 2</Text>
        </CommentMessage>
      </Comments>
      <Id>2</Id>
      <LimsId>sample string 3</LimsId>
      <Properties xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringanyType>
          <d4p1:Key>sample string 1</d4p1:Key>
          <d4p1:Value />
        </d4p1:KeyValueOfstringanyType>
        <d4p1:KeyValueOfstringanyType>
          <d4p1:Key>sample string 3</d4p1:Key>
          <d4p1:Value />
        </d4p1:KeyValueOfstringanyType>
      </Properties>
      <Results>
        <ResultMessage>
          <Det>sample string 3</Det>
          <LongName>sample string 7</LongName>
          <ShortName>sample string 6</ShortName>
          <Suite>sample string 4</Suite>
          <Text>sample string 1</Text>
          <Unit>sample string 5</Unit>
          <Val />
        </ResultMessage>
        <ResultMessage>
          <Det>sample string 3</Det>
          <LongName>sample string 7</LongName>
          <ShortName>sample string 6</ShortName>
          <Suite>sample string 4</Suite>
          <Text>sample string 1</Text>
          <Unit>sample string 5</Unit>
          <Val />
        </ResultMessage>
      </Results>
      <Status>sample string 1</Status>
    </SampleMessage>
    <SampleMessage>
      <Attachment>true</Attachment>
      <Comments>
        <CommentMessage>
          <Author>sample string 1</Author>
          <Text>sample string 2</Text>
        </CommentMessage>
        <CommentMessage>
          <Author>sample string 1</Author>
          <Text>sample string 2</Text>
        </CommentMessage>
      </Comments>
      <Id>2</Id>
      <LimsId>sample string 3</LimsId>
      <Properties xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringanyType>
          <d4p1:Key>sample string 1</d4p1:Key>
          <d4p1:Value />
        </d4p1:KeyValueOfstringanyType>
        <d4p1:KeyValueOfstringanyType>
          <d4p1:Key>sample string 3</d4p1:Key>
          <d4p1:Value />
        </d4p1:KeyValueOfstringanyType>
      </Properties>
      <Results>
        <ResultMessage>
          <Det>sample string 3</Det>
          <LongName>sample string 7</LongName>
          <ShortName>sample string 6</ShortName>
          <Suite>sample string 4</Suite>
          <Text>sample string 1</Text>
          <Unit>sample string 5</Unit>
          <Val />
        </ResultMessage>
        <ResultMessage>
          <Det>sample string 3</Det>
          <LongName>sample string 7</LongName>
          <ShortName>sample string 6</ShortName>
          <Suite>sample string 4</Suite>
          <Text>sample string 1</Text>
          <Unit>sample string 5</Unit>
          <Val />
        </ResultMessage>
      </Results>
      <Status>sample string 1</Status>
    </SampleMessage>
  </Samples>
  <TotalPages>1</TotalPages>
</SampleResponseMessage>