3.67.2. RestAcctRequestDef Previous topic Parent topic Child topic Next topic

This parameter allows you to define parameters for accounting requests sent via HTTP REST API.
You can specify any number of RestAcctRequestDef parameters, one for each parameter sent to the server. The general format is:
RestAcctRequestDef acctparam,attributename[,type[,formatted]]
  • acctparam is the REST parameter name
  • attributename defines the value for acctparam. The value may be fetched from the current request, be a value that is subject to special formatting, or a literal value
  • type consists of the word “literal” or the word “request”. If type is empty or “request”, the value is fetched from the current request. If type is "literal", it is added to the HTTP request as it is.
  • formatted indicates that the value specified with attributename is to be subject to special character processing before being used.
Tip
The type and formatted fields are optional. If they are not specified, type defaults to "request" and formatted defaults to not enabled.

Example

The following example adds 3 parameters in the REST API request Radiator sends. Parameter "request_type" is set to literal value "accounting". Parameter "server_name" is set to the hostname of server that Radiator runs on. Value for parameter "username" is copied from the "User-Name" attribute of the currently processed request. Values from "acct_sess_id" and "acc_status_id" are respectively copied from "Acct-Session-Id" and "Acct-Status-Type" attributes.
RestAcctRequestDef request_type, accounting, literal
RestAcctRequestDef server_name, %h, literal, formatted
RestAcctRequestDef username, User-Name
RestAcctRequestDef acct_sess_id, Acct-Session-Id
RestAcctRequestDef acct_status_type, Acct-Status-Type