Just curious if anyone else has experienced problems with the API? We've been trying to get ConnectWise 2-way ticketing going for quite some time with no success. It appears that the API is not working correctly. We've had a ticket open with Kaseya for roughly four months now and have been told our issue has to go to engineering for a resolution. I'm interpreting that as this being a system-wide issue. I find it kind of hard to believe that no one else can use the API.
We've followed the instructions here: http://help.kaseya.com/WebHelp/EN/VSA/6050000/index.asp#4980.htm. Something appears to be broken with the authentication mechanism. When we authenticate to the api test page at https://server/vsaWS/testclient/testclient.asp, we get either a '0' or nothing in the Session ID field. The remaining tests obviously fail with no Session ID. Anyway, I'm hoping that someone here might be able to shed some light on this. I'd rather use the API than email alerts. We're on 6.5.
This is the reason why. You are attempting to log information into the header but it would be truncated due to the 2600 character limit.
If you wish to try, I am giving this to you with NO GUARANTEE as this will be a sql modification.
So if you try this it is at your own risk, please backup the database if you are not confident in your SQL skills.
Now that you accepted that.... :)
Go to SQL management studio and find that wsSession table. Rename the table to dbo.wsSession_OLD.
Then open up a new Query window and paste the following in between *~*~*~*~*~*~ (do not copy these symbols into the SQL Management Studio query window:
/****** Object: Table [dbo].[wsSession] Script Date: 7/7/2014 9:41:45 PM ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
SET ANSI_PADDING ON
CREATE TABLE [dbo].[wsSession](
[ID] [numeric](26, 0) IDENTITY(1,1) NOT NULL,
[SessionId] [numeric](26, 0) NOT NULL,
[hHeader] [varchar](max) NULL,
[UserName] [varchar](100) NOT NULL,
[IPAddress] [varchar](20) NOT NULL,
[LastActivity] [datetime] NOT NULL,
[BrowserIP] [varchar](20) NULL,
[AppSessionId] [int] NULL,
CONSTRAINT [PK_wsSession] PRIMARY KEY CLUSTERED
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
SET ANSI_PADDING OFF
Execute this and it will recreate the table and index, this time converting your header into varchar(max).
Then re-attempt the testclient.asp
It should work now.
ahhhh yes the primary key is already written, as the table name was only re-written.
Simply drop the table then, run this command first:
drop table dbo.wsSession;
Then run the create query I gave you before.
Just saw your screenshot. The hHeader is slightly different on mine:
Thank you. I think I'm almost there.
I get the following message when I attempt to run the query:
Msg 2714, Level 16, State 5, Line 2
There is already an object named 'PK_wsSession' in the database.
Msg 1750, Level 16, State 0, Line 2
Could not create constraint. See previous errors.
You ROCK and ROLL! Thank you so much. This issue has been dogging me for 4 months. I owe you a beer or twelve.
Glad I could be of assistance. :)