Get Rows

Retrieve a 0 or more rows from a business object. This can either return all rows, or rows that match a specified filter.

HTTP Request

GET /icweb.dll/bo/{tableName}/

URI Parameters

Name

In

Required

Type

Description

Default

tableName

Path

Yes

String

Table Name of the business object

startRow

Query

No

Integer

Starting row to be returned, when using paged datasets this sets the first row returned.

0

pageSize

Query

No

Integer

The number of rows in each page. Determines the maximum number of rows to return in the requests, starting at startRow.

100

pageWithKey

Query

No

Integer

Returns the page of data, that contains the specified key value in pageWithKey.

stamp

Query

No

String

Specifies the existing result set to return more rows from. This must come from a prior request.

Request Headers

Name

Required

Type

Description

X-NEXUS-Filter

No

BusinessObjectFilters

Filter that should be used to select rows. If this is not specified, then all rows are returned.

X-NEXUS-Sort

No

BusinessObjectSort []

List of fields and direction to sort the resulting dataset.

Responses

Name

Type

Description

200 OK

TableData

OK

BusinessObjectFilters

Specifies the filter that should be used to return rows.

Name

Type

Description

Optional

Default

operator

string

Specifies the type of operator used to join filters together. There are two possible values:

  • and

  • or

Yes

and

where

BusinessObjectFilter

List of filters to be used

Yes

nested

BusinessObjectFilters

Nested list of filters to be used

Yes

distinct

boolean

Specifies that only distinct rows should be returned.

Yes

False

BusinessObjectFilter

Specifies a single filter.

Name

Type

Description

Optional

Default

field

string

Name of the field to apply a filter on.

No

method

string

Filter method:

  • eq Equals

  • lt Less Than

  • gt Greater Than

  • le Less than or Equal

  • ge Greater than or Equal

  • like Like (Use % characters as wildcard matching)

  • in In (Use items)

  • pa Parents Of

  • ch Children Of

Yes

eq

value

string

String representation of the filter value. (Ignored when the method is in)

Yes

null

items

Integer[]

List of values to be used when method is in.

Yes

null

not

boolean

Inverts the method, ie eq becomes not eq, in becomes not in

Yes

False

BusinessObjectSort

Specifies a sort, defines a field and direction to sort by.

Name

Type

Description

Optional

Default

field

string

Name of the field to sort on

No

ascending

boolean

Specifies the order to sort, when true sort is in ascending order, when false descending order.

Yes

True

Example (Lookup_Item)

Return Lookup Items for Lookup List with LL_ID of 4. Page Size is set to 5, so the first response only returns 5 rows.

Request

GET /icweb.dll/bo/Lookup_Item/?pageSize=5

Request Header

X-NEXUS-Filter: {"where":[{"field": "LL_ID", "value": "4"}]}

Response

{
        "pageSize": 5,
        "startRow": 0,
        "totalRows": 12,
        "rows": [{
                "Guid": "{A348BB1B-4DD4-494A-8A26-51746F2BE1A8}",
                "LL_ID": 4,
                "LI_ID": 506,
                "Value": "0",
                "Comments": "Item 0",
                "Item_Order": 0
        }, {
                "Guid": "{049D6A48-DFFF-4C37-8C91-5EF4C4C26BDA}",
                "LL_ID": 4,
                "LI_ID": 507,
                "Value": "1",
                "Comments": "Item 1",
                "Item_Order": 1
        }, {
                "Guid": "{01AB1DDC-5909-434A-A441-CFB592FC2960}",
                "LL_ID": 4,
                "LI_ID": 508,
                "Value": "2",
                "Comments": "Item 2",
                "Item_Order": 2
        }, {
                "Guid": "{8975DF1F-C06B-4B43-ADA1-5E549F846B3E}",
                "LL_ID": 4,
                "LI_ID": 509,
                "Value": "3",
                "Comments": "Item 3",
                "Item_Order": 3
        }, {
                "Guid": "{D601759D-C2D5-4DBD-856A-EC2063138443}",
                "LL_ID": 4,
                "LI_ID": 510,
                "Value": "4",
                "Comments": "Item 4",
                "Item_Order": 4
        }],
        "key": 67
}

Example (Lookup_Item)

Return Lookup Items for Lookup List with LL_ID of 4 and (Item_Order < 5 OR Item_Order > 10). Page Size is set to 5, so the first response only returns 5 rows.

Request

GET /icweb.dll/bo/Lookup_Item/?pageSize=10

Request Headers

X-NEXUS-Filter: {"where": [{"field": "LL_ID","value": "4"}],"nested": [{"operator": "or","where": [{"field": "Item_Order","method": "lt","value": "5"}, {"field": "Item_Order","method": "gt","value": "10"}]}]}
X-NEXUS-Sort: [{"field": "LL_ID", "ascending": false}]

Response

{
        "pageSize": 10,
        "startRow": 0,
        "totalRows": 12,
        "rows": [{
                "Guid": "{DE2042D6-D988-43B2-9097-3BE8130DE9A7}",
                "LL_ID": 4,
                "LI_ID": 506,
                "Value": "0",
                "Comments": "Item 0",
                "Item_Order": 0
        }, {
                "Guid": "{13C2D078-B8E7-4A77-BF2C-15EF131618DB}",
                "LL_ID": 4,
                "LI_ID": 507,
                "Value": "1",
                "Comments": "Item 1",
                "Item_Order": 1
        }, {
                "Guid": "{4BD34909-E95A-413C-BD43-6936BF1D5728}",
                "LL_ID": 4,
                "LI_ID": 508,
                "Value": "2",
                "Comments": "Item 2",
                "Item_Order": 2
        }, {
                "Guid": "{918A854C-718C-4AA1-AC98-4C781F4985B9}",
                "LL_ID": 4,
                "LI_ID": 509,
                "Value": "3",
                "Comments": "Item 3",
                "Item_Order": 3
        }, {
                "Guid": "{B3234C2F-3C0C-46CD-B125-715DDC686786}",
                "LL_ID": 4,
                "LI_ID": 510,
                "Value": "4",
                "Comments": "Item 4",
                "Item_Order": 4
        }, {
                "Guid": "{EEE0268D-B3F3-45F7-B8CE-A88989C9A1BB}",
                "LL_ID": 4,
                "LI_ID": 517,
                "Value": "11",
                "Comments": "Item 11",
                "Item_Order": 11
        }, {
                "Guid": "{080A5FC0-DF25-44DE-896F-25EB95B28E74}",
                "LL_ID": 4,
                "LI_ID": 518,
                "Value": "12",
                "Comments": "Item 12",
                "Item_Order": 12
        }, {
                "Guid": "{ABFDFC1C-8C31-4DC7-A0AE-0A3174A0C30F}",
                "LL_ID": 4,
                "LI_ID": 519,
                "Value": "13",
                "Comments": "Item 13",
                "Item_Order": 13
        }, {
                "Guid": "{4758598E-5008-4008-A4A6-0EB4697D98C9}",
                "LL_ID": 4,
                "LI_ID": 520,
                "Value": "14",
                "Comments": "Item 14",
                "Item_Order": 14
        }, {
                "Guid": "{7010FCB9-E0DC-409B-8C4F-2A6B81769852}",
                "LL_ID": 4,
                "LI_ID": 521,
                "Value": "15",
                "Comments": "Item 15",
                "Item_Order": 15
        }],
        "key": 67
}

Example (complex expression)

For following filter:

((Field_A = Column_A AND Column_B = Value_B) OR (Column_C = Value_C AND Column_D = Value_D))

the syntax is:

{
  "operator": "or",
  "nested": [
        {
          "operator": "and",
          "where": [
                {
                  "field": "Column_A",
                  "value": "Value_A"
                },
                {
                  "field": "Column_B",
                  "value": "Value_B"
                }
          ]
        },
        {
          "operator": "and",
          "where": [
                {
                  "field": "Column_C",
                  "value": "Value_C"
                },
                {
                  "field": "Column_D",
                  "value": "Value_D"
                }
          ]
        }
  ]
}

The above expression has been unpacked onto multiple lines and indented for easy reading; you will of course need to deliver the expression in a single X-NEXUS-Filter.