- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2022 08:52 AM
Hi.
New to ServiceNow. I'm trying to create an incident ticket. Right now I'm just using postman to make sure i get all of the things correct before I write the code for it. However, when I make the request to the API endpoint I get the following error:
{
"error": {
"message": "Requested URI does not represent any resource",
"detail": null
},
"status": "failure"
}
The API endpoint I'm trying to hit is:
sn_ind_tsm_sdwan/troubleticket/{ticketType}
Which is documented here:
https://developer.servicenow.com/dev.do#!/reference/api/sandiego/rest/trouble-ticket-open-api
The exact URL I'm hitting in postman is:
https://dev116974.service-now.com/api/sn_ind_tsm_sdwan/troubleticket/incident
The custom headers that are included are:
Accept: application/json
Content-Type: application/json
Authorization: Bearer <bearer_token_string>
The bearer token string is generated by:
curl --data-urlencode "grant_type=password" --data-urlencode "client_id=<client_id>" --data-urlencode 'client_secret=<client_secret>' --data-urlencode 'username=admin' --data-urlencode 'password=<admin_password>' https://dev116974.service-now.com/oauth_token.do
The client_id and client_secret are taken from the information that is auto-generated at:
https://dev116974.service-now.com/now/nav/ui/classic/params/target/oauth_entity.do
Inside of the OAuth Application Registry in a new record that I created.
The payload I'm sending was taken from the documentation linked earlier:
{ "channel":{"name":"virtual_agent"}, "description":"test description", "name":"High Severity Incidents", "severity":"2 - High", "status":"New", "ticketType":"Incident", "id":"a78e2c8cdb68b41015364c9b0b96193e", "creationDate":"2022-08-04 23:26:42", "lastUpdate":"2022-08-04 23:26:42", "@type":"TroubleTicket", "note":[ { "text":"This is a testing work note", "@type":"work_notes" }, { "text":"This is a testing comment", "@type":"comments" } ], "relatedParty":[ { "id":"f3af54c413651200042ab3173244b053", "@referredType":"customer_contact" } ]}
I've tried a number of different things and tried following a number of tutorials, and searching these forums and have not found anything that points me in the right direction. Does anybody know what is happening here and how I would go about fixing it?
Thanks so much,
Aaron
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2022 10:59 AM
Hi Aaron,
On that PDI, you may not have to request the plugin via the Store. Try this link..
You should see something like this:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2022 09:52 AM
Hi.
Just an update. I noticed that in the API documentation it says:
This API is included in the Telecommunications Assurance Workflows application, which is available on the ServiceNow Store.
I figured this might be the issue. I clicked on the Telecommunications Assurance Workflows link. It takes me to the store. I press the Get button. It tries to log me in, then says I can't log in with my ServiceNow account (the same account I'm already logged in with to post in this forum). I end up at:
https://store.servicenow.com/sn_appstore_store.do#!/not_authorized
The virtual assistant popped up and asked me if I needed help with anything. I said I wanted a live human. It said it can't do that yet, but directed me to a contact page to get in touch with ServiceNow. The very article about how to contact them is apparently only permitted to be viewed by people who are logged in (and it says it can't log me in with the account i'm logged in with). So I can't even see the support article about how to get help for the problem I'm having.
The not authorized page says:
Sorry, you can't login with this ServiceNow IDPlease make sure that your ServiceNow ID uses the same email address you currently use to login to Now Support. To login to Store, you can do any of the following:My account email is the same for every account I have with service now. So I'm not sure what's going on here.
Anyway, I hope somebody has some information for me here.
Thanks,
Aaron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2022 10:59 AM
Hi Aaron,
On that PDI, you may not have to request the plugin via the Store. Try this link..
You should see something like this:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2022 11:58 AM
Ok. This took a bit to install, but afterwards, I reran the postman request, and got a different response (one related to not being authorized), so I regenerated the bearer token and used the new one, and got a real response from the api endpoint. Thanks so much.
Aaron
