sysparm_query not working for strings with spaces

Abu Fazal Abbas
Kilo Explorer

Hi,

I am trying to retrieve the sys_id using REST API call. To filter the records, I am using sysparm_query; however, the filter condition doesn't work if the string contains any spaces in between.

$ curl "https://dev101959.service-now.com/api/now/table/cmdb_rel_type?&parent_descriptor=Hosted On&sysparm_fields=sys_id" --request GET --user 'admin':'********' 2>/dev/null

AbuFazalAbbas@D66XCK72 MINGW64 ~
$

 

Any idea, how can I make the filter condition to work for strings with spaces in between?

 

Thanks,

Abbas