1

I am working on Data Integration Specialist Superbage, created below apex class with post method, I want to see the inputs from the workbench, but I am getting an error

@RestResource(urlMapping='/project/*')
global class ProjectRESTService {
    //Implement service logic here
    @httpPost
    global static void postProjectData(String ProjectRef, String ProjectName,String OpportunityId, Date StartDate,Date EndDate, Double Amount,String Status ){
        System.debug('ProjectRef::'+ProjectRef);
        System.debug('ProjectName:'+ProjectName);
        System.debug('OpportunityId::'+OpportunityId);
        System.debug('StartDate:'+StartDate);
        System.debug('EndDate::'+EndDate);
        System.debug('Amount:'+Amount);
        System.debug('Status:'+Status);
    }
}

Workbench Error enter image description here

Please suggest what I am missing.

2

JSON keys and string values should be in double quotes, try double quotes instead of single quotes.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.