How to link a space to a Hipchat room

Description

Administrators have the option to link a space to a specific Hipchat room and configure what Confluence activity will be reported to the room. This is normally done from the UI: Space Tools → Integrations → Hipchat. The follow shows how to do this with the CLI's renderRequest action.

Prerequisites

  1. Use the UI to configure at least one Hipchat integration (Admin or space) to establish which Hipchat needs to be connected and do the login etc....

  2. Use the Hipchat CLI to get a list of rooms eligible to be accessed with that same user id - getRoomList. Use the list to determine the room id (number) that you will need later to connect the space to a room.

Details

Let's assume the space has key EXPERIMENT and the room id is 15.

Add link to hipchat room with notifications when a blog is created
-a renderRequest --requestType PUT --request /rest/hipchat/spacetoroom/1.0/config/EXPERIMENT/15/BlogCreate?initialLink=true

There are currently 4 notification types:

  1. BlogCreate
  2. PageCreate
  3. PageUpdate
  4. QuestionCreate

To add another notification:

Add notification for page create
-a renderRequest --requestType PUT --request /rest/hipchat/spacetoroom/1.0/config/EXPERIMENT/15/PageCreate

To remove a notification:

Remove notification for page create
-a renderRequest --requestType DELETE --request /rest/hipchat/spacetoroom/1.0/config/EXPERIMENT/15/PageCreate

If you remove all notifications, the link will disappear as well.