Oh! Your problem then is that you have to URL-encode the query in order to pass it (as a browser would in the navigation bar).
I believe curl has an option to pull the query from a file rather than in the URL, so you could avoid URL-encoding. I don’t have that syntax handy but it’s worth looking into.
For once-in-a-while encodings you can use https://urlencoder.org . Pasting in just the query,
(names of it, ids of it, last report time of it, operating systems of it, ip addresses of it, agent versions of it, values of results from (BES Property "test") of it) of bes computers whose (value of result from (BES Property "64-bit CPU") of it contains "IBM")
we get the result
%28names%20of%20it%2C%20ids%20of%20it%2C%20last%20report%20time%20of%20it%2C%20operating%20systems%20of%20it%2C%20ip%20addresses%20of%20it%2C%20agent%20versions%20of%20it%2C%20values%20of%20results%20from%20%28BES%20Property%20%22test%22%29%20of%20it%29%20of%20bes%20computers%20whose%20%28value%20of%20result%20from%20%28BES%20Property%20%2264-bit%20CPU%22%29%20of%20it%20contains%20%22IBM%22%29
So you can paste that in to the curl command as
curl -X GET --insecure --user user:password https://bfhost.domain.com:56431/api/query?relevance=%28names%20of%20it%2C%20ids%20of%20it%2C%20last%20report%20time%20of%20it%2C%20operating%20systems%20of%20it%2C%20ip%20addresses%20of%20it%2C%20agent%20versions%20of%20it%2C%20values%20of%20results%20from%20%28BES%20Property%20%22test%22%29%20of%20it%29%20of%20bes%20computers%20whose%20%28value%20of%20result%20from%20%28BES%20Property%20%2264-bit%20CPU%22%29%20of%20it%20contains%20%22IBM%22%29
If you’re going to do this frequently, I suggest using a REST client IDE. Insomnia is one such that is GPL and available at https://insomnia.rest/