Filters - Get meta-schema for filter

API Url

GET
http://localhost:16010/ProMarkREST/rest/General/filter_schema/{type}

Permissions: user

Query parameters

FieldTypeDescription
conditionoptionalString

Limit to a set of conditions (1=Equals, 2=Does not equal, 3=Begins with, 4=Ends with, 5=Contains, 6=Contains data, 7=Does not contain data).

Path parameters

FieldTypeDescription
typeNumber

Filter type (1=Employee, 2=Reason, 3=Account, 4=ProJect, 5=Order/Operation, 6=Workcenter, 7=Terminal).

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    conditionsObject[]

Field conditions that can be selected.

      descriptionString

Condition description (localized).

      idString

Condition identifier (1=Equals, 2=Does not equal, 3=Begins with, 4=Ends with, 5=Contains, 6=Contains data, 7=Does not contain data).

      inputNumber

Supported input box type (0=No input box, 1=Input box with lookup, 2=Basic input box).

    descriptionString

Filter description (localized).

    fieldsObject[]

Filter fields that can be selected.

      conditionsoptionalObject[]

Field conditions that can be selected. If not supplied, then fallback to master conditions.

        descriptionString

Condition description (localized).

        idString

Condition identifier.

        inputNumber

Supported input box type (0=No input box, 1=Input box with lookup, 2=Basic input box).

      descriptionString

Field description (localized).

      idString

Field identifier.

      parentIdString

Parent field identifier. Used for cascading values.

      tableString

Table name. Used for lookup of possible values.

    filterTypeNumber

Filter type (1=Employee, 2=Reason, 3=Account, 4=ProJect, 5=Order/Operation, 6=Workcenter, 7=Terminal).

    optionsObject[]

Filter options that can be selected.

      defaultString

Default value.

      descriptionString

Option description (localized).

      idString

Option identifier.

      valuesObject[]

Option values that can be selected.

        descriptionString

Option value description (localized).

        idString

Option value identifier.

    previewObject

Data needed for filter preview.

      schemaObject[]

Column schema for filter preview.

        idString

Field mapped to the column.

        orderNumber

Column order from left to right.

        titleString

Column header (localized).

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

HTTP/1.1 200 OK
{
"response": {
"data": {
"filterType": 2,
"description": "Absence reason",
"fields": [
{
"id": "1",
"description": "Reason group",
"table": "absreasongrp",
"parentId": "",
"conditions": [
{
"id": "1",
"description": "Equals",
"input": 1
}
},
{
"id": "2",
"description": "Reason",
"table": "absreason",
"parentId": "1"
}
],
"options": [
{
"id": "1",
"description": "Include",
"default": "1",
"values": [
{
"id": "0",
"description": "All"
},
{
"id": "1",
"description": "Only active"
}
]
}
],
"conditions": [
{
"id": "1",
"description": "Equals",
"input": 1
},
{
"id": "2",
"description": "Does not equal",
"input": 1
},
{
"id": "5",
"description": "Contains",
"input": 2
},
{
"id": "6",
"description": "Contains data",
"input": 0
}
],
"preview": {
"schema": [
{
"id": "reasonCode",
"title": "Reason code",
"order": 10
},
{
"id": "reasonDesc",
"title": "Reason description",
"order": 20
}
]
}
},
"errorCode": 0,
"errorMessage": ""
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.