GetRelevanceResult Web API - encoding query

(imported topic written by kartik_srinivasan91)

Hello everyone.

I am trying to use the “GetRelevanceResult” web API to pull down information from Web reports using a relevance expression.

The question is around the encoding of the data returned - Can I expect it to return data in UTF-8 always? If not, then in which scenarios would it not return back data in UTF-8 encoding?

In all my experiments it looks like the data is returned back in UTF-8 encoding but I’d like to confirm. I’m unable to find a mention around treatment of unicode strings in the manuals.

Any help would be appreciated.

Thanks.

(imported comment written by BenKus)

Hi Kartik,

You should consider using the SOAP API:

http://support.bigfix.com/bes/misc/soapapi.html

I believe the results will always be in UTF-8 and if there are characters that aren’t displayable, they will be percent encoded.

Ben

(imported comment written by kartik_srinivasan91)

Thanks Ben. That would validate what I am seeing the content being dumped out is indeed UTF-8.

The doubt I have is with content that is non-UTF-8 at the source.

E.g. If the content of a retrieved property (e.g a reg key value) is in an encoding other than UTF-8 how would the system behave ?

When retrieved property data is collected from the device, does the client do any kind of conversion from the original encoding to UTF-8 before the data gets stored into big fix device database,

OR

Does the web reports server do any kind of conversion (this in my mind would be less likely) ?

Any help will be appreciated.

(imported comment written by BenKus)

Hey Kartik,

If the system read in a reg key that was encoded differently, the BigFix Agent would convert the data into a MIME encoded format and send it to the BigFix Server. Any non-representable characters would be percent encoded. The database would then store the percent-encoded string in the database, which the console/webreports would query and pass to the SOAP API.

Ben

(imported comment written by kartik_srinivasan91)

Thanks Ben.

I shall try this out and post my findings.

Kartik