Difference between revisions of "I2Rest Client command"

From i2Rest
Jump to: navigation, search
(Parameters)
 
(27 intermediate revisions by one other user not shown)
Line 1: Line 1:
== I2rest command description ==
+
{{DISPLAYTITLE:i2Rest command description}}
 +
The command I2REST is used to interact with i2Rest Client. This command is located in i2Rest distribution library, which default name is I2REST. The command requires i2Rest distribution library in job's library list.<br/>
 +
You can use command I2REST in interactive and batch modes. It is unable to show authorization screen in batch mode.
 
=== Parameters ===
 
=== Parameters ===
 
{| class="wikitable"
 
{| class="wikitable"
! Keyword !! Description !! Choices !! Notes
+
! Keyword !! Description !! Choices  
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;"| COMAND || Comand || *POST, *GET, *PUT, *DEL || Required
+
|style="color: #8080FF; font-weight: bold;"| COMMAND || Command || *POST, *GET, *PUT, *DEL  
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|URL || API endpoint || Path name || Required
+
|style="color: #8080FF; font-weight: bold;"|URL || API endpoint || Path name  
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;» rowspan="5"| BODY || Stream file || Path name ||rowspan="5"|  Optional
+
|style="color: #8080FF; font-weight: bold;" rowspan="5"| BODY || Stream file || Path name  
 
|-
 
|-
 
| or Body string || Character value  
 
| or Body string || Character value  
Line 18: Line 20:
 
| To CCSID || Number  
 
| To CCSID || Number  
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;"| rowspan="2"| HEADERS || Name || Character value ||rowspan="2"|  Optional
+
|style="color: #8080FF; font-weight: bold;" rowspan="2"| HEADERS || Name || Character value  
 
|-
 
|-
 
| Value || Character value  
 
| Value || Character value  
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;"|rowspan=7| ATTACH || Attachments || Character value ||rowspan="7"|  Optional
+
|style="color: #8080FF; font-weight: bold;" rowspan=6| ATTACH || Stream file || Path name  
|-
 
| Stream file || Path name  
 
 
|-
 
|-
 
| or Body string ||  Character value  
 
| or Body string ||  Character value  
Line 36: Line 36:
 
| To CCSID || Number  
 
| To CCSID || Number  
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;"TOSTMF || Save response to stream file || Path name || Optional
+
|style="color: #8080FF; font-weight: bold;"|TOSTMF || Save response to stream file || Path name  
 +
|-
 +
|style="color: #8080FF; font-weight: bold;"|REPLACE  || Replace stream file? || '''*YES''', *NO
 +
|-
 +
|style="color: #8080FF; font-weight: bold;"|STMFCCSID || Stream file CCSID || Number 
 +
|-
 +
|style="color: #8080FF; font-weight: bold;»|CONVERT || Convert output data? || '''*YES''', *NO
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;"REPLACE  || Replace stream file? || '''*YES''', *NO || Optional
+
|style="color: #8080FF; font-weight: bold;»|OUTPUT || Output log events to || '''*NONE''', *PRINT, *JOBLOG, *BOTH 
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;"STMFCCSID || Stream file CCSID || Number || Optional
+
|style="color: #8080FF; font-weight: bold;»|DCMCLIENT || DCM client application ID || Character value
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|CONVERT || Convert output data? || '''*YES''', *NO || Optional
+
|style="color: #8080FF; font-weight: bold;»|RECVLOG || Log recv messages || Character value
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|OUTPUT || Output log events to || '''*NONE''', *PRINT, *JOBLOG, *BOTH || Optional
+
|style="color: #8080FF; font-weight: bold;»|SENTLOG || Log sent messages || Character value
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|DCMCLIENT || DCM client application ID || Character value ||  Optional
+
|style="color: #8080FF; font-weight: bold;»|AUTHMETHOD || Authentication method ||'''*OAUTH2D''', *OAUTH2C, *BASIC, *NONE, *BRIDGE
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|RECVLOG || Log recv messages || Character value || Optional
+
|style="color: #8080FF; font-weight: bold;»|TOKENS || Tokens storage || Character value  
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|SENTLOG || Log sent messages || Character value || Optional
+
|style="color: #8080FF; font-weight: bold;»|REUSE || Try to use saved token || '''*YES''', *NO 
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|AUTHMETHOD || Authentication method || '''*OAUTH2D''', *OAUTH2C, *BASIC, *NONE ||    Required
+
|style="color: #8080FF; font-weight: bold;»|REFRESH || Try to use refresh token || '''*YES''', *NO
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|TOKENS || Tokens storage || Character value || Optional
+
|style="color: #8080FF; font-weight: bold;»|PROMPT || Show authorization screen? || *REQUESTER, '''*BOTH''', *REMOTE, *NONE, *READONLY
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|REUSE || Try to use saved token || '''*YES''', *NO || Optional
+
|style="color: #8080FF; font-weight: bold;»|WAIT || Time to wait authorization || '''99999''', Number
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|REFRESH || Try to use refresh token || '''*YES''', *NO || Optional
+
|style="color: #8080FF; font-weight: bold;»|ASK || Send authorization request to || Character value, '''*REQUESTER''', *NONE
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|ASK || Ask for authorization || Character value, '''*REQUESTER''', *NONE || Optional
+
|style="color: #8080FF; font-weight: bold;»|RMTUSRLEN || Length of Authorizer field || '''10''', Number
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|PROMPT || Show authorization screen? || *REQUESTER, '''*BOTH''', *REMOTE, *NONE, *READONLY || Optional
+
|style="color: #8080FF; font-weight: bold;»|RMTAUTPGM || Program to send remote request || Name, '''*DFT '''
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|WAIT || Time to wait authorization || Number ||Optional ||
+
|style="color: #8080FF; font-weight: bold;»|AUTHID || User/OAuth2 client/device ID || Character value
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|RMTUSRLEN || Length of Authorizer field || '''10''', Number || Optional
+
|style="color: #8080FF; font-weight: bold;»|AUTHPW || User/OAuth2 client/dev passwd || Character value
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|RMTAUTPGM || Program to send remote request || Name, *DFT || Optional
+
|style="color: #8080FF; font-weight: bold;»|AUTHURL || OAuth2 authorization endpoint || Character value
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|AUTHID || User/OAuth2 client/device ID || Character value || Optional
+
|style="color: #8080FF; font-weight: bold;»|TOKENURL || OAuth2 token endpoint || Character value
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|AUTHPW || User/OAuth2 client/dev passwd || Character value || Optional
+
|style="color: #8080FF; font-weight: bold;»|SCOPE || OAuth2 authorization scopes || Character value  
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|AUTHURL || OAuth2 authorization endpoint || Character value || Optional
+
|style="color: #8080FF; font-weight: bold;»|BRIDGEURL || i2Rest access flow bridge url || Character value  
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|TOKENURL || OAuth2 token endpoint || Character value || Optional
+
|style="color: #8080FF; font-weight: bold;»|BRIDGEID || i2Rest bridge client ID || Character value
 
|-
 
|-
|style="color: #8080FF; font-weight: bold;»|SCOPE || OAuth2 authorization scopes || Character value || Optional
+
|style="color: #8080FF; font-weight: bold;»|BRIDGEPW || i2Rest bridge client password || Character value  
 
|}
 
|}
  
  
'''Comand''' (COMAND)<BR>
+
<div id="COMMAND"></div>'''Command''' (COMAND)<BR>
 
Specify the request method used for the URI request.
 
Specify the request method used for the URI request.
 
This is a required parameter.
 
This is a required parameter.
  
'''API endpoint''' (URL)<BR>
+
<div id="URL"></div>'''API endpoint''' (URL)<BR>
 
Enter the URI that will be requested.
 
Enter the URI that will be requested.
 
This is a required parameter.
 
This is a required parameter.
  
'''Body''' (BODY)<BR>
+
<div id="BODY"></div>'''Body''' (BODY)<BR>
 
Specify request body details (if any).
 
Specify request body details (if any).
  
  ''Qualifier 1: Stream file''<BR>
+
::''Qualifier 1: Stream file''<BR>
  Specify location of the stream file that you will be uploaded.
+
::Specify location of the stream file that should be uploaded as request body.
  Should be entered if "or Body string" parameter is blanks.
+
::Should be entered if "or Body string" parameter is blanks.
  
  ''Qualifier 2: or Body string''<BR>
+
::''Qualifier 2: or Body string''<BR>
  Specify attributes of the stream file that you will be uploaded.
+
::Specify content to the inserted into the request body.
  Should be entered if "Stream file" parameter is blanks.
+
::Should be entered if "Stream file" parameter is blanks.
  
  ''Qualifier 3: MIME type''<BR>
+
::''Qualifier 3: MIME type''<BR>
  Specify MIME-type of a request body.
+
::Specify MIME-type of a request body.
  
  ''Qualifier 4: Convert?''<BR>
+
::''Qualifier 4: Convert?''<BR>
  Specifies whether a request body data should be converted to another CCSID.
+
::Specifies whether a request body content should be converted to another CCSID.
  
  ''Qualifier 5: To CCSID?''<BR>
+
::''Qualifier 5: To CCSID?''<BR>
  Specifies CCSID request body data should be converted to. Must be entered, if *YES specified for the "Convert?" parameter.
+
::Specifies CCSID request body data should be converted to. Must be entered, if *YES specified for the "Convert?" parameter.
  
'''Additional Headers''' (HEADERS)<BR>
+
<div id="HEADERS"></div>'''Additional Headers''' (HEADERS)<BR>
 
Specify Additional headers for request (if any).
 
Specify Additional headers for request (if any).
  
  ''Qualifier 1: Name''<BR>
+
::''Qualifier 1: Name''<BR>
  Specify the name of an Additional header.
+
::Specify the name of an Additional header.
  
  ''Qualifier 2: Value''<BR>
+
::''Qualifier 2: Value''<BR>
  Specify the value of an Additional header.
+
::Specify the value of an Additional header.
  
'''Attachments''' (ATTACH)<BR>
+
<div id="ATTACH"></div>'''Attachments''' (ATTACH)<BR>
 
Specify request attachments details (if any).
 
Specify request attachments details (if any).
This is an optional parameter.
+
This is an optional parameter
  
  ''Qualifier 1: Stream file''<BR>
+
::''Qualifier 1: Stream file''<BR>
  Specify location of the stream file that you will be uploaded.
+
::Specify location of the stream file that should be uploaded as an attacment.
  Should be entered if "or Body string" parameter is blanks.
+
::Should be entered if "or Body string" parameter is blanks.
  
  ''Qualifier 2: or Body string''<BR>
+
::''Qualifier 2: or Body string''<BR>
  Specify attributes of the stream file that you will be uploaded.
+
Specify content to be inserted into the request attachment body.
  Should be entered if "Stream file" parameter is blanks.
+
::Should be entered if "Stream file" parameter is blanks.
  
  ''Qualifier 3: MIME type''<BR>
+
::''Qualifier 3: MIME type''<BR>
  Specify MIME-type of the attachment.
+
::Specify MIME-type of the attachment.
  
  ''Qualifier 4: ID''<BR>
+
::''Qualifier 4: ID''<BR>
  Specify stream file name for server upload.<br>
+
::Specify stream file name for server upload.<br>
  '''*Same''' - to use "Stream file" parameter
+
::'''*Same''' - to use "Stream file" parameter
  
  ''Qualifier 5: Convert?''<BR>
+
::''Qualifier 5: Convert?''<BR>  
  Specifies whether attachment data should be converted to another CCSID.
+
::Specifies whether attachment data should be converted to another CCSID.
  
  ''Qualifier 6: To CCSID?''<BR>
+
::''Qualifier 6: To CCSID?''<BR>
  Specifies CCSID attachment data should be converted to. Must be entered, if *YES specified for the "Convert?" parameter.
+
::Specifies CCSID attachment content should be converted to. Must be entered, if *YES specified for the "Convert?" parameter.
  
  
'''Save response to stream file''' (TOSTMF)<BR>
+
<div id="TOSTMF"></div>'''Save response to stream file''' (TOSTMF)<BR>
 
Specify whether responce data should be saved to stream file.
 
Specify whether responce data should be saved to stream file.
  
'''Replace stream file?''' (REPLACE)<BR>
+
<div id="REPLACE"></div>'''Replace stream file?''' (REPLACE)<BR>
Specify whether straeam file data should be overridden.
+
Specify whether stream file data should be overridden.
  
'''Stream file CCSID?''' (STMFCCSID)<BR>
+
<div id="STMFCCSID"></div>'''Stream file CCSID?''' (STMFCCSID)<BR>
 
Specify CCSID of a stream file.
 
Specify CCSID of a stream file.
  
'''Convert output data?''' (CONVERT)<BR>
+
<div id="CONVERT"></div>'''Convert output data?''' (CONVERT)<BR>
 
Specifies whether attachment data should be converted to another CCSID.
 
Specifies whether attachment data should be converted to another CCSID.
  
'''Output log events to''' (OUTPUT)<BR>
+
<div id="OUTPUT"></div>'''Output log events to''' (OUTPUT)<BR>
 
Specify logging destination
 
Specify logging destination
  
'''Log recv messages''' (RECVLOG)<BR>
+
<div id="RECVLOG"></div>'''Log recv messages''' (RECVLOG)<BR>
 
Path to log file. Either IFS or LIB file system approach (ex. - '/qsys.lib/qtemp.lib/recv.log') could be applied.
 
Path to log file. Either IFS or LIB file system approach (ex. - '/qsys.lib/qtemp.lib/recv.log') could be applied.
  
'''Log sent messages''' (SENTLOG)<BR>
+
<div id="SENTLOG"></div>'''Log sent messages''' (SENTLOG)<BR>
 
Path to log file. Either IFS or LIB file system approach (ex. - '/qsys.lib/qtemp.lib/sent.log') could be applied.
 
Path to log file. Either IFS or LIB file system approach (ex. - '/qsys.lib/qtemp.lib/sent.log') could be applied.
  
'''Authentication method''' (AUTHMETHOD)<BR>
+
<div id="AUTHMETHOD"></div> '''Authentication method''' (AUTHMETHOD)<BR>
Specifies authentification method for the request.
+
Specifies an authentification method of the request.
  *OAUTH2D - stands for OAuth2 Device flow
+
::*OAUTH2D - stands for OAuth2 Device flow
  *OAUTH2C - stands for OAuth2 Client flow  
+
::*OAUTH2C - stands for OAuth2 Client flow  
  *BASIC - a method for an HTTP user agent to provide a user name and password when making a request  
+
::*BASIC - a method for an HTTP user agent to provide a user name and password when making a request  
  *NONE - no authentification method used.
+
::*NONE - no authentification method used.
  
'''Tokens storage''' (TOKENS)<BR>
+
<div id="TOKENS"></div>'''Tokens storage''' (TOKENS)<BR>
Path to token storage file. Either IFS or LIB file system approach (ex. - '/qsys.lib/qtemp.lib/tokens.usrspc') could be applied.
+
Path to token storage file. Either IFS or LIB file system approach (ex. - '/qsys.lib/qtemp.lib/tokens.usrspc') could be applied. If not provided, every request with *OAUTH2D, *OAUTH2C and *BRIDGE authorization method will perform authorization flow to obtain new token. Refresh token flows are also not allowed without correct token storage file path provided.  
  
'''Try to use saved token''' (REUSE)<BR>
+
<div id="REUSE"></div>'''Try to use saved token''' (REUSE)<BR>
 
Specifies either saved token should be used with request  
 
Specifies either saved token should be used with request  
  
'''Try to use saved token''' (REFRESH)<BR>
+
<div id="REFRESH"></div>'''Try to use refresh token''' (REFRESH)<BR>
 
Specifies either refresh token flow should be used with request  
 
Specifies either refresh token flow should be used with request  
  
'''Ask for authorization''' (ASK)<BR>
+
<div id="PROMPT"></div>'''Show authorization screen?''' (PROMPT)
 +
Specify User to whom authorization screen will be displayed.
 +
::*REQUESTER - User perfoming request
 +
::*BOTH - requester and remote user
 +
::*REMOTE - some other IBM I user
 +
::*NONE
 +
::*READONLY
 +
 
 +
<div id="ASK"></div>'''Send authorization request to''' (ASK)<BR>
 
Specify either authorization request should be performed.
 
Specify either authorization request should be performed.
  
'''Show authorization screen?''' (PROMPT)
+
<div id="RMTAUTPGM"></div>'''Program to send remote request''' (RMTAUTPGM)
Specifies roles to be familiarized with authorization screen
 
  *REQUESTER - User perfoming request
 
  *BOTH - requester and remote user
 
  *REMOTE - some other IBM I user
 
  *NONE
 
  *READONLY
 
 
 
'''Program to send remote request''' (RMTAUTPGM)
 
 
Specify application to be used to pole authorization server.  
 
Specify application to be used to pole authorization server.  
  *DFT - built-in I2rest application
+
::*DFT - built-in I2rest application
  
'''User/OAuth2 client/device ID''' (AUTHID)<BR>
+
<div id="AUTHID"></div>'''User/OAuth2 client/device ID''' (AUTHID)<BR>
 
Specify OAuth2 client/device ID to be authentificated with authorization server.
 
Specify OAuth2 client/device ID to be authentificated with authorization server.
  
'''User/OAuth2 client/dev passwd''' (AUTHPW)<BR>
+
<div id="AUTHPW"></div>'''User/OAuth2 client/dev passwd''' (AUTHPW)<BR>
 
Specify OAuth2 client/device password to be authentificated with authorization server.
 
Specify OAuth2 client/device password to be authentificated with authorization server.
  
'''OAuth2 authorization endpoint''' (AUTHURL)<BR>
+
<div id="AUTHURL"></div>'''OAuth2 authorization endpoint''' (AUTHURL)<BR>
 
Specify URI to be requested for OAuth2 client/device authorization.
 
Specify URI to be requested for OAuth2 client/device authorization.
  
'''OAuth2 token endpoint''' (TOKENURL)<BR>
+
<div id="TOKENURL"></div>'''OAuth2 token endpoint''' (TOKENURL)<BR>
 
Specify URI to be requested for a OAuth2 flow token.
 
Specify URI to be requested for a OAuth2 flow token.
  
'''OAuth2 authorization scopes''' (SCOPE)<BR>
+
<div id="SCOPE"></div>'''OAuth2 authorization scopes''' (SCOPE)<BR>
Specifies authorization scopes should be used with request. Used with *OAUTH2D or *OAUTH2C authentification method
+
Specifies authorization scopes should be used with request. Used with *OAUTH2D, *OAUTH2C and *BRIDGE  authorization method.
 +
 
 +
<div id="BRIDGEURL"></div>'''i2Rest access flow bridge url''' (BRIDGEURL)<BR>
 +
Specify URL to be used as redirection URI in Authorization Code flow.  Used with *BRIDGE authorization method.
 +
 
 +
<div id="BRIDGEID"></div>'''i2Rest bridge client ID''' (BRIDGEID)<BR>
 +
ID to be used authenticating i2rest Client with i2Rest Server in Authorization Code flow. Used with *BRIDGE authorization method.
  
=== Examples ===
+
<div id="BRIDGEPW"></div>'''i2Rest bridge client passwd''' (BRIDGEPW)<BR>
'''Example 1 Device flow'''<<BR>>
+
Password to be used authenticating i2rest Client with i2Rest Server in Authorization Code flow. Used with *BRIDGE authorization method.
I2REST COMMAND(*POST) URL('http://192.168.0.233:8080') BODY(*N '{"command"
 
:"STATUS"}' 'application/json' *YES 1208) OUTPUT(*BOTH) TOKENS('/qsys.lib/qtemp.
 
lib/tokens.usrspc') ASK(*REQUESTER) PROMPT(*REQUESTER) AUTHID(OAUTH21) AUTHPW(oa
 
uth21) AUTHURL('http://i2rest.com:22088/oauth2/device') TOKENURL('http://i2rest.
 
com:22088/oauth2/access') SCOPE(manager_functions)
 

Latest revision as of 07:19, 26 August 2020

The command I2REST is used to interact with i2Rest Client. This command is located in i2Rest distribution library, which default name is I2REST. The command requires i2Rest distribution library in job's library list.
You can use command I2REST in interactive and batch modes. It is unable to show authorization screen in batch mode.

Parameters

Keyword Description Choices
COMMAND Command *POST, *GET, *PUT, *DEL
URL API endpoint Path name
BODY Stream file Path name
or Body string Character value
MIME type Character value
Convert? *YES, *NO
To CCSID Number
HEADERS Name Character value
Value Character value
ATTACH Stream file Path name
or Body string Character value
ID Character value, *Same
MIME type Character value
Convert? *YES, *NO
To CCSID Number
TOSTMF Save response to stream file Path name
REPLACE Replace stream file? *YES, *NO
STMFCCSID Stream file CCSID Number
CONVERT Convert output data? *YES, *NO
OUTPUT Output log events to *NONE, *PRINT, *JOBLOG, *BOTH
DCMCLIENT DCM client application ID Character value
RECVLOG Log recv messages Character value
SENTLOG Log sent messages Character value
AUTHMETHOD Authentication method *OAUTH2D, *OAUTH2C, *BASIC, *NONE, *BRIDGE
TOKENS Tokens storage Character value
REUSE Try to use saved token *YES, *NO
REFRESH Try to use refresh token *YES, *NO
PROMPT Show authorization screen? *REQUESTER, *BOTH, *REMOTE, *NONE, *READONLY
WAIT Time to wait authorization 99999, Number
ASK Send authorization request to Character value, *REQUESTER, *NONE
RMTUSRLEN Length of Authorizer field 10, Number
RMTAUTPGM Program to send remote request Name, *DFT
AUTHID User/OAuth2 client/device ID Character value
AUTHPW User/OAuth2 client/dev passwd Character value
AUTHURL OAuth2 authorization endpoint Character value
TOKENURL OAuth2 token endpoint Character value
SCOPE OAuth2 authorization scopes Character value
BRIDGEURL i2Rest access flow bridge url Character value
BRIDGEID i2Rest bridge client ID Character value
BRIDGEPW i2Rest bridge client password Character value


Command (COMAND)

Specify the request method used for the URI request. This is a required parameter.

API endpoint (URL)

Enter the URI that will be requested. This is a required parameter.

Body (BODY)

Specify request body details (if any).

Qualifier 1: Stream file
Specify location of the stream file that should be uploaded as request body.
Should be entered if "or Body string" parameter is blanks.
Qualifier 2: or Body string
Specify content to the inserted into the request body.
Should be entered if "Stream file" parameter is blanks.
Qualifier 3: MIME type
Specify MIME-type of a request body.
Qualifier 4: Convert?
Specifies whether a request body content should be converted to another CCSID.
Qualifier 5: To CCSID?
Specifies CCSID request body data should be converted to. Must be entered, if *YES specified for the "Convert?" parameter.

Additional Headers (HEADERS)

Specify Additional headers for request (if any).

Qualifier 1: Name
Specify the name of an Additional header.
Qualifier 2: Value
Specify the value of an Additional header.

Attachments (ATTACH)

Specify request attachments details (if any). This is an optional parameter

Qualifier 1: Stream file
Specify location of the stream file that should be uploaded as an attacment.
Should be entered if "or Body string" parameter is blanks.
Qualifier 2: or Body string

Specify content to be inserted into the request attachment body.

Should be entered if "Stream file" parameter is blanks.
Qualifier 3: MIME type
Specify MIME-type of the attachment.
Qualifier 4: ID
Specify stream file name for server upload.
*Same - to use "Stream file" parameter
Qualifier 5: Convert?
Specifies whether attachment data should be converted to another CCSID.
Qualifier 6: To CCSID?
Specifies CCSID attachment content should be converted to. Must be entered, if *YES specified for the "Convert?" parameter.


Save response to stream file (TOSTMF)

Specify whether responce data should be saved to stream file.

Replace stream file? (REPLACE)

Specify whether stream file data should be overridden.

Stream file CCSID? (STMFCCSID)

Specify CCSID of a stream file.

Convert output data? (CONVERT)

Specifies whether attachment data should be converted to another CCSID.

Output log events to (OUTPUT)

Specify logging destination

Log recv messages (RECVLOG)

Path to log file. Either IFS or LIB file system approach (ex. - '/qsys.lib/qtemp.lib/recv.log') could be applied.

Log sent messages (SENTLOG)

Path to log file. Either IFS or LIB file system approach (ex. - '/qsys.lib/qtemp.lib/sent.log') could be applied.

Authentication method (AUTHMETHOD)

Specifies an authentification method of the request.

  • OAUTH2D - stands for OAuth2 Device flow
  • OAUTH2C - stands for OAuth2 Client flow
  • BASIC - a method for an HTTP user agent to provide a user name and password when making a request
  • NONE - no authentification method used.

Tokens storage (TOKENS)

Path to token storage file. Either IFS or LIB file system approach (ex. - '/qsys.lib/qtemp.lib/tokens.usrspc') could be applied. If not provided, every request with *OAUTH2D, *OAUTH2C and *BRIDGE authorization method will perform authorization flow to obtain new token. Refresh token flows are also not allowed without correct token storage file path provided.

Try to use saved token (REUSE)

Specifies either saved token should be used with request

Try to use refresh token (REFRESH)

Specifies either refresh token flow should be used with request

Show authorization screen? (PROMPT)

Specify User to whom authorization screen will be displayed.

  • REQUESTER - User perfoming request
  • BOTH - requester and remote user
  • REMOTE - some other IBM I user
  • NONE
  • READONLY

Send authorization request to (ASK)

Specify either authorization request should be performed.

Program to send remote request (RMTAUTPGM)

Specify application to be used to pole authorization server.

  • DFT - built-in I2rest application

User/OAuth2 client/device ID (AUTHID)

Specify OAuth2 client/device ID to be authentificated with authorization server.

User/OAuth2 client/dev passwd (AUTHPW)

Specify OAuth2 client/device password to be authentificated with authorization server.

OAuth2 authorization endpoint (AUTHURL)

Specify URI to be requested for OAuth2 client/device authorization.

OAuth2 token endpoint (TOKENURL)

Specify URI to be requested for a OAuth2 flow token.

OAuth2 authorization scopes (SCOPE)

Specifies authorization scopes should be used with request. Used with *OAUTH2D, *OAUTH2C and *BRIDGE authorization method.

i2Rest access flow bridge url (BRIDGEURL)

Specify URL to be used as redirection URI in Authorization Code flow. Used with *BRIDGE authorization method.

i2Rest bridge client ID (BRIDGEID)

ID to be used authenticating i2rest Client with i2Rest Server in Authorization Code flow. Used with *BRIDGE authorization method.

i2Rest bridge client passwd (BRIDGEPW)

Password to be used authenticating i2rest Client with i2Rest Server in Authorization Code flow. Used with *BRIDGE authorization method.