Management of REST service client information
Db2 DDF implicitly defines special registers and a global variable to store client information about a valid HTTP REST service request. The client information is externalized in accounting records and the output of the -DISPLAY command.
When processing a REST service request, Db2 stores the client information in the following special registers:
- CURRENT CLIENT_ACCTNG
- Contains the string of an HTTP REST GET or POST method that is concatenated with the name of a
qualified service in the form of <collectionID.serviceName>, as in
GET SYSIBMSERVICE.simpleSelect1orPOST SYSIBMSERVICE.simpleSelect1. The maximum length of the CURRENT CLIENT_ACCTG value is 255 characters. <serviceName> might be truncated. - CURRENT CLIENT_APPLNAME
- Contains the value of the service name string in the service request. The maximum length of the CURRENT CLIENT_APPLNAME value is 128 characters.
- CURRENT CLIENT_CORR_TOKEN
- Contains the value of the logical unit of work identifier or LUWID string that is generated for the thread without the commit count for the service request. The correlation token can be used to correlate any downstream connections that are used by the service. The maximum length of the CURRENT CLIENT_CORR_TOKEN value is 78 characters.
- CURRENT CLIENT_USERID
- Contains the value of the authentication ID string. The authorization ID is used to establish an HTTP connection for the service request. The maximum length of the CURRENT CLIENT_USERID value is 128 characters.
CURRENT CLIENT_WRKSTNNAME
Contains the user-specified string value that is associated with the User-Agentrequest header for a REST client HTTP request. Most REST clients set theUser-Agentheader value to a default string that represents the name and version of the REST client that is being used. However, you can usually override the default by explicitly setting theUser-Agentheader. The maximum length of the CURRENT CLIENT_WRKSTNNAME value is 255 characters.
Db2 also stores information about the HTTP REST service request in the following built-in global variable:
- SYSIBM.CLIENT_IPADDR
- Contains the value of the client IP address string. The IP address is associated with the Db2 subsystem that is used to establish the HTTP connection for the service request.
