i2Rest Configuration Object

From i2Rest
Jump to: navigation, search

i2Rest configuration is a JSON object which contains all settings required to start and run instance of i2Rest Server.

Field Type Description Default value
gates gates object REQUIRED. Gates object

Use this object to define main, manager and session gates characteristics

session_systems [session_system object] REQUIRED. Array of session_system objects

Use this array to define systems where client requests will be processed

session_startup_timeout integer Session startup timeout

Defines amount of time (in seconds) to wait until session is started. If submitted session job will not connect session gate during specified time, client will receive error message. Zero value means no timeout

0
curdir
string Current directory

If present, i2Rest server will change to this directory as the first step of its startup

Not set
debug integer Debug level

Minimal level of message severity which will be logged at console or syslog.

Valid values

  • 0 - Emergency
  • 1 - Alert
  • 2 - Critical
  • 3 - Error
  • 4 - Warning
  • 5 - Notice
  • 6 - Info
  • 7 - Full
4
syslog string
URL of syslog server

If present, i2Rest will send logging message to this syslogd server
i2Rest can send logging messages to UDP or to TCP-IP syslog endpoints.
It is possible to start syslogd server on your IBM i - for more information, look at Using syslog with i2Rest Server
Examples:

  • udp://localhost:514
  • http://localhost:1234
Not set, i2Rest will send log messages to stdout
anonymous_user string
Anonymous user name

All anonymous sessions will be submitted with this value substituted instead of ${user} in submit command

*CURRENT
anonymous_min integer
Initial number of anonymous sessions

i2Rest server will automatically start this number of anonymous sessions on startup

0
anonymous_max integer
Maximum number of anonymous sessions

Maximum number of anonymous sessions which can be submitted. On each request to anonymous session, i2Rest will prestart new anonymous session if needed. In case of maximum number of anonymous sessions submitted, and there is no available anonymous session exists, i2Rest will answer "Server busy" to client request.

No limit
pcmls
[pcml object] Array of pcml objects

Use this array to define the list of run_program apis that will be loaded at i2Rest server startup

OAuth2 OAuth2 object Oauth2 settings object

Used to define parameters of OAuth2 protocol