REST API's not returning response ?

Gaurav Kumar15
Giga Guru

Hi Team,

I am using the OOB rest API for incident table :-

https://instance.service-now.com/api/now/table/incident

I have few doubts :-

1. For creating incident via REST API , if we have to pass the username of Caller

'caller_id':'cb3230342bb3d60083dac7ac17da15af'

e.g :- This i am using for populating a user, is there any other way of populating caller, because 3rd party tool might not aware of the sys id of user record. So how rest will create the incident for some other user.

2. When i am hitting this Rest API, then the incident is getting created but Response is showing as empty in other tool. Does anyone knows why it comes as empty.

Thanks & Regards,

Gaurav Kumar

35 REPLIES 35

sensiple
Giga Contributor

Hi Tony,



I had checked the coalesce check boxes for the field "number" in the table cutomer_account.


Even though i cleared the check boxes, Im getting the same error.



Is any other solution available to fix this error tony?



Your help on this would be really great.




Thanks & Regards,


Sensiple


sensiple
Giga Contributor

also Tony,



When i create the record using ServiceNow's rest api explorer, Im getting the correct response.


But when i create the record using Chrome's advanced rest client, It shows the above error.



Please give me your valuable suggestions.


Hello Sensiple, could it be that you are trying to query the record/use the record before it is physically committed to the database. I came across a similar situation in SN when you have a header record and the child record(s). An example of this is the Service Request and the related Requested Item records.


sensiple
Giga Contributor

HI Etienne Galea Musu,



Thank you so much for your reply.



But I don't think so. Because when i create the record through servicenow's rest api explorer, im getting the inserted record details immediately.


Only in Chrome's advanced rest client, im getting the above error.



Is there any other solution available to fix this error?



your help on this would be great.



Thanks & Regards,


Sensiple


Sorry, never used Chrome Advanced REST api. Sounds like it is something to do with how Chrome Adv REST api interprets return messages or execution sequence.