I am trying to update an incident through post man but i have got this error on response "Requested URI does not represent any resource"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2022 12:28 AM
Hi Guys,
I am trying to updating an incident by hitting the endpoint through post man but i got an error "Requested URI does not represent any resource"
Please refer the screenshot as below.
Could you please try to help update an incident with script.
Please let us know if you need more information.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2022 12:35 AM
Hello,
Please check your Scripted Rest API and in that you can see the Resources in Related list.
Open the Resources and from there check the Resource path is same as you given in the Postman and check the HTTP Method as well.
URL should be -
https://instancename/Resourcepath
Thanks,
Namrata
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2022 01:07 AM
Thanks for your response, i have checked the resource path same which is have mentioned in the postman, Could you please provide any script to update an incident so that will be helpful for me
Regards
Naga
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2022 02:27 AM
Hello,
Add the below Script in Resource of your Scripted Rest API and from the Postman in the Body section pass the payload like below:
{
"incident_number":"INC0010981",
"short_description":"test"
}
and in URL section of postman don't pass the incident number just write like below URL
https://instancename/api/API namespace/API ID
var responseBody={};
var content=request.body.data;
var incnumber=content.incident_number;
var sdesc=content.short_description;
var grinc=new GlideRecord('incident');
grinc.addQuery('number',incnumber);
grinc.query();
if(grinc.next())
{
grinc.short_description=sdesc;
grinc.update();
}
responseBody.message="Incident is updated";
response.setStatus(200);
response.setBody(responseBody);
Thanks,
Namrata

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2022 01:16 AM
Hi,
Looks like the given endpoint is wrong. Check it once again.
Or else the user credentials used dont pass the READ ACL of incident.
Regards,
Sumanth