ReferenceSheetLine

ReferenceSheetLine

ReferenceSheetLines are records of a custom defined table structure through configuration. These are details of ReferenceSheet, that references the configuration that the lines adhere to. The configuration is stored using FlexCodeSystem and FlexCodeFieldUsages. ReferenceSheetLines are records based on the FlexCodeSystem configuration.

The HTTP API resource for ReferenceSheetLines has some special features and restrictions that are explained in the sections below.

The URL where referencesheetlines can be accessed is

POST http://[hostName]:[portNumber]/[api-context-root]/generic/referencesheetlines/[reference-sheet-resource-name]

If the resource name is unknown, the response is Not Found (404)

GET

Works as normal api. Get on the above url will return all reference sheet lines for that configured reference sheet resource name. A sample reply will look like below. The resource name of the reference sheet is 'setups', and fields like 'Character', 'NumberField', 'DateField' and 'FlexField' are configured fields.

{
   "offset" : 0,
   "count" : 2,
   "hasMore" : false,
   "limit" : 50,
   "items" : [ {
      "lastUpdatedBy" : 142,
      "objectVersionNumber" : 1,
      "createdBy" : 142,
      "id" : 13281,
      "uuid" : "ed7e14bd-9a65-4a30-819e-4910bff9985b",
      "startDate" : "2017-05-01",
      "links" : [ {
         "href" : "http://[hostName]:[portNumber]/[api-context-root]/generic/referencesheetlines/setups/13281",
         "rel" : "self"
      } ],
      "lastUpdatedDate" : {
         "value" : "2017-05-16T15:59:17.746+02:00"
      },
      "referenceSheet" : {
         "links" : [ {
            "href" : "http://[hostName]:[portNumber]/[api-context-root]/generic/referencesheets/13691",
            "rel" : "canonical"
         } ]
      },
      "Character" : "ABC",
      "NumberField" : 12,
      "DateField" : "2017-05-01",
      "FlexField" : {
          "code"    : "flexValue1",
          "flexCodeDefinitionCode: : "SIMPLE_FLEX"
       },
      "creationDate" : {
         "value" : "2017-05-16T15:59:17.746+02:00"
      }
   }, {
      "lastUpdatedBy" : 10,
      "objectVersionNumber" : 1,
      "createdBy" : 10,
      "id" : 13311,
      "uuid" : "d8668de6-2d03-40ad-9eb7-8b68324b9f89",
      "startDate" : "2009-01-01",
      "links" : [ {
         "href" : "http://[hostName]:[portNumber]/[api-context-root]/generic/referencesheetlines/setups/13311",
         "rel" : "self"
      } ],
      "lastUpdatedDate" : {
         "value" : "2017-05-16T16:56:42.897+02:00"
      },
      "referenceSheet" : {
         "links" : [ {
            "href" : "http://[hostName]:[portNumber]/[api-context-root]/generic/referenceSheets/13691",
            "rel" : "canonical"
         } ]
      },
      "Character" : "DEF",
      "NumberField" : 13,
      "DateField" : "2018-05-01",
      "FlexField" : {
          "code"    : "flexValue2",
          "flexCodeDefinitionCode: : "SIMPLE_FLEX"
       }
      "creationDate" : {
         "value" : "2017-05-16T16:56:42.897+02:00"
      }
   } ],
   "links" : [ {
      "rel" : "self",
      "href" : "http://[hostName]:[portNumber]/[api-context-root]generic/referencesheetlines/setups
   } ]
}

QUERY API

Query API on reference sheet lines works as normal. The dynamic attributes have to be accessed through the usage name of the reference sheet and not directly. Taking the same example as above, if the usage name is setup, the query api syntax to search on NumberField will look something like

POST http://[hostName]:[portNumber]/[api-context-root]/generic/referencesheetlines/setups/search
{
  "resource": {
    "q": "setup.NumberField.eq(123)"
  }
}

The usage name join is used to identify that the property that is searched on is a configured property. For direct attributes, like startDate, usage name is not needed.

POST http://[hostName]:[portNumber]/[api-context-root]/generic/referencesheetlines/setups/search

{
  "resource": {
    "q": "setup.NumberField.eq(123).and.startDate.eq('2019-01-01')"
  }
}

When querying reference sheet lines, comparison behavior depends on the parsed input value. If the input value is parsed as a date, the existing values in the corresponding reference sheet line column is treated as a date for comparison, regardless of the column’s defined data type. For other input values, such as numbers and characters, comparison uses the defined data type of the corresponding reference sheet line column.

For example,

POST http://[hostName]:[portNumber]/[api-context-root]/generic/referencesheetlines/setups/search

{
  "resource": {
    "q": "setup.DateField.gte('2025-01-01')"
  }
}

This query compares DateField by using a date-formatted input value.

POST http://[hostName]:[portNumber]/[api-context-root]/generic/referencesheetlines/setups/search

{
  "resource": {
    "q": "setup.Character.gte('2025-01-01')"
  }
}

If the input value is parsed as a date, the value stored in Character is treated as a date for comparison, even when Character is defined as a character/string field.

POST http://[hostName]:[portNumber]/[api-context-root]/generic/referencesheetlines/setups/search

{
  "resource": {
    "q": "setup.NumberField.gte(123)"
  }
}

For numeric input values, comparison uses the defined data type of NumberField.

Like searches on flexcode-based columns do not support escape sequences.

POST/PUT/PATCH

Insert/Update/Patch on referencesheetlines works as with other resources.

Sample payload for insert:

{
      "startDate" : "2009-01-01",
      "Character" : "DEF",
      "NumberField" : 13,
      "DateField" : "2018-05-01",
      "FlexField" : {
          "code"    : "flexValue1",
          "flexCodeDefinitionCode: : "SIMPLE_FLEX"
       }
}

DELETE

Delete works as with other resources.

Generic Features for Payload Representations:

Direct fields cannot be restricted. Sample reply with fields=referencesheet.id is:

{
   "offset" : 0,
   "count" : 2,
   "hasMore" : false,
   "limit" : 50,
   "items" : [ {
      "lastUpdatedBy" : 142,
      "objectVersionNumber" : 1,
      "createdBy" : 142,
      "id" : 13281,
      "uuid" : "ed7e14bd-9a65-4a30-819e-4910bff9985b",
      "startDate" : "2017-05-01",
      "links" : [ {
         "href" : "http://[hostName]:[portNumber]/[api-context-root]/generic/referencesheetlines/setups/13281",
         "rel" : "self"
      } ],
      "lastUpdatedDate" : {
         "value" : "2017-05-16T15:59:17.746+02:00"
      },
      "referenceSheet" : {
         "id" : 13691,
         "links" : [ {
            "href" : "http://[hostName]:[portNumber]/[api-context-root]/generic/referencesheets/13691",
            "rel" : "canonical"
         } ]
      },
      "Character" : "ABC",
      "NumberField" : 12,
      "DateField" : "2017-05-01",
      "FlexField" : {
          "code"    : "flexValue1",
          "flexCodeDefinitionCode: : "SIMPLE_FLEX"
       }
      "creationDate" : {
         "value" : "2017-05-16T15:59:17.746+02:00"
      }
   }, {
      "lastUpdatedBy" : 10,
      "objectVersionNumber" : 1,
      "createdBy" : 10,
      "id" : 13311,
      "uuid" : "d8668de6-2d03-40ad-9eb7-8b68324b9f89",
      "startDate" : "2009-01-01",
      "links" : [ {
         "href" : "http://[hostName]:[portNumber]/[api-context-root]/generic/referencesheetlines/setups/13311",
         "rel" : "self"
      } ],
      "lastUpdatedDate" : {
         "value" : "2017-05-16T16:56:42.897+02:00"
      },
      "referenceSheet" : {
         "id" : 13691,
         "links" : [ {
            "href" : "http://[hostName]:[portNumber]/[api-context-root]/generic/referencesheets/13691",
            "rel" : "canonical"
         } ]
      },
      "Character" : "DEF",
      "NumberField" : 13,
      "DateField" : "2018-05-01",
      "FlexField" : {
          "code"    : "flexValue2",
          "flexCodeDefinitionCode: : "SIMPLE_FLEX"
       }
      "creationDate" : {
         "value" : "2017-05-16T16:56:42.897+02:00"
      }
   } ],
   "links" : [ {
      "rel" : "self",
      "href" : "http://[hostName]:[portNumber]/[api-context-root]/generic/referencesheetlines/setups"
   } ]
}

METADATA

Metadata for referencesheetlines/{resource_name} resource will contain information about all the native fields and all the configured fields on the related reference sheet with that resource name.