Difference between revisions of "I2Rest Advanced Setup"

From i2Rest
Jump to: navigation, search
Line 18: Line 18:
 
}
 
}
 
</pre>
 
</pre>
According to [[I2Rest_Config|I2Rest Configuration Object description]] just two i2Rest Configuration Object fields are mandotary: [[gates object]] and [[i2Rest_Gates|main, manager and session gates object]]. With only this two configured fields we already can run a server instance, but still can't get use of it. Most valuable applications of i2Rest Server are the [[I2Rest_API#run_program_API]] and the [[I2Rest_API#run_command_API]]
+
According to [[I2Rest_Config|I2Rest Configuration Object description]] just two i2Rest Configuration Object fields are mandotary: [[gates object]] and [[i2Rest_Gates|main, manager and session gates object]]. With only this two configured fields we already can run a server instance, but still can't get much use of it. Most valuable i2Rest Server applications - the [[I2Rest_API#run_program_API|run_program API]] and the [[I2Rest_API#run_command_API|run_command API]] requires some more stuff:
 +
 
 +
::run_command_API requires [[OAuth2_object|Oauth2 object]];
 +
::generaly run_program API requires [[Pcml_object|PCML object]] to be set up, but Oauth2 object also is mandotary for programs which has "valid_in_anonymous":false flag in PCML.

Revision as of 16:26, 5 June 2020

Take a look on how the minimal i2Rest configuration might look like.

{
   "gates":
   {
      "main"       : {"url":"http://i2rest.com:22088"},
      "management" : {"url":"http://192.168.0.233:8080"},
      "session"    : {"url":"http://192.168.0.233:8888/session_gate"}
   },
   "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' '-dcm_client_id' 'MYCLIENT')) 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' '-dcm_client_id' 'MYCLIENT')) INLLIBL(KAPBASELIB QGPL)"},
   ],
}

According to I2Rest Configuration Object description just two i2Rest Configuration Object fields are mandotary: gates object and main, manager and session gates object. With only this two configured fields we already can run a server instance, but still can't get much use of it. Most valuable i2Rest Server applications - the run_program API and the run_command API requires some more stuff:

run_command_API requires Oauth2 object;
generaly run_program API requires PCML object to be set up, but Oauth2 object also is mandotary for programs which has "valid_in_anonymous":false flag in PCML.