Difference between revisions of "I2Rest quick config"

From i2Rest
Jump to: navigation, search
Line 9: Line 9:
 
<pre>
 
<pre>
 
{
 
{
  "curdir" : "/home/btab/svn/123/jpcml",
 
 
   "gates":
 
   "gates":
 
   {
 
   {
Line 22: Line 21:
 
             '-user' '${user}' '-init' 'ADDLIBLE JPCML' )) INLLIBL(KAPBASELIB QGPL)"}
 
             '-user' '${user}' '-init' 'ADDLIBLE JPCML' )) INLLIBL(KAPBASELIB QGPL)"}
 
   ],
 
   ],
 
  "anonymous_user":"BTPL",
 
  
 
   "pcmls":
 
   "pcmls":
Line 36: Line 33:
 
       "clients":
 
       "clients":
 
       {
 
       {
         "OAUTH21":{"redirect_uri":"http://api.i2rest.com:22088/oauth2/redirect",  
+
         "OAUTH21":{"redirect_uri":<main gate>/oauth2/redirect",  
 
                     "description":"Test client",  
 
                     "description":"Test client",  
 
                     "valid_scopes":["run_program", "management_functions"],
 
                     "valid_scopes":["run_program", "management_functions"],
Line 54: Line 51:
 
</pre>
 
</pre>
  
Please explore [[I2Rest_Basic_Setup|more details]] on how to configure your i2Rest server.
+
Please explore [[I2Rest_Basic_Setup|more details]] how to configure your i2Rest server. Now you are ready to [[I2Rest_Start|start your i2Rest Server instance]] and [[I2Rest_Basic_Test|test it]].

Revision as of 23:44, 5 June 2020

Our done-in-three-steps i2Rest Server configuration template will help you to set up you server in a minutes. With this minimal configuration your server instance will be able to process request to echo program.

step1
Contact to your System administrator for available host and port for "main" and "management" gates of the server.
step2
Set the User to be used as anonymous_user
step3
{
   "gates":
   {
      "main"       : {"url":"http://<host_name>[:port]"},
      "management" : {"url":"http://<host_name>[:port]"}
   },
   "session_systems":
   [
         {"name": "*LOCAL",     "submit":"SBMJOB JOB(I2RESTS) USER(${user}) CMD(CALL JPCML/I2REST PARM('-session' '-url' '${surl}' '-uid' '${uid}' 
             '-user' '${user}' '-init' 'ADDLIBLE JPCML' )) INLLIBL(KAPBASELIB QGPL)"},
         {"name": "*ANONYMOUS", "submit":"SBMJOB JOB(I2RESTA) USER(${user}) CMD(CALL JPCML/I2REST PARM('-session' '-url' '${surl}' '-uid' '${uid}'
             '-user' '${user}' '-init' 'ADDLIBLE JPCML' )) INLLIBL(KAPBASELIB QGPL)"}
   ],

   "pcmls":
   [
      {"pcml_mount":"echo",     "pcml_file":"/i2rest/Server1/echo.pcml", "valid_in_anonymous":true},
   ],

   "OAuth2":
   {
      "scopes": {"run_program"          : {"description":"Run *PGM and *SRVPGM"}, 
                 "management_functions" : {"description":"Invoke i2Rest manager APIs"}},
      "clients":
      {
         "OAUTH21":{"redirect_uri":<main gate>/oauth2/redirect", 
                    "description":"Test client", 
                    "valid_scopes":["run_program", "management_functions"],
                    "valid_grant_types":["authorization_code", "urn:ietf:params:oauth:grant-type:device_code", "refresh_token", "client_credentials"]}
      },

      "tokens": {"type":"token"},"refresh_tokens":{"type":"refresh_token"},"codes":{"type":"code"},"device_codes":{"type":"user_code"},

      "login_page"            : "/pages/Login/index.html",
      "decision_page"         : "/pages/user_decide.html",
      "bad_auth_page"         : "/pages/bad_auth.html",
      "enter_code_page"       : "/pages/enter_code.html",
      "device_connected_page" : "/pages/device_connected.html"
   }
   
}

Please explore more details how to configure your i2Rest server. Now you are ready to start your i2Rest Server instance and test it.