Skip to the content.
Inputs
Parsers
Indexes
Services
Outputs

Configuration - Outputs

outputs

Type: Array of Object.Each item in this array must match one of the following definitions.

An output defines the output format of the data, how to search for it, and any relationship between it.

Example:

outputs:
  - name: venuesList
    type: jsonArray
    input: venues
    parameters:
      city:
        property: city
        index: venueAddress
        parser: string
  - name: venue
    type: jsonObject
    input: venues
    parameters:
      id:
        property: id
        index: venueIds
        parser: integer

JSON Object

outputs[type = “jsonObject”]

Type: Object

This output produces a JSON document whose root is an object containing all the properties fetched from the input. The object is found in the input by filtering the specified parameters. Objects from any input can also be embedded as a relationship.

Examples:

name: venue
type: jsonObject
input: venues
parameters:
  id:
    property: id
    index: venueIds
    parser: integer
name: singleUserById
type: jsonObject
input: users
parameters:
  id:
    property: id
    index: userIds
    parser: integer
relationships:
  role:
    input: roles
    match:
      - parentProperty: roleId
        childProperty: id
        childIndex: roleIds
    sort:
      - property: id
        ascending: true

Properties:

name

outputs[type = “jsonObject”].name

Type: String

The name of this output, which any other component will use to refer to it.

type

outputs[type = “jsonObject”].type

Must have the value: "jsonObject"

input

outputs[type = “jsonObject”].input

Type: String

The name of the input from which the data will be fetched.

parameters

outputs[type = “jsonObject”].parameters

Type: Object

relationships (optional)

outputs[type = “jsonObject”].relationships

Type: Object

JSON Array

outputs[type = “jsonArray”]

Type: Object

This output produces a JSON array whose items are objects fetched from the input. The objects are found in the input by filtering the specified parameters. Objects from any input can also be embedded as a relationship. There is an always-enabled and configurable paging to this array.

Examples:

name: venuesList
type: jsonArray
input: venues
parameters:
  city:
    property: city
    index: venueAddress
    parser: string
name: userList
type: jsonArray
input: users
parameters:
  name:
    property: name
    index: userInfo
    parser: string
limit:
  default: 10
  max: 100
  parameter: "pageLimit"
offset:
  parameter: "pageOffset"
relationships:
  role:
    input: roles
    match:
      - parentProperty: roleId
        childProperty: id
        childIndex: roleIds
    sort:
      - property: id
        ascending: true

Properties:

name

outputs[type = “jsonArray”].name

Type: String

The name of this output, which any other component will use to refer to it.

type

outputs[type = “jsonArray”].type

Must have the value: "jsonObject"

input

outputs[type = “jsonArray”].input

Type: String

The name of the input from which the data will be fetched.

limit (optional)

outputs[type = “jsonArray”].limit

Type: Object

Configuration of the paging limit.

Properties:

default (optional)

outputs[type = “jsonArray”].limit.default

Type: Integer

Default value: 100

The default number of items per page

max (optional)

outputs[type = “jsonArray”].limit.max

Type: Integer

Default value: 1000

The maximum allowed number of items per page

parameter (optional)

outputs[type = “jsonArray”].limit.parameter

Type: String

Default value: "limit"

The name of the parameter used to define the page size.

offset (optional)

outputs[type = “jsonArray”].offset

Type: Object

Configuration of the paging offset.

Properties:

parameter (optional)

outputs[type = “jsonArray”].offset.parameter

Type: String

Default value: "offset"

The name of the parameter used to define the paging offset.

parameters

outputs[type = “jsonArray”].parameters

Type: Object

relationships (optional)

outputs[type = “jsonArray”].relationships

Type: Object