Skip to end of metadata
Go to start of metadata
Icon

The examples and configuration information in this topic use a model named simpleuser with the default endpoints generated.

The API Orchestration user interface is accessed from the APIs List page on the API Builder Console by selecting a Flow icon or a Create Flow icon for a generated or imported endpoint depending upon the current endpoint status. The API Orchestration user interface is divided into the following panels: 

  • Node list (left side of the API Orchestration user interface) - Provides a graphical listing of the Model and Core nodes. The default Core nodes types are: Custom, Codeblock, Compose, Condition, Delay, HTTP, JSON, and Set Context. A model node is displayed for each configured model and an endpoint node is displayed for each imported endpoint.
  • Flow editor (center of the API Orchestration user interface) - Provides a graphical space to view, edit, and create flows.
  • Node configuration (right side of the API Orchestration user interface) - Provides the functionality to configure the Name, Method, Parameters, and Outputs of nodes.

This topic is divided into the following sections:

Model node

The Model node methods, parameters, and outputs are described in the following sections.

Methods

The method selections for a Model node are:

  • count - Gets a count of records.
  • create - Creates a new model object.
  • delete - Deletes the model object.
  • deleteAll - Deletes all the model objects.
  • distinct - Finds unique values using the provided field.
  • findAll - Finds all model instances.
  • findAndModify - Finds one model instance and modifies it.
  • findByID - Finds model instance by ID.
  • query - Queries for particular model records.
  • update - Updates a model instance.
  • upsert - Creates a model record if not found, or updates the model record if found.

Parameters

The Model node parameters are described in the following sections.

count parameters

The count method parameters are:

ParameterTypeDefaultDescriptionConfiguration selection
limitinteger10The number of records to fetch.Selector, Number
orderobject-A dictionary of key-value pairs describing the field(s) for sorting. The field name is the key and the value is set to either -1 for ascending order or 1 for descending order.Selector, Object
pageinteger1Starting page number.Selector, Number
per_pageinteger10Results per page.Selector, Number
selobject-A dictionary of key-value pairs describing which fields to include in the query results. The field name is the key and the value is set to 1.Selector, Object
skipinteger-The number of records to skip.Selector, Number
unselobject-A dictionary of key-value pairs describing which fields to exclude from the query results. The field name is the key and the value is set to 1.Selector, Object
wherestring-JSON-encoded object specifying field constraints. The field name is the key and the value is the constraint statement or value.Selector, String

All parameters can be enabled or disabled.

create parameters

The create method parameter is:

ParameterTypeConfiguration selection
dataobjectSelector, Object

delete parameters

The delete method parameter is:

ParameterTypeConfiguration selection
idanySelector, String, Number, Boolean, Object, Array, Null

deleteAll parameters

There are no configurable deleteAll method parameters.

distinct parameters

The distinct method parameters are:

ParameterTypeDefaultDescriptionConfiguration selection
fieldstring-The field must be distinct.Selector, String
limitinteger10The number of records to fetch.Selector, Number
orderobject-A dictionary of key-value pairs describing the field(s) for sorting. The field name is the key and the value is set to either -1 for ascending order or 1 for descending order.Selector, Object
pagenumber1Starting page number.Selector, Number
per_pageinteger10Results per page.Selector, Number
selobject-A dictionary of key-value pairs describing which fields to include in the query results. The field name is the key and the value is set to 1.Selector, Object
skipinteger-The number of records to skip.Selector, Number
unselobject-A dictionary of key-value pairs describing which fields to exclude from the query results. The field name is the key and the value is set to 1.Selector, Object
wherestring-JSON-encoded object specifying field constraints. The field name is the key and the value is the constraint statement or value.Selector, String

The limit, order, page, per_page, sel, skip, unsel, and where parameters can be enabled or disabled.

findAll parameters

There are no configurable findAll method parameters.

findAndModify parameters

The findAndModify method parameters are:

ParameterTypeDefaultDescriptionConfiguration selection
dataobject--Selector, Object
argsobject-Optional parameters.Selector, Object
limitinteger10The number of records to fetch.Selector, Number
orderobject-A dictionary of key-value pairs describing the field(s) for sorting. The field name is the key and the value is set to either -1 for ascending order or 1 for descending order.Selector, Object
pageinteger1Starting page number.Selector, Number
per_pageinteger10Results per page.Selector, Number
selobject-A dictionary of key-value pairs describing which fields to include in the query results. The field name is the key and the value is set to 1.Selector, Object
skipinteger-The number of records to skip.Selector, Number
unselobject-A dictionary of key-value pairs describing which fields to exclude from the query results. The field name is the key and the value is set to 1.Selector, Object
wherestring-JSON-encoded object specifying field constraints. The field name is the key and the value is the constraint statement or value.Selector, String

The args, limit, order, page, per_page, sel, skip, unsel, and where parameters can be enabled or disabled.

findByID parameters

The findByID method parameter is:

ParameterTypeDefaultDescriptionJSONPathConfiguration selections
idany--$.params.idSelector, String, Number, Boolean, Object, Array, Null

query parameters

The query method parameters are:

ParameterTypeDefaultDescriptionConfiguration selection
limitinteger10The number of records to fetch.Selector, Number
orderobject-A dictionary of key-value pairs describing the field(s) for sorting. The field name is the key and the value is set to either -1 for ascending order or 1 for descending order.Selector, Object
pageinteger-Starting page number.Selector, Number
per_pageinteger10Results per page.Selector, Number
selobject-A dictionary of key-value pairs describing which fields to include in the query results. The field name is the key and the value is set to 1.Selector, Object
skipinteger-The number of records to skip.Selector, Number
unselobject-A dictionary of key-value pairs describing which fields to exclude from the query results. The field name is the key and the value is set to 1.Selector, Object
wherestring-JSON-encoded object specifying field constraints. The field name is the key and the value is the constraint statement or value.Selector, String

All parameters can be enabled or disabled.

update parameters

The update method parameters are:

ParameterTypeDescriptionConfiguration selection
dataobjectDependent on configured model fields.Selector, Object
idany-Selector, String, Number, Boolean, Object, Array, Null

upsert parameters

The upsert method parameter is:

ParameterTypeConfiguration selections
dataobjectSelector, Object

Outputs

The Model node outputs are described in the following sections.

count outputs

The count method output is:

OutputTypeDescriptionSave output value as:
nextnumberSuccessfully counted records of simpleuser.$.count

create outputs

The create method output is:

OutputTypeDescriptionSave output value as:
nextobjectSuccessfully created a simpleuser.$.model

delete outputs

The delete method outputs are:

OutputTypeDescriptionSave output value as:
nextobjectSuccessfully deleted the simpleuser.$.delete
notfoundanyNo model instance found.-

deleteAll outputs

The deleteAll method output is:

OutputTypeDescriptionSave output value as:
nextarraySuccessfully deleted all the simpleusers.-

distinct outputs

The distinct method output is:

OutputTypeDescriptionSave output value as:
nextarraySuccessfully found all unique values of simpleuser.$.models

findAll outputs

The findAll method output is:

OutputsTypeDescriptionSave output value as:
nextarraySuccessfully found all simpleusers.$.models

findAndModify outputs

The findAndModity method outputs are:

OutputTypeDescriptionSave output value as:
nextobjectSuccessfully found and modified simpleuser.$.model
notfoundanyNo matching model found.-

findByID outputs

The findByID method outputs are:

OutputTypeDescriptionSave output value as:
nextobjectSuccessfully found instance of simpleuser by ID.$.model
notfoundanyNo model instance found.-

query outputs

The query method output is:

OutputTypeDescriptionSave output value as:
nextarraySuccessfully queried the simpleuser.$.models

update outputs

The update method outputs are:

OutputTypeDescriptionSave output value as:
nextobjectSuccessfully updated the simpleuser.$.model
notfoundanyNo model instance found.-

upsert outputs

The upsert method outputs are:

OutputTypeDescriptionSave output value as:
updateobjectSuccessfully updated the model.$.model
insertobjectSuccessfully inserted the model.$.model

Codeblock node

The Codeblock node methods, parameters, and outputs for the Greet Codeblock node are described in the following sections. Each method in a Codeblock node corresponds to a single codeblock. The Greet Codeblock node is created when a new application is created, but it can be deleted.

Methods

The default method for the Greet Codeblock node is:

  • Greet - Some codeblock to run with the greet flow.

Parameter

The Greet method parameter is:

ParameterTypeConfiguration selection
username
stringSelector, String

Outputs

The Greet method outputs are:

OutputTypeDescriptionSave output value as:
next
stringThe codeblock completed.
$.greeting
error
objectThe codeblock failed to complete.
$.error

Condition node

The Condition node methods, parameters, and outputs are described in the following sections.

Methods

The default methods for a Condition node are:

  • equals - Tests is a value is equal.
  • exists - Tests does a value exists, true or false.
  • greater-than - Tests is a value is greater than another value.
  • greater-than-equal - Tests is a value is greater than or equal to another value.
  • less-than - Tests is a value is less than another value.
  • less-than-equal - Tests is a value is less than or equal to another value.

Parameters

The Condition parameters are described in the following sections.

equals parameters

The equals method parameters are:

ParameterTypeMinimum lengthDescriptionConfiguration selection
sourceany1The input to test.Selector, String, Number, Boolean, Object, Array, Null
valueany1The value to test input against.Selector, String, Number, Boolean, Object, Array, Null

exists parameters

The exists method parameter is:

ParameterTypeMinimum lengthDescriptionConfiguration selection
sourceany-The input to test.Selector, String, Number, Boolean, Object, Array, Null

greater-than parameters

The greater-than method parameters are:

ParameterTypeMinimum lengthDescriptionConfiguration selection
sourceany1The input to test.Selector, String, Number, Boolean, Object, Array, Null
valueany1The value to test input against.Selector, String, Number, Boolean, Object, Array, Null

greater-than-equal parameters

The greater-than-equal method parameters are:

ParameterTypeMinimum lengthDescriptionConfiguration selection
sourceany1The input to test.Selector, String, Number, Boolean, Object, Array, Null
valueany1The value to test input against.Selector, String, Number, Boolean, Object, Array, Null

less-than parameters

The less-than method parameters are:

ParameterTypeMinimum lengthDescriptionConfiguration selection
sourceany1The input to test.Selector, String, Number, Boolean, Object, Array, Null
valueany1The value to test input against.Selector, String, Number, Boolean, Object, Array, Null

less-than-equal parameters

The less-than-equal method parameters are:

ParameterTypeMinimum lengthDescriptionConfiguration selection
sourceany1The input to test.Selector, String, Number, Boolean, Object, Array, Null
valueany1The value to test input against.Selector, String, Number, Boolean, Object, Array, Null

Outputs

The Condition node outputs are described in the following sections.

equals outputs

The equals method outputs are:

OutputTypeDescriptionSave output value as:
truebooleanThe condition tested true.$.equals
falsebooleanThe condition tested false.$.equals

exists outputs

The exists method outputs are:

OutputTypeDescriptionSave output value as:
truebooleanThe condition tested true.$.exists
falsebooleanThe condition tested false.$.exists

greater-than outputs

The greater-than method outputs are:

OutputTypeDescriptionSave output value as:
truebooleanThe condition tested true.$.greaterThan
falsebooleanThe condition tested false.$.greaterThan

greater-than-equal outputs

The greater-than-equal method outputs are:

OutputTypeDescriptionSave output value as:
truebooleanThe condition tested true.$.greaterThanEqual
falsebooleanThe condition tested false.$.greaterThanEqual

less-than outputs

The greater-than-equal method outputs are:

OutputTypeDescriptionSave output value as:
truebooleanThe condition tested true.$.lessThan
falsebooleanThe condition tested false.$.lessThan

less-than-equal outputs

The less-than-equal method outputs are:

OutputTypeDescriptionSave output value as:
truebooleanThe condition tested true.$.lessThanEqual
falsebooleanThe condition tested false.$.lessThanEqual

Delay node

The Delay node method, parameter, and output are described in the following sections.

Method

The method for a Delay node is:

  • delay - Wait for a certain amount of time before continuing to the next node.

Parameter

The Delay node parameter is described in the following section.

delay parameters

The delay method parameter is:

ParameterTypeDefaultDescriptionConfiguration selection
delayinteger-The length of delay, in milliseconds.Selector, Number

Output

The Delay node output is described in the following section.

delay outputs

The delay method output is:

OutputTypeDescriptionSave output value as:
nextintegerThe delay is completed.$.delayed

HTTP node

Method

The method for a HTTP node is:

  • setHTTPResponse

Parameter

The HTTP node parameter is described in the following section.

setHTTPResponse parameter

The setHTTPResponse method parameters are:

ParameterTypeMinimumMaximumDescriptionConfiguration selection
statusinteger100599-Selector, Number
bodyany---Selector, String, Number, Boolean, Object, Array, Null
headersobject---Selector, Object

The body and headers parameters can be enabled or disabled.

Output

The HTTP node output is described in the following section.

setHTTPResponse output

The setHTTPResponse method does not have any configurable outputs.

Set Context node

The Set Context node method, parameter, and output are described in the following sections.

Method

The method for a Set Context node is:

  • setContext

Parameter

The Set Context node parameter is described in the following section.

setContext parameter

The setContext method parameter is:

ParameterTypeDefaultDescriptionConfiguration selection
valueany--Selector, String, Number, Boolean, Object, Array, Null

Output

The Set Context node output is described in the following section.

setContext output

The setContext method output is:

OutputTypeDescriptionSave output value as:
nextany--

Custom nodes

Custom nodes which are not built into the API Builder Console can be created and installed. Axway provides three custom nodes with new projects and more planned for the future. The custom node handlers are created and their methods, parameters, and outputs are defined using the Axway Flow SDK. For additional information, see Axway Flow SDK.

The custom nodes currently provided with a new project are:

Base64 node

The node methods, parameters, output for the Base64 node are described in the following sections. The Base64 node is created when NPM installs the nodehandler-base64 code. The Base64 node is included in the default application, but it can be removed.

Methods

The Base64 node default methods are:

  • Decode - Decodes base64 encoded data.
  • Encode - Encodes base64 data.

Parameters

The Base64 node parameters are described in the following sections.

Decode parameters

The Decode method parameters are:

ParameterTypeDescriptionConfiguration selection
data
stringThe date to decode.Selector, String
as
stringExpected decoded data format.Selector, String

The as parameter can be enabled or disabled.

Encode parameters

The Encode method parameter is:

ParameterTypeDescriptionConfiguration selection
data
anyThe data to encode.Selector, String, Number, Boolean, Object, Array, Null

Outputs

The Base64 node outputs are described in the following sections.

Decode outputs

The Decode method outputs are:

OutputTypeDescriptionSave output value as:
Decoded
stringThe base64 decoded data.
$.decoded
Error
any-
$.b64error
Encode outputs

The Encode method output is:

OutputTypeDescriptionSave output value as:
Encoded
stringThe base64 encoded data.
$.b64data

Compose node

The Compose node methods, parameters, and outputs are described in the following sections. The Compose node is created when NPM installs the nodehandler-dot code. The Custom node is included in the default application, but it can be removed.

Methods

The default methods for a Compose node are:

  • Format object - Compose an object by evaluating a template. The evaluated template is JSON parsed and so must be a valid JSON encoded string.
  • Format string - Compose a string by evaluating a template.

Parameters

The Compose node parameters are described in the following sections.

Format object parameters

The Format object method parameters are:

ParameterTypeDescriptionConfiguration selection
data
objectThe data to evaluate the template with. Use $ to access the entire context.Selector, Object
template
stringThe doT template.Selector, String
Format string parameters

The Format string method parameters are:

ParameterTypeDescriptionConfiguration selection
dataobjectThe data to evaluate the template with. Use $ to access the entire context.Selector, Object
templatestringThe doT template.Selector, String

Outputs

The Compose node outputs are described in the following sections.

Format object outputs

The Format object method outputs are:

OutputTypeDescriptionSave output value as:
Next
any-
$.value
Error
anyThis output is triggered if the evaluated template is not a valid JSON string. The output value is the error object.
$.error
Format string outputs

The Format string method outputs are:

OutputTypeDescriptionSave output value as:
Next
any-
$.value
Error
anyThis output is triggered if the evaluated template is not valid. The output value is error object.
$.error

JSON node

The JSON node methods, parameters, and output are described in the following sections. The JSON node is created when NPM installs the nodehandler-json code. The JSON node is included in the default application, but it can be removed.

Methods

The default methods for a JSON node are:

  • Parse - The parse method parses a JSON string, constructing the JavaScript value or object described by the string.
  • Stringify - The stringify method converts a JavaScript value to a JSON string.

Parameters

The JSON node parameters are described in the following sections.

Parse parameters

The Parse method parameter is:

ParameterTypeDescriptionConfiguration selection
json
stringThe JSON string to parse.Selector, String
Stringify parameters

The Stringify method parameters are:

ParameterTypeDescriptionConfiguration selection
value
anyThe value to convert to a JSON string.Selector, String, Number, Boolean, Object, Array, Null
space
anyA string or number object that's used to insert white space into the output JSON string for readability purposes. If this is a number, it indicates the number of space characters to use as white space; this number is capped at 10. If this is a string, its maximum length is 10; the string is used as white space. If this parameter is not provided, no white space is used.Selector, String, Number, Boolean, Object, Array, Null

The space parameter can be enabled or disabled.

Outputs

The JSON node outputs are described in the following sections.

Parse outputs

The Parse method outputs are:

OutputTypeDescriptionSave output value as:
Next
any-
$.value
Error
anyThis output is triggered if the input is not a valid JSON string. The output value is the error object.
$.error
Stringify outputs

The Stringify method output is:

OutputTypeDescriptionSave output value as:
Next
string-
$.json
  • No labels