Making an Authorized REST API GET from the Spark Core?

Hi All,

Hardware: Spark Core
Interfacing with: Jira’s Rest API
Requirements: Make a REST API Get call from the Spark Core and parse the resulting JSON

Working on a project wherein I’m hoping to have a bell ding whenever a jira ticket from a specified team moves to “complete”. In order to do this I’ll have to make a Rest API call like https://jira.huit.harvard.edu/rest/api/2/search?jql=sprint%20in%20openSprints%20()&status=closed to our jira service. This jira instance also requires authorization, so I’ll have to figure out how to pass that as well. Any tips? Is this possible with the Spark? Would I be better off running an external web service and only passing the pertinent info to the spark? Trying to figure this out and I’m such a newb that my searches aren’t turning up much.

I’d basically be making the above call and parsing the resulting JSON for a count of https://jira.huit.harvard.edu/rest/api/2/statuscategory/3 instances. When the counter increases, I’ll send a signal to ring a bell.

Thanks for any help that can be provided,
Rob

Sounds like a nice project!
This question has been around before, take a look at this answer:

If you can't figure it out, let us know, and we'll see what we can do to help you!

1 Like

Just to add one thing: the HTTPS TLS/SSL connection is not possible from the Spark core. You will need some kind of proxy host between the core and your ticket system.

Although this should be possible to do with the upcoming webhooks feature(?)

3 Likes

Yes, it is sounding that way. Very much looking forward to this feature.

Well… you might want to take a look at this then :wink:

5 Likes

Niiiiiiiiiice!

1 Like

Thanks for all the help - I was able to get this working using the cloud API / python. I haven’t given webhooks a try YET - but will as soon as I can get the spark past the captive portal.