Abstract
Optional
blockedAre there connections from any servers which cannot use this Action (default: [])?
The description of the Action (default this.name)
Optional
inputsThe inputs of the Action (default: {})
Optional
logUnder what level should connections to this Action be logged (default 'info')?
Optional
matchIf this Action is responding to a web
request, and that request has a file extension like *.jpg, should Actionhero set the response headers to match that extension (default: true)?
Optional
middlewareThe Middleware specific to this Action (default: []). Middleware is described by the string names of the middleware.
The name of the Action
Optional
outputOptional
toShould this Action appear in api.documentation.documentation? (default: true)?
Optional
versionThe version of this Action (default: 1)
Abstract
runThe main "do something" method for this action. It can be async
. Usually the goal of this run method is to return the data that you want to be sent to API consumers. If error is thrown in this method, it will be logged, caught, and returned to the client as error
The data about this connection, response, and params.
Create a new Actionhero Action. The required properties of an action. These can be defined statically (this.name) or as methods which return a value.