function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sreenath reddy 21sreenath reddy 21 

"message": "A query string has to be specified", "errorCode": "MALFORMED_QUERY"

https://user-provisioning--mydev.my.salesforce.com/services/data/v49.0/query?jb =SELECT +Id+Name+End_Date__c+Is_JF_Active__c+Is_Chat_User__c+Is_CRM_Content_User__c+Is_Debug_Mode_Enabled__c+Is_Flow_User__c+Is_Knowledge_User__c+Is_Marketing_User__c+Is_Offline_User__c+Is_Sales_Anywhere_User__c+Is_Service_Cloud_User__c+Job_Function_Type__c+Profile__c+Profile_Id__c+Profile_UserType__c+Role__c+Role_Id__c+Salesforce_Licence_for_profile__c+Secondary_JobFunction__c+Secondary_Job_Function__c+Start_Date__c +FROM +Job_Function__c

I am getting   "message": "A query string has to be specified",
        "errorCode": "MALFORMED_QUERY"  this error, please help me to solve the above problem
Best Answer chosen by sreenath reddy 21
SwethaSwetha (Salesforce Developers) 
Can you try below simplified query and see if it works

https://user-provisioning--mydev.my.salesforce.com/services/data/v49.0/query/?q=SELECT +Id +from+Job_Function__c

All Answers

SwethaSwetha (Salesforce Developers) 
HI Sreenath,
Looks like its a syntax issue
REST queries should basically be in below format
/services/data/v49.0/query/?q=SELECT+Id,Name+from+ACCOUNT
 
Can you correct your query and see if that fixes the issue.

Related: https://webkul.com/blog/how-to-run-rest-api-through-workbench-salesforce/

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
 
sreenath reddy 21sreenath reddy 21
Hi swetha, i write below and try again,
https://user-provisioning--mydev.my.salesforce.com/services/data/v49.0/query/?jb=SELECT +Id,Name,End_Date__c,Secondary_Job_Function__c,Start_Date__c +from+Job_Function__c

Again i get the same error,
  "message": "A query string has to be specified",
        "errorCode": "MALFORMED_QUERY"
SwethaSwetha (Salesforce Developers) 
Can you try below simplified query and see if it works

https://user-provisioning--mydev.my.salesforce.com/services/data/v49.0/query/?q=SELECT +Id +from+Job_Function__c
This was selected as the best answer