rest message return code '200'

soukayna
Tera Contributor

hello i need to create a record in a table in an instance using a rest message in an other instance , but i got the code 200 wich is success

this is my post method:

find_real_file.png

and this is my table:

find_real_file.png

any idea pls ,

thanks

1 ACCEPTED SOLUTION

Hi Soukayna,



With one endpoint there is only one table associated so that won't be possible.


For inserting into different tables different endpoint will be there.



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

15 REPLIES 15

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Soukayna,



Following links should help you:


Use table api to directly consume and create new record.



http://wiki.servicenow.com/index.php?title=Table_API#gsc.tab=0


Table API - ServiceNow Wiki



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

hey Ankur bawiskar,


well i got my error it was the endpoint but i got this message now :


{"error":{"detail":"Required to provide Auth information","message":"User Not Authenticated"},"status":"failure"}


any idea ?? thanks


Hi Soukayna,



The user you are using for basic authentication is having correct id and password in the instance.


i.e. username and password you give should be present in the instance. should be active and not locked out.


check that once.


also as safer part give "rest_api_explorer" role to that user.



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

hey ankur ,


thank u i resolved the issue, i just wated to ask u is there is a possibility to insert records in two table using the same rest messag ?