Appendix B: Advanced Features

Base64 Encoding

Using the GUI, FAST has the ability to encode template parameters as base64, which becomes part of the template output (AS3 declaration).
iRules are a common use case, however AS3 supports base64 for a wide range of objects.

In the following example, base64var will display as editable plain text but render as base64-encoded text:

contentType: application/json
        type: string
        format: text
        contentEncoding: base64
        default: ZmRhZWVhZWZl # will display as plain text in the GUI
template: |
    "data": {{base64var}}

See also

AS3 Schema Reference for a full list of f5base64 fields.

Multiple Choice Lists

While authoring a template, it is possible to specify multiple choice list boxes for use in cases such as iRules.


Some requirements must be met, which are:

  • type must be array

  • uniqueItems must be true

  • items must have an enum

An example for generating a multi-select list box for iRules would be:

contentType: application/json
        type: array
        uniqueItems: true
            type: string
            enumFromBigip: ltm/rule
 template: |
    "irules": {{irules::array}}

HTTP Calls to External Resources

Some template parameters may be sourced from other places, such as external APIs or databases.

A Template.fetchHttp() method does an HTTP request for each parameter definition that has a url property returning a parameter object with the response results. The value used from a response can be altered by specifying a JSONPath query in an optional data property of the parameter definition. url can also be an object matching Node’s http.request() options object.

type: object
    description: HTTP resource to call to fetch data.
        - type: string
        - type: object # looks like Node request options
    type: string
    description: JSONPath of data to be fetched, must match schema