Hi everyone,
I’m using a discreet parameter in my connector to display HTTP status codes. However, even though I’ve defined discreets for values like 200
, 400
, etc., the parameter still displays the raw value (HTTP/1.1 200
) instead of the label I want (like OK
or Bad Request
).
Here’s what I’d like to display:
-
200
→OK
-
400
,403
,404
→Bad Request
How can I fix this so the parameter shows the discreet label (e.g., OK
) instead of the raw value? Can you share an example where this worked as expected?
Thanks in advance
Hi Rachel,
Could you share your parameter XML definition?
Sometimes the HTTP status code received from an HTTP session contains more than just the code number, and if you just defined 200 as a value and received HTTP/1.1 200 then it will not map it to the string OK you defined in the Display tag.

Hi Rachel,
At first glance, it looks like it is correct, although if you want to map multiple incoming values into a single display value, I would suggest considering using a QAction to do such mapping.
Very likely, one is already being used to process the HTTP response, so it could be expanded to include the processing of the status code.
Hi Joao, I did do this however its still showing HTTP/1.1 200. Also how can I pass 404 and 403 ad bad request as well.
Stream Viewer:
<- 11:48:05 – GET https://url:443/api?endpoint
-> 11:48:06 – HTTP/1.1 200
<Param id="103" trending="false">
<Name>StatusCode</Name>
<Description>Status Code</Description>
<Type>read</Type>
<Information>
<Subtext>Status Code</Subtext>
</Information>
<Interprete>
<RawType>other</RawType>
<LengthType>next param</LengthType>
<Type>string</Type>
</Interprete>
<Alarm>
<Monitored>true</Monitored>
</Alarm>
<Display>
<RTDisplay>true</RTDisplay>
</Display>
<Measurement>
<Type>discreet</Type>
<Discreets>
<Discreet>
<Display>OK</Display>
<Value>HTTP/1.1 200</Value>
</Discreet>
<Discreet>
<Display>Bad Request</Display>
<Value>HTTP/1.1 400</Value>
</Discreet>
</Discreets>
</Measurement>
</Param>