sap-tutorials / Tutorials

Tutorials on sap.com
https://developers.sap.com/tutorial-navigator.html
Creative Commons Attribution 4.0 International
719 stars 772 forks source link

Testing API Business Hub APIs with Curl #3895

Closed Chet77 closed 4 years ago

Chet77 commented 5 years ago

Tutorial URL: https://developers.sap.com/tutorials/hcp-abh-test-locally.html

Please specify the step you are referring to -

Issue in pasting and moving on from last step i.e. step 5

These are my results for "first" record ($top=1) curl --request GET --url 'https://sandbox.api.sap.com/successfactors/odata/v2/User?%24top=1&%24select=firstName%2ClastName%2CjobTitle' --header 'APIKey:XXXX' --header 'Accept:application/json' { "d" : { "results" : [ { "__metadata" : { "uri" : "https://sandbox.api.sap.com/successfactors/odata/v2/User('cfcf5199-6d9d-4894-8f0c-fd1408c4562a')", "type" : "SFOData.User" }, "firstName" : "Runscope", "lastName" : "Alan", "jobTitle" : null } ] } }

And the results for $top=5 curl --request GET --url 'https://sandbox.api.sap.com/successfactors/odata/v2/User?%24top=5&%24select=firstName%2ClastName%2CjobTitle' --header 'APIKey:XXXX' --header 'Accept:application/json' { "d" : { "results" : [ { "metadata" : { "uri" : "https://sandbox.api.sap.com/successfactors/odata/v2/User('cfcf5199-6d9d-4894-8f0c-fd1408c4562a')", "type" : "SFOData.User" }, "firstName" : "Runscope", "lastName" : "Alan", "jobTitle" : null }, { "metadata" : { "uri" : "https://sandbox.api.sap.com/successfactors/odata/v2/User('ihan')", "type" : "SFOData.User" }, "firstName" : null, "lastName" : "Sobhy", "jobTitle" : null }, { "metadata" : { "uri" : "https://sandbox.api.sap.com/successfactors/odata/v2/User('mhoff')", "type" : "SFOData.User" }, "firstName" : null, "lastName" : null, "jobTitle" : null }, { "metadata" : { "uri" : "https://sandbox.api.sap.com/successfactors/odata/v2/User('hind')", "type" : "SFOData.User" }, "firstName" : null, "lastName" : null, "jobTitle" : null }, { "__metadata" : { "uri" : "https://sandbox.api.sap.com/successfactors/odata/v2/User('hind2')", "type" : "SFOData.User" }, "firstName" : null, "lastName" : null, "jobTitle" : null } ] } }

It is not allowing me to move forward, even though I have correct results

maxstreifeneder commented 4 years ago

thanks @Chet77! could you please check if it works now?