Amster

NodeTypes

Global Operations

The node type resources service is responsible for managing node type creation, update, retrieval and deletion for nodes that you create through the node designer. This provides a flexible way to define custom nodes for use in the journey editor. You may specify the ID of a node type on creation, and can then use this ID to retrieve, update and delete the associated node type.

Resource path:

/node-designer/node-type

Resource version: 1.0

create

Create a new node type

Usage

am> create NodeTypes --global --body body

Parameters

--body

The resource in JSON format, described by the following JSON schema:

{
  "description" : "Node type endpoint JSON schema",
  "id" : "urn:jsonschema:org:forgerock:openam:auth:nodes:designer:node:type",
  "type" : "object",
  "title" : "Node type resource schema",
  "properties" : {
    "serviceName" : {
      "title" : "_id.title",
      "description" : "_id.description",
      "type" : "string"
    },
    "displayName" : {
      "title" : "Display name",
      "description" : "The unique display name of the node type",
      "type" : "string"
    },
    "description" : {
      "title" : "Node type description",
      "description" : "An optional text string to help identify the node type",
      "type" : "string"
    },
    "outputs" : {
      "title" : "Node outputs",
      "description" : "A list of nodeState items this node adds and changes",
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "outcomes" : {
      "title" : "Node outcomes",
      "description" : "The list of possible outcomes from this node",
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "inputs" : {
      "title" : "Node inputs",
      "description" : "A list of nodeState inputs that are used by the node",
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "script" : {
      "title" : "Node script",
      "description" : "The script that is executed when the node is run",
      "type" : "string"
    },
    "errorOutcome" : {
      "title" : "Error outcome",
      "description" : "Whether the node has an error outcome",
      "type" : "boolean"
    },
    "tags" : {
      "title" : "Tags",
      "description" : "The tags for the node type, used to group nodes in the journey editor.",
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "properties" : {
      "title" : "Properties",
      "description" : "The map of properties that can be set on the node",
      "type" : "object",
      "additionalProperties" : {
        "type" : "object",
        "title" : "Property Key",
        "description" : "The key of the property, used for defining the node service and script binding",
        "properties" : {
          "title" : {
            "title" : "Property Title",
            "description" : "The title of the property, for display purposes",
            "type" : "string"
          },
          "description" : {
            "title" : "Property Description",
            "description" : "The description of the property, used for helptext display",
            "type" : "string"
          },
          "type" : {
            "title" : "Property Type",
            "description" : "The type of the property, must be STRING, BOOLEAN, NUMBER, or OBJECT",
            "type" : "string",
            "enum" : [ "STRING", "BOOLEAN", "NUMBER", "OBJECT" ]
          },
          "required" : {
            "title" : "Required Value",
            "description" : "Whether the property is required or optional",
            "type" : "boolean"
          },
          "defaultValue" : {
            "title" : "Default Value",
            "description" : "The default value of the property",
            "oneOf" : [ {
              "type" : "string"
            }, {
              "type" : "number"
            }, {
              "type" : "boolean"
            }, {
              "type" : "object"
            }, {
              "type" : "array"
            } ]
          },
          "options" : {
            "title" : "Options",
            "description" : "The options which can be selected for the property, if these are specified the Property Type must be set to STRING and the Required Value must be set to true",
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "multivalued" : {
            "title" : "Multivalued",
            "description" : "Whether the property is a multivalued property",
            "type" : "boolean"
          }
        },
        "required" : [ "title", "type", "required" ]
      }
    }
  },
  "required" : [ "displayName", "outcomes", "script" ]
}

delete

Delete a node type specified by the nodeTypeId parameter

Usage

am> delete NodeTypes --global --id id

Parameters

--id

The unique identifier for the resource.

journeys

List all the journeys that contain the node type

Usage

am> action NodeTypes --global --id id --actionName journeys

Parameters

--id

The unique identifier for the resource.

query

List all the node designer created node types

Usage

am> query NodeTypes --global --filter filter

Parameters

--filter

A CREST formatted query filter, where "true" will query all. Fields that can be queried: [*]

read

Read an individual node type specified by the nodeTypeId parameter

Usage

am> read NodeTypes --global --id id

Parameters

--id

The unique identifier for the resource.

update

Update an individual node type specified by the nodeTypeId parameter

Usage

am> update NodeTypes --global --id id --body body

Parameters

--id

The unique identifier for the resource.

--body

The resource in JSON format, described by the following JSON schema:

{
  "description" : "Node type endpoint JSON schema",
  "id" : "urn:jsonschema:org:forgerock:openam:auth:nodes:designer:node:type",
  "type" : "object",
  "title" : "Node type resource schema",
  "properties" : {
    "serviceName" : {
      "title" : "_id.title",
      "description" : "_id.description",
      "type" : "string"
    },
    "displayName" : {
      "title" : "Display name",
      "description" : "The unique display name of the node type",
      "type" : "string"
    },
    "description" : {
      "title" : "Node type description",
      "description" : "An optional text string to help identify the node type",
      "type" : "string"
    },
    "outputs" : {
      "title" : "Node outputs",
      "description" : "A list of nodeState items this node adds and changes",
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "outcomes" : {
      "title" : "Node outcomes",
      "description" : "The list of possible outcomes from this node",
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "inputs" : {
      "title" : "Node inputs",
      "description" : "A list of nodeState inputs that are used by the node",
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "script" : {
      "title" : "Node script",
      "description" : "The script that is executed when the node is run",
      "type" : "string"
    },
    "errorOutcome" : {
      "title" : "Error outcome",
      "description" : "Whether the node has an error outcome",
      "type" : "boolean"
    },
    "tags" : {
      "title" : "Tags",
      "description" : "The tags for the node type, used to group nodes in the journey editor.",
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "properties" : {
      "title" : "Properties",
      "description" : "The map of properties that can be set on the node",
      "type" : "object",
      "additionalProperties" : {
        "type" : "object",
        "title" : "Property Key",
        "description" : "The key of the property, used for defining the node service and script binding",
        "properties" : {
          "title" : {
            "title" : "Property Title",
            "description" : "The title of the property, for display purposes",
            "type" : "string"
          },
          "description" : {
            "title" : "Property Description",
            "description" : "The description of the property, used for helptext display",
            "type" : "string"
          },
          "type" : {
            "title" : "Property Type",
            "description" : "The type of the property, must be STRING, BOOLEAN, NUMBER, or OBJECT",
            "type" : "string",
            "enum" : [ "STRING", "BOOLEAN", "NUMBER", "OBJECT" ]
          },
          "required" : {
            "title" : "Required Value",
            "description" : "Whether the property is required or optional",
            "type" : "boolean"
          },
          "defaultValue" : {
            "title" : "Default Value",
            "description" : "The default value of the property",
            "oneOf" : [ {
              "type" : "string"
            }, {
              "type" : "number"
            }, {
              "type" : "boolean"
            }, {
              "type" : "object"
            }, {
              "type" : "array"
            } ]
          },
          "options" : {
            "title" : "Options",
            "description" : "The options which can be selected for the property, if these are specified the Property Type must be set to STRING and the Required Value must be set to true",
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "multivalued" : {
            "title" : "Multivalued",
            "description" : "Whether the property is a multivalued property",
            "type" : "boolean"
          }
        },
        "required" : [ "title", "type", "required" ]
      }
    }
  },
  "required" : [ "displayName", "outcomes", "script" ]
}