web stats
Channel Deployment API Routes all return 500 - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 04-18-2018, 10:41 PM
william00179 william00179 is offline
Mirth Newb
 
Join Date: Jun 2017
Posts: 8
william00179 is on a distinguished road
Default Channel Deployment API Routes all return 500

Hi All,

I am having an issue where all of the channel deployment API POST routes are returning an HTTP 500 status and the following error.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 </title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /api/channels/_undeploy. Reason:
<pre> Request failed.</pre></p>
<hr /><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.3.14.v20161028</a><hr/>
</body>
</html>

This is occurring from the swagger documentation and I am logged into the default admin account.

API version is 3.5.2

I would appreciate any guidance you can give me on this!

Kind regards,
Ben
Reply With Quote
  #2  
Old 04-19-2018, 01:25 AM
AlexNeiva AlexNeiva is offline
Mirth Guru
 
Join Date: Oct 2013
Location: Portugal
Posts: 280
AlexNeiva is on a distinguished road
Default

Hello,

before you evoke any operation using the REST API, you need first call the "_login" operation.
This "_login" operation will return you a cookie "JSESSIONID=xxxxxxxxxxxxxx"
And then you can call any operation from the REST API passing then this received cookie.
After you finish call the "_logout" method.

Hope it clarifies.

Best Regards
__________________
Best Regards,
Alex Neiva
Reply With Quote
  #3  
Old 04-19-2018, 01:04 PM
william00179 william00179 is offline
Mirth Newb
 
Join Date: Jun 2017
Posts: 8
william00179 is on a distinguished road
Default

Hi Alex,

Thanks for the information.

I have already incorporated this step into my code, but I am having trouble getting the right content of the body for the POST.

I have been finding bits and pieces in the forums about needing to POST a <set></set>. This works to un-deploy all of the channels, but I should be able to specify the channel id's in the set to only deploy those, but I can't get the syntax right.

I have tried

<set>
<channel version="3.5.2">
<id>[channel id here]</id>
</channel>
</set>

but this does not work.

Kind regards,
Ben
Reply With Quote
  #4  
Old 04-19-2018, 01:12 PM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

Try this:

Code:
<set>
    <string>...</string>
</set>
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #5  
Old 04-19-2018, 01:38 PM
william00179 william00179 is offline
Mirth Newb
 
Join Date: Jun 2017
Posts: 8
william00179 is on a distinguished road
Default

Thank you so much!
Reply With Quote
Reply

Tags
3.5.2, api

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 07:51 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation