End of the first week
As thought, by modifying our YouTrackSharp CreateUser method to use PUT
instead of POST
(and creating the Put method), this fixed the password issue and is now fully functioning.
So one down! Next up was to try TeamCity and straight to C# and VS 2012 for this one as the REST API looked similar to YouTrack. For this we used the TeamCitySharp NuGet package (by Paul Stack).
Although similar, it was not exactly the same and I found that it required a XML object passed, not just a string. We ended up using Fiddler to determine the structure of the required request body to create a new user and tested by using POST request in Fiddler itself (below). This turned out to be successful, except there was an issue (again) with the password.
After contacting the TeamCity team, it seems like there is a issue in the XML deserialization which ignores the password and they suggested a workaround by using a separate PUT request for the password. Using this fix, I got the CreateUser method fully working in TeamCitySharp and so have now successfully got two of the five accounts for new employees to automate new users. Next step will be to wrap them up in PowerShell script.
So to sum up this first week at endjin: I've had a play around with PowerShell and C#, learnt to use various debugging tools like Fiddler and IDE debuggers, learnt how to use BDD and testing frameworks, used Git to save and share projects, learnt how to configure virtual machines, toyed around with various tools to increase productivity and attended a client meeting about developing a communication plan. Been kept busy but that's not a bad thing!
Next week I'll be off at a client to run some testing, spending a day at Microsoft to attend a course on Azure, and starting to develop a web and mobile app to log apprentice activities and development.