GET api/Entity?entityName={entityName}&attribute={attribute}&viewId={viewId}&queryText={queryText}&page={page}&size={size}

Returns the a collection of entities defined by the specified entityName, attribute, view id and queryText.
The results of the search are returned as option set values where the 200/OK - match found and the list of option set records is in the body of the response.
404/Account Not Found - no match found for the specified account id.
404/Business Category Not Found - no market served found for the specified account.
500/Internal Server - unexpected server error, details in the body of the response.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
entityName

The name of the entity in CRM

System.String

Required

attribute

the field name in CRM

System.String

Required

viewId

The view id that defines the records to search

System.String

Required

queryText

The text used to search the default property of the entity.

System.String

Required

page

The page number to retrieve results from.

System.Int32

Required

size

The size of the page.

System.Int32

Required

Body Parameters

None.

Response Information

Resource Description

Altai.Core.Services.Entities+EntityLookupResults
NameDescriptionTypeAdditional information
TotalRecords

System.Int32

None.

Results

System.Collections.Generic.List`1[Altai.Core.Services.Entities+EntityLookup]

None.

Response Formats

application/json, text/json

Sample:
{
  "TotalRecords": 1,
  "Results": [
    {
      "Id": "sample string 1",
      "Name": "sample string 2"
    },
    {
      "Id": "sample string 1",
      "Name": "sample string 2"
    }
  ]
}

application/xml, text/xml

Sample:
<Entities.EntityLookupResults xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Altai.Core.Services">
  <Results>
    <Entities.EntityLookup>
      <Id>sample string 1</Id>
      <Name>sample string 2</Name>
    </Entities.EntityLookup>
    <Entities.EntityLookup>
      <Id>sample string 1</Id>
      <Name>sample string 2</Name>
    </Entities.EntityLookup>
  </Results>
  <TotalRecords>1</TotalRecords>
</Entities.EntityLookupResults>