Inbound REST API With multiple request method types
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 11:30 AM
I'm used to creating endpoints that support multiple method types. For example, I would create an endpoint ./user for request method GET, POST and PUT. For GET methods, it would return the user. For POST method, it would create a user and for PUT it would update the user. When I set that up in ServiceNow, it seems that all requests were going into my GET method resource. Does ServiceNow support creating multiple resources with the same end point, but different HTTP request method?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 12:31 PM
Define scripted rest api for user endpoint and and then you can provide different methods to support this endpoint
Refer to some OOB Scripted rest api
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 01:26 PM
My bad. My test setup on Postman was the issue. It works.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 03:00 PM
@Roger1 are using the out of box user table API or the Scripted Rest API?
If your using the OOB or the Scripted Rest API you can make use of the Rest API explorer to test API request and response. Also you can easily build the request body and identify the API URL's for each method. Refer the screenshot below.
example:
POST https://urinstance.service-now.com/api/now/table/sys_user
GET https://urinstance.service-now.com/api/now/table/sys_user/{sys_id}
If my answer has helped with your question, please mark my answer as accepted solution and mark helpful.