{"id":2081,"date":"2013-07-22T08:59:35","date_gmt":"2013-07-22T08:59:35","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/bharry\/2013\/07\/22\/rest-api-for-team-rooms\/"},"modified":"2013-07-22T08:59:35","modified_gmt":"2013-07-22T08:59:35","slug":"rest-api-for-team-rooms","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/bharry\/rest-api-for-team-rooms\/","title":{"rendered":"REST API for Team Rooms"},"content":{"rendered":"<p>I had someone ask about this so I decided to go ahead and post something.&nbsp; Below is the contents of a Word doc that describes our REST API for working with Team Rooms.&nbsp; It should work both on Team Foundation Service and on a public preview of TFS 2013.&nbsp; Please let me know if you have any feedback on the doc.\nThis is a very early preview and we&rsquo;ll launch it officially later this year.&nbsp; It&rsquo;s also incomplete but it&rsquo;s a start.&nbsp; Hopefully it will give you what you need to know to do basic Team Room extensions.&nbsp; Ultimately we&rsquo;ll follow up with samples and more but right now we&rsquo;re trying to get TFS 2013 finished up.\n&nbsp;\nBrian\n&nbsp;\n<b>ChatRoom Service <\/b>\n<b>General Information<\/b><\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"116\">         <b>Service Name<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"476\">\n<p><b>ChatRoom service<\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"116\">\n<p><b>Area<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"476\">\n<p>Chat<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"116\">\n<p><b>Version<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"476\">\n<p><b>V1<\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"116\">\n<p><b>Application URL<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"476\">\n<p>N\/A<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"116\">\n<p><b>Account URL<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"476\">\n<p>{account}.visualstudio.com\/DefaultCollection\/_apis\/Chat<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b><\/b>\n<b>Description<\/b>\nThe ChatRoom service allows users to interact with their team chat rooms. The service allows developer-centric users to real-time collaborate with their team.\nThe Team Chat Room must be open for allowing authenticated extensions to communicate. This will allow other services within Microsoft and external 3<sup>rd<\/sup> party apps to perform basic operations on the team room such as the following:\n&middot; room-level operations such as create(or delete) rooms, get a list of rooms, etc\n&middot; user-level operations such as join(or leave) a given user from a team room,\n&middot; message-level operations such as post a message, get a list of messages (recent, given day or given time window)\nBy default chat rooms created by the chat service live at the collection level and have no affiliation with a team in TFS. However, we will be automatically creating a chat room for each TFS team. This room will be stored as a team favorite and show up on the team homepage.\n<b>Resources<\/b><\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"150\">         <b>Resources<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"293\">\n<p><b>Description<\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"150\">\n<p>\/rooms<\/p>\n<\/td>\n<td valign=\"top\" width=\"293\">\n<p>Represents chat room resource container<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"150\">\n<p>&lt;RoomUri&gt;\/users<\/p>\n<\/td>\n<td valign=\"top\" width=\"293\">\n<p>Represents chat users resource container<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"150\">\n<p>&lt;RoomUri&gt;\/messages<\/p>\n<\/td>\n<td valign=\"top\" width=\"293\">\n<p>Represents chat messages resource container<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>API Flows<\/b>\nSome of the common flows are as follows:\n<b>User joins a given team room to chat<\/b>\nA chat client with a given user&#8217;s credentials, gets a list of team rooms, joins a given team room, retrieves transcripts, posts a message to the team room, leaves the team room.<\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"64\">         <b>Verb<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"487\">\n<p><b>Request &amp; Response<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"164\">\n<p><b>API Details<\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"64\">\n<p>GET<\/p>\n<\/td>\n<td valign=\"top\" width=\"487\">\n<p>\/rooms<\/p>\n<p>&middot; 200: Wrapped array of team room information<\/p>\n<\/td>\n<td valign=\"top\" width=\"164\">\n<p><a href=\"http:\/\/blogs.msdn.comonenote:#ChatRoom%20Service&amp;section-id=%7BC6CAC3F5-EF69-403C-94B6-70D6A0FAF6A8%7D&amp;page-id=%7B127A704F-FF51-4E12-A651-66AFB5C1643C%7D&amp;object-id=%7B0751797F-701F-039E-062B-C8C9248B0453%7D&amp;D1&amp;base-path=http:\/\/devdiv\/sites\/vssarc\/REST%20API%20Review\/REST%20API%20Review\/1.%20Under\">Get a list of rooms<\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"64\">\n<p>POST<\/p>\n<\/td>\n<td valign=\"top\" width=\"487\">\n<p>\/rooms\/{roomId}\/users<\/p>\n<p>&middot; 201: User joins the given chat room<\/p>\n<\/td>\n<td valign=\"top\" width=\"164\">\n<p><a href=\"http:\/\/blogs.msdn.comonenote:#ChatRoom%20Service&amp;section-id=%7BC6CAC3F5-EF69-403C-94B6-70D6A0FAF6A8%7D&amp;page-id=%7B127A704F-FF51-4E12-A651-66AFB5C1643C%7D&amp;object-id=%7B8C539690-9D12-09C5-37A4-6B904D343682%7D&amp;A6&amp;base-path=http:\/\/devdiv\/sites\/vssarc\/REST%20API%20Review\/REST%20API%20Review\/1.%20Under\">User joins a given room<\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"64\">\n<p>GET<\/p>\n<\/td>\n<td valign=\"top\" width=\"487\">\n<p>\/rooms\/{roomId}\/messages<\/p>\n<p>&middot; 200: Wrapped array\/ transcript of chat messages from the given chat room<\/p>\n<\/td>\n<td valign=\"top\" width=\"164\">\n<p><a href=\"http:\/\/blogs.msdn.comonenote:#ChatRoom%20Service&amp;section-id=%7BC6CAC3F5-EF69-403C-94B6-70D6A0FAF6A8%7D&amp;page-id=%7B127A704F-FF51-4E12-A651-66AFB5C1643C%7D&amp;object-id=%7B4CB68864-37D3-0166-0925-E2DB3BD1CF42%7D&amp;B1&amp;base-path=http:\/\/devdiv\/sites\/vssarc\/REST%20API%20Review\/REST%20API%20Review\/1.%20Under\">Gets room transcript<\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"64\">\n<p>POST<\/p>\n<\/td>\n<td valign=\"top\" width=\"487\">\n<p>\/rooms\/{roomId}\/messages<\/p>\n<p>&middot; 201: Message posted to the given chat room<\/p>\n<\/td>\n<td valign=\"top\" width=\"164\">\n<p><a href=\"http:\/\/blogs.msdn.comonenote:#ChatRoom%20Service&amp;section-id=%7BC6CAC3F5-EF69-403C-94B6-70D6A0FAF6A8%7D&amp;page-id=%7B127A704F-FF51-4E12-A651-66AFB5C1643C%7D&amp;object-id=%7B4CB68864-37D3-0166-0925-E2DB3BD1CF42%7D&amp;64&amp;base-path=http:\/\/devdiv\/sites\/vssarc\/REST%20API%20Review\/REST%20API%20Review\/1.%20Under\">Send a message<\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"64\">\n<p>DELETE<\/p>\n<\/td>\n<td valign=\"top\" width=\"487\">\n<p>\/rooms\/{roomId}\/users\/me<\/p>\n<p>&middot; 200: User leaves the given chat room<\/p>\n<\/td>\n<td valign=\"top\" width=\"164\">\n<p><a href=\"http:\/\/blogs.msdn.comonenote:#ChatRoom%20Service&amp;section-id=%7BC6CAC3F5-EF69-403C-94B6-70D6A0FAF6A8%7D&amp;page-id=%7B127A704F-FF51-4E12-A651-66AFB5C1643C%7D&amp;object-id=%7B4CB68864-37D3-0166-0925-E2DB3BD1CF42%7D&amp;32&amp;base-path=http:\/\/devdiv\/sites\/vssarc\/REST%20API%20Review\/REST%20API%20Review\/1.%20Under\">Leave chat room<\/a><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> NOTE: Streaming APIs will come online at a later date\n<b>User status<\/b>\nA chat client with a given user&#8217;s credentials, would display the list of users currently in the team room. For other regular chat operations, the above API flow works.<\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"64\">         <b>Verb<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"445\">\n<p><b>Request &amp; Response<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"166\">\n<p><b>API Details<\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"64\">\n<p>GET<\/p>\n<\/td>\n<td valign=\"top\" width=\"445\">\n<p>\/rooms\/{roomId}\/users<\/p>\n<p>&middot; 200: Wrapped array of users currently online in the given chat room<\/p>\n<\/td>\n<td valign=\"top\" width=\"166\">\n<p><a href=\"http:\/\/blogs.msdn.comonenote:#ChatRoom%20Service&amp;section-id=%7BC6CAC3F5-EF69-403C-94B6-70D6A0FAF6A8%7D&amp;page-id=%7B127A704F-FF51-4E12-A651-66AFB5C1643C%7D&amp;object-id=%7B35235EE4-158B-089F-03B7-45E838C243E5%7D&amp;18&amp;base-path=http:\/\/devdiv\/sites\/vssarc\/REST%20API%20Review\/REST%20API%20Review\/1.%20Under\">Get list of users statuses<\/a><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>API Details<\/b>\nThis section has the details for each web API.&nbsp; Each individual API goes through a status of review, then once approved it will get a status of the initial production release of v1.preview.&nbsp; This will be covered in more detail in the versioning doc.\n<b>Get Rooms<\/b>\nRetrieve chat rooms in a given account, the account information is retrieved from the URL.<\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"75\">         <b>Status<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"668\">\n<p>V1 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"75\">\n<p><b>GET<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"668\">\n<p>\/chat\/Rooms<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"75\">\n<p><b>Params<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"668\">\n<p>Check OData filters below<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"75\">\n<p><b>Response Body<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"668\">\n<p>{           <br \/>&nbsp; &#8220;count&#8221;: 2,            <br \/>&nbsp; &#8220;value&#8221;: [<\/p>\n<p>&nbsp;&nbsp;&nbsp; {           <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;id&#8221;: 1,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;name&#8221;: &#8220;First Room&#8221;,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;description&#8221;: &#8220;RoomDescription&#8221;,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;lastActivity&#8221;: &#8220;2013-04-11T00:32:29.673Z&#8221;,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;isClosed&#8221;: false,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;creatorUserTfId&#8221;: &#8220;edfab9de-17c2-49ef-99cb-abfc159a1224&#8221;,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;createdDate&#8221;: &#8220;2013-0411T00:32:29.673Z&#8221;            <br \/>&nbsp;&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp;&nbsp; {           <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;id&#8221;: 2,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;name&#8221;: &#8220;Updated Room Name&#8221;,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;description&#8221;: &#8220;Updated Description&#8221;,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;lastActivity&#8221;: &#8220;2013-04-11T00:32:29.673Z&#8221;,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;isClosed&#8221;: false,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;creatorUserTfId&#8221;: &#8220;edfab9de-17c2-49ef-99cb-abfc159a1224&#8221;,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;createdDate&#8221;: &#8220;2013-0411T00:32:29.673Z&#8221;            <br \/>&nbsp;&nbsp;&nbsp; }            <br \/>&nbsp; ]            <br \/>}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"75\">\n<p><b>Return Codes<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"668\">\n<p><b>200:<\/b> <b>OK<\/b> &ndash; success<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>Create Chat Room<\/b>\nCreate a new chat room in a given account.<\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"109\">         <b>Status<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"563\">\n<p>V1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"109\">\n<p><b>POST<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"563\">\n<p>\/Chat\/Rooms<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"109\">\n<p><b>Params<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"563\">\n<p>{<\/p>\n<p>&#8220;Name&#8221;:&#8221;NewRoom&#8221;,<\/p>\n<p>&#8220;Description&#8221;:&#8221;Description1&#8243;<\/p>\n<p>}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"109\">\n<p><b>Response Body<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"563\">\n<p>{<\/p>\n<p>&#8220;id&#8221;:2,&#8221;name&#8221;:&#8221;NewRoom&#8221;,<\/p>\n<p>&#8220;description&#8221;:&#8221;Description1&#8243;,<\/p>\n<p>&#8220;lastActivity&#8221;:&#8221;2013-04-11T00:32,<\/p>\n<p>&#8220;creatorUserTfId&#8221;:&#8221;edfab9de-17c2-49ef-99cb-abfc159a1224&#8243;,<\/p>\n<p>&#8220;createdDate&#8221;:&#8221;2013-04-11T00:32:29.673Z&#8221;<\/p>\n<p>}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"109\">\n<p><b>Return Codes<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"563\">\n<p><b>201:<\/b> <b>Created<\/b> &ndash; success<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>Get Room Info<\/b>\nGets individual chat room information such as name, description.<\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"112\">         <b>Status<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"578\">\n<p>V1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>GET<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"578\">\n<p>\/Chat\/Rooms\/{RoomId}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Params<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"578\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Response Body<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"578\">\n<p>{<\/p>\n<p>&#8220;id&#8221;: 2,<\/p>\n<p>&#8220;name&#8221;: &#8220;Second Room&#8221;,<\/p>\n<p>&#8220;description&#8221;: &#8220;&#8221;,<\/p>\n<p>&#8220;lastActivity&#8221;: &#8220;2013-03-22T19:53:33.683Z&#8221;,<\/p>\n<p>&#8220;isClosed&#8221;: false,<\/p>\n<p>&#8220;creatorUserTfId&#8221;:&#8221;4ea29d8a-00d9-4e76-b798-f6be3b0967c0&#8243;,<\/p>\n<p>&#8220;createdDate&#8221;: &#8220;2013-03-22T19:53:33.683Z&#8221;<\/p>\n<p>}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Return Codes<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"578\">\n<p><b>200:<\/b> <b>OK<\/b>&ndash; success            <br \/><b>404: Not Found<\/b>&#8211; Room not found<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>Update Room Info<\/b>\nUpdates a given chat room&#8217;s information such as name, description.<\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"111\">         <b>Status<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"370\">\n<p>V1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"111\">\n<p><b>PATCH<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"370\">\n<p>\/Chat\/Rooms\/{RoomId}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"111\">\n<p><b>Params<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"370\">\n<p>{<\/p>\n<p>&#8220;Name&#8221;:&#8221;New Room Name&#8221;,<\/p>\n<p>&#8220;Description&#8221;:&#8221;Updated Description&#8221;<\/p>\n<p>}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"111\">\n<p><b>Response Body<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"370\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"111\">\n<p><b>Return Codes<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"370\">\n<p><b>200:<\/b> <b>OK<\/b>&ndash; success            <br \/><b>404: Not Found<\/b>&#8211; Room not found<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>Delete a Room <\/b>\nDeletes a given chat room.<\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"111\">         <b>Status<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"226\">\n<p>NOT IMPLEMENTED YET<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"111\">\n<p><b>DELETE<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"226\">\n<p>\/Chat\/Rooms\/{RoomId}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"111\">\n<p><b>Params<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"226\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"111\">\n<p><b>Response Body<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"226\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"111\">\n<p><b>Return Codes<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"226\">\n<p><b>200:<\/b> <b>OK<\/b>&ndash; success            <br \/><b>404: Not Found <\/b>&#8211; Room not found<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>Get users in a room<\/b>\nGets a list of currently online users in a given team room<\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"79\">         <b>Status<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"664\">\n<p>V1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"79\">\n<p><b>GET<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"664\">\n<p>\/Chat\/Rooms\/{RoomId}\/Users<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"79\">\n<p><b>Params<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"664\">\n<p>Odata filters applicable here<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"79\">\n<p><b>Response Body<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"664\">\n<p>{           <br \/>&nbsp; &#8220;count&#8221;: 1,            <br \/>&nbsp; &#8220;value&#8221;: [            <br \/>&nbsp;&nbsp;&nbsp; {            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;roomId&#8221;: 1,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;userId&#8221;: &#8220;b918ff7a-52f7-4bdf-8186-2d5cdbf707d7&#8221;,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;lastActivity&#8221;: &#8220;2013-04-11T00:43:35.903Z&#8221;,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;joinedDate&#8221;: &#8220;2013-04-11T00:43:35.903Z&#8221;            <br \/>&nbsp;&nbsp;&nbsp; }            <br \/>&nbsp; ]            <br \/>}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"79\">\n<p><b>Return Codes<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"664\">\n<p><b>200:<\/b> <b>OK<\/b>&ndash; success            <br \/><b>404: Not Found <\/b>&#8211; Room not found<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>Get user status info<\/b>\nGets status of a given user in the context of a given chat room. The &lsquo;me&rsquo; resource is a special resource to store the currently logged in user.<\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"95\">         <b>Status<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"648\">\n<p>V1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"95\">\n<p><b>GET<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"648\">\n<p>\/Chat\/Rooms\/{RoomId}\/Users\/UserId or<\/p>\n<p>\/Chat\/Rooms\/{RoomId}\/Users\/me<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"95\">\n<p><b>Params<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"648\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"95\">\n<p><b>Response Body<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"648\">\n<p>{           <br \/>&nbsp; &#8220;roomId&#8221;: 1,            <br \/>&nbsp; &#8220;userId&#8221;: &#8220;b918ff7a-52f7-4bdf-8186-2d5cdbf707d7&#8221;,            <br \/>&nbsp; &#8220;lastActivity&#8221;: &#8220;2013-04-11T00:48:02.69Z&#8221;,            <br \/>&nbsp; &#8220;joinedDate&#8221;: &#8220;2013-04-11T00:48:02.69Z&#8221;            <br \/>}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"95\">\n<p><b>Return Codes<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"648\">\n<p><b>200:<\/b> <b>OK<\/b>&ndash; success            <br \/><b>404: Not Found <\/b>&#8211; Room not found\/ user not present in room<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>Join room<\/b>\nJoins the currently authenticated user to a given team room<\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"112\">         <b>Status<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"358\">\n<p>V1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>PUT<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"358\">\n<p>\/Chat\/Rooms\/{RoomId}\/Users\/UserId or<\/p>\n<p>\/Chat\/Rooms\/{RoomId}\/Users\/me<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Params<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"358\">\n<p>{           <br \/>&nbsp; &#8220;UserId&#8221;: &#8220;b918ff7a-52f7-4bdf-8186-2d5cdbf707d7&#8221;            <br \/>}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Response Body<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"358\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Return Codes<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"358\">\n<p><b>200:<\/b> <b>OK<\/b>&ndash; success            <br \/><b>404: Not Found <\/b>&#8211; Room not found<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>Leave room<\/b>\nLeaves the currently authenticated user from a given team room<\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"112\">         <b>Status<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"384\">\n<p>Review&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Review, v1.preview, v1, etc&hellip;)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>DELETE<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"384\">\n<p>\/Chat\/Rooms\/{RoomId}\/Users\/UserId or<\/p>\n<p>\/Chat\/Rooms\/{RoomId}\/Users\/me<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Params<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"384\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Response Body<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"384\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Return Codes<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"384\">\n<p><b>200:<\/b> <b>OK<\/b>&ndash; success            <br \/><b>404: Not Found <\/b>&#8211; Room not found\/ user not present in room<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>Post message<\/b>\nPosts a message to a given team room<\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"112\">         <b>Status<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"334\">\n<p>Review&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Review, v1.preview, v1, etc&hellip;)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>POST<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"334\">\n<p>\/Chat\/Rooms\/{RoomId}\/Messages<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Params<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"334\">\n<p>{ <\/p>\n<p>&nbsp; &#8220;content&#8221;: &ldquo;Message content&rdquo;<\/p>\n<p>}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Response Body<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"334\">\n<p>Location header contains message Id<\/p>\n<p>Rooms\/{RoomId}\/Messages\/{MessageId}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Return Codes<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"334\">\n<p><b>201:<\/b> <b>Created <\/b>&ndash; success            <br \/><b>404: Not Found <\/b>&#8211; Room not found<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>Get chat transcript<\/b>\nGets a given room&#8217;s chat messages transcript.<\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"112\">         <b>Status<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"346\">\n<p>Review&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Review, v1.preview, v1, etc&hellip;)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>GET<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"346\">\n<p>\/Chat\/Rooms\/{RoomId}\/Messages<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Params<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"346\">\n<p>Odata params applicable here<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Response Body<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"346\">\n<p>{           <br \/>&nbsp; &#8220;count&#8221;: 2,            <br \/>&nbsp; &#8220;value&#8221;: [            <br \/>&nbsp;&nbsp;&nbsp; {            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;id&#8221;: 97,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;content&#8221;: &#8220;First message in the room&#8221;,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;messageType&#8221;: &#8220;normal&#8221;,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;postedTime&#8221;: &#8220;2013-04-11T01:01:09.097Z&#8221;,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;postedRoomId&#8221;: 1,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;postedByUserTfid&#8221;: &#8220;b918ff7a-52f7-4bdf-8186-2d5cdbf707d7&#8221;            <br \/>&nbsp;&nbsp;&nbsp; },            <br \/>&nbsp;&nbsp;&nbsp; {            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;id&#8221;: 98,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;content&#8221;: &#8220;Hello&#8221;,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;messageType&#8221;: &#8220;normal&#8221;,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;postedTime&#8221;: &#8220;2013-04-11T01:01:11.69Z&#8221;,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;postedRoomId&#8221;: 1,            <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;postedByUserTfid&#8221;: &#8220;b918ff7a-52f7-4bdf-8186-2d5cdbf707d7&#8221;            <br \/>&nbsp;&nbsp;&nbsp; }            <br \/>&nbsp; ]            <br \/>}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Return Codes<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"346\">\n<p><b>200:<\/b> <b>OK<\/b>&ndash; success            <br \/><b>404: Not Found <\/b>&#8211; Room not found<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>Get a given message<\/b>\nGets a given message in a given chat room<\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"80\">         <b>Status<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"663\">\n<p>V1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"80\">\n<p><b>GET<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"663\">\n<p>\/Chat\/Rooms\/{RoomId}\/Messages\/{MessageId}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"80\">\n<p><b>Params<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"663\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"80\">\n<p><b>Response Body<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"663\">\n<p>{           <br \/>&nbsp; &#8220;id&#8221;: 97,            <br \/>&nbsp; &#8220;content&#8221;: &#8220;First message in the room&#8221;,            <br \/>&nbsp; &#8220;messageType&#8221;: &#8220;normal&#8221;,            <br \/>&nbsp; &#8220;postedTime&#8221;: &#8220;2013-04-11T01:01:09.097Z&#8221;,            <br \/>&nbsp; &#8220;postedRoomId&#8221;: 1,            <br \/>&nbsp; &#8220;postedByUserTfid&#8221;: &#8220;b918ff7a-52f7-4bdf-8186-2d5cdbf707d7&#8221;            <br \/>}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"80\">\n<p><b>Return Codes<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"663\">\n<p><b>200:<\/b> <b>OK<\/b>&ndash; success            <br \/><b>404: Not Found <\/b>&#8211; Room\/Message not found<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>Update a given message<\/b>\nUpdates a given message in a given chat room<\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"112\">         <b>Status<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"308\">\n<p>NOT IMPLEMENTED YET<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>PATCH<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"308\">\n<p>\/Chat\/Rooms\/{RoomId}\/Messages\/{MessageId}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Params<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"308\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Response Body<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"308\">\n<p>{ <\/p>\n<p>&nbsp; &#8220;message&#8221;: &ldquo;Message content&rdquo;<\/p>\n<p>}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Return Codes<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"308\">\n<p><b>200:<\/b> <b>OK<\/b>&ndash; success            <br \/><b>404: Not Found <\/b>&#8211; Room\/Message not found<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>Delete a given message<\/b><\/p>\n<p>Deletes a given message in a given chat room<\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Status<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"308\">\n<p>NOT IMPLEMENTED YET<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>DELETE<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"308\">\n<p>\/Chat\/Rooms\/{RoomId}\/Messages\/{MessageId}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Params<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"308\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Response Body<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"308\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p><b>Return Codes<\/b><\/p>\n<\/td>\n<td valign=\"top\" width=\"308\">\n<p><b>200:<\/b> <b>OK<\/b>&ndash; success            <br \/><b>404: Not Found <\/b>&#8211; Room\/Message not found<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>I had someone ask about this so I decided to go ahead and post something.&nbsp; Below is the contents of a Word doc that describes our REST API for working with Team Rooms.&nbsp; It should work both on Team Foundation Service and on a public preview of TFS 2013.&nbsp; Please let me know if you [&hellip;]<\/p>\n","protected":false},"author":244,"featured_media":14617,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[5],"class_list":["post-2081","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-tfs"],"acf":[],"blog_post_summary":"<p>I had someone ask about this so I decided to go ahead and post something.&nbsp; Below is the contents of a Word doc that describes our REST API for working with Team Rooms.&nbsp; It should work both on Team Foundation Service and on a public preview of TFS 2013.&nbsp; Please let me know if you [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/posts\/2081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/users\/244"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/comments?post=2081"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/posts\/2081\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/media\/14617"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/media?parent=2081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/categories?post=2081"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/tags?post=2081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}