-
1. Re: RestSharp & Remedy
LJ LongWingMay 2, 2017 11:31 AM (in response to Patrick Marshall)
Patrick,
Are you talking about Remedy or Innovation studio here?
Are you building a 3rd party interface that pulls from one and pushes to the other, or are you trying to allow the two systems to talk to eachother directly?
-
2. Re: RestSharp & Remedy
Patrick Marshall May 2, 2017 11:37 AM (in response to LJ LongWing)I am talking about submitting Incident tickets into Remedy from a small app residing on a user's PC.
Visual Studio is the Microsoft development environment for programming C# (among other languages).
-
3. Re: RestSharp & Remedy
LJ LongWingMay 2, 2017 11:59 AM (in response to Patrick Marshall)
Ok...I moved it to the Remedy AR System space.
I have no direct experience with RestSharp, but the docs are fairly good about how to authenticate, get a token, and then use that token in the create process....where are the problems that you are having? I assume you are on Remedy 9.x and have Rest enabled?
-
4. Re: RestSharp & Remedy
Patrick Marshall May 2, 2017 12:05 PM (in response to LJ LongWing)Yes. I am specifically looking for assistance with RestSharp interfacing with Remedy. Looking for if anyone else has used it as I can’t figure out how to get it to tokenize.
As for reassigning, I assigned this to the Developer Community.
-
5. Re: RestSharp & Remedy
LJ LongWingMay 2, 2017 1:21 PM (in response to Patrick Marshall)
The Developer Community is specifically for Innovation Suite, so the Remedy space is the right place for this discussion....
Regarding getting the token, you have the proper URL that needs to be gone to, you have the proper headers that need to be provided...when you try to get the auth token, what sort of issues are you having?
Have you worked through a different rest client like postman to identify the steps and replicate them in RestSharp?
-
6. Re: RestSharp & Remedy
Ravindrakumar Rodge May 2, 2017 1:33 PM (in response to Patrick Marshall)1 of 1 people found this helpfulHi Patrick,
I am not much into development but I am pretty aware of C#. If you are looking for integrating your C# developed client with Remedy for creating ticket then I guess you are looking for an approach with RESTFUL API. If I understand it correctly then I believe below threads would be of help for you.
Build RESTful API's with ASP.NET Web API | Microsoft Docs
BMC Remedy AR System REST API overview - BMC Remedy Action Request System 9.0 - BMC Documentation
REST Web Services Best Practices
Regards,
Ravindrakumar
Sr. Application Analyst
-
7. Re: RestSharp & Remedy
Patrick Marshall May 2, 2017 3:42 PM (in response to Ravindrakumar Rodge)1 of 1 people found this helpfulI've continued playing with this and have it working from Postman. I have exported the code sample from Postman for C# (RestSharp), but I keep getting an error. Here's the dump from Postman:
var client = new RestClient("https://XXXXX-dev-restapi.onbmc.com/api/jwt/login");
var request = new RestRequest(Method.POST);
request.AddHeader("postman-token", "97dfa8fe-f575-339c-3376-09a836ea25b9");
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddParameter("application/x-www-form-urlencoded", "username=XXXXX&password=XXXXXXXX", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
When I attempt to run this from C#, I get the response: Error 406 Not Acceptable, Problem accessing /api/jwt/login
Searching for Error 406 indicates that the server does not want to respond with x-www-form-urlencoded, even though it appears to work with Postman.
-
8. Re: RestSharp & Remedy
Patrick Marshall May 2, 2017 3:56 PM (in response to Patrick Marshall)1 of 1 people found this helpfulMy coworker just found that we needed to add:
request.AddHeader("Accept", "*/*");
-
9. Re: RestSharp & Remedy
Sumit Satpute Feb 1, 2018 8:30 AM (in response to Patrick Marshall)Hi Patrick,
We have the same requirement, where we have to create incidents from asp.net form. Development is in C# .
Can you please suggest how we can go ahead on this.
Kindly help.
Thanks & Regards
Sumit Satpute