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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.