It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

HipChat Discussion Jira Plugin - Using PowerShell via rest api to link Jira Ticket to HipChat Room

I've been unable to find anything relating to this specific issue I have after spending a lot of time Googling for a solution.

Questions:
1) Does anyone know what rest api I can use, or if there's one available, for linking a Jira ticket to a hipchat room using PowerShell invoke-restmethod and Jira API?
2) Is there documentation on expected json params and endpoing url?
      - If yes, that's all I'll need to figure out how to do this in PowerShell.

Any help is greatly appreciated.

 

 

Screen shot below to show what I'm looking at in Jira regarding "HipChat Discussion" and what I need to interact with from powershell.

HipChat_Discussion_example.png

2 answers

1 accepted

0 votes
Answer accepted

Figured it out using chrome developer tool. It gave me the endpoint to use for this using POST which is:
https://jiracompany.com/rest/hipchat/integrations/1.0/dedicatedroom/

I passed this json which returns a 200 ok and links the ticket to the desired hipchat room:
{"issue_key": "<jira ticket key>","room_id": "<hipchat room id>"}.

You can get the hipchat room id using the following endpoint via GET using a jira ticket that's linked to the hipchat room you want:
https://jiraserver.com/rest/hipchat/integrations/1.0/issuepanel/data/<ticketID>

FYI, used this link for learning about chrome developer tool: https://stackoverflow.com/questions/15679883/how-to-reverse-engineer-an-http-api-call-using-rest-console

 

Used PostMan for testing this before integrating into powershell script. Cheers.

So I figured out how to pull details of the linked hipchat room on a jira ticket:
https://jira.server.com/rest/hipchat/integrations/1.0/issuepanel/data/<ticketID>

I'm then wanting to use this jira endpoint to get issue properties for the HipChat room and to set them. Problem is I don't know the property ID to getting and setting that room ID. This is the url I'm using:
https://jira.server.com/rest/api/2/issue/<ticketID>/properties/{propertyKey}

What's the property key for the jira hipchat discussion?

 

Hers's the documentation I'm referencing, which is the last piece of the puzzle: https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-issue-issueIdOrKey-properties-propertyKey-get

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Hipchat

Hipchat Cloud and Stride have reached End of Life (updated)

All good things come to an end - thanks to all our customers and partners who have been along the Hipchat and Stride journey with us.  As of Feb 15th 2019, Hipchat Cloud and Stride have reached ...

35,195 views 9 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you