hi, im exploring the capabilities of rollbase REST API in c#, i have the following codes. //Request declaration. HttpWebRequest request = WebRequest.Create("http://www.mydomain.com/rest/api/create2?sessionid=" + mySessionId + "&objName=myObject&useIds=false&myField1=myTestData&myIntField=20") as HttpWebRequest; //executing the request and retrieving the result HttpWebResponse response = request.GetResponse() the sad part is, it gives me an error 500, is there anything wrong with my url? any help would be appreciated. thanks. fadz
You should analyze text sent back to you in HTTP request to find out error message. Also checking log file on server side would help. Use Masted Zone > View Customer > View Logs.
hi, thanks for the response.
unfortunately i dont have the access to our Master Zone to view the logs
and the response text says that, "REST API session id not found"
but the session id that i used in the url comes from the response of my login method. and it says that i am successfully logged in.
is there any work around that i need to do?
Try this in your URL:
"&sessionId="+sessionId+ ...
thanks, its now working, its because of sessionId case sensitive.
also i noticed that if you enter a string value to an int field, the create statement still proceed with no errors thrown but discard the incorrect data type field.