I am not able to request json at this point. There may be away to do this with a different Sage api but not sure. Here is my request:
def postParams = [
uri: "http://ip:port/sagex/api/Global?command=GetScheduledRecordings",
contentType: "text/xml"
// contentType: 'application/json'
]
try {
httpGet(postParams){response ->
if(response.status != 200) {
log.error "error: ${response.status}."
} else {
log.trace 'Sage response.data: ' + response.data
Here is part of the response in the log:
dev:70812019-04-01 08:13:10.022 am traceSage response.data: TV1445807trueWCAUDT2 (WCAU-DT2)COZITV1https://s3.amazonaws.com/schedulesdirect/assets/stationLogos/s78851_h3_aa.png460trueWCAUDT245807The Blacklist1555120800000truefalse032480378truefalsefalsefalsetrueActionJames SpaderMegan BooneDiego KlattenhoffAmir ArisonMozhan MarnòHisham TawfiqHarry LennixMary Pat GleasonAl SapienzaMarsha Stephanie BlakeMichael AronovMax CasellaSullivan JonesKatherine WillisLaurence MasonRaphael SbargeRoxanna Hope RadjaAngela JeanneauDaniel Morgan ShelleyMarie Grace LaferraraMaxim SwintonBernie RachelleShpend XaniRenne GjoniKossim OsseniBoma AkporeJon BokenkampJon BokenkampJohn EisendrathJohn DavisJohn FoxBill RoeT CooperAllison Glock-CooperCrime drama / Action / ThrillerEP017386900135James SpaderMegan BooneDiego KlattenhoffAmir ArisonMozhan MarnòHisham TawfiqHarry LennixMary Pat GleasonAl SapienzaMarsha Stephanie BlakeMichael AronovMax CasellaSullivan JonesKatherine WillisLaurence MasonRaphael SbargeRoxanna Hope RadjaAngela JeanneauDaniel Morgan ShelleyMarie Grace LaferraraMaxim SwintonBernie RachelleShpend XaniRenne GjoniKossim OsseniBoma AkporeJon BokenkampJon BokenkampJohn EisendrathJohn DavisJohn FoxBill RoeT CooperAllison Glock-CooperLiz and Ressler investigate a Blacklister who offers to erase gambling debts -- at a deceptively high price; Dembe grows concerned as Red tests loyalties of their business associates in search of the individual who turned him in to the police.0.001555088400000616Crime dramaActionThrillerfalse0Lady LuckThe BlacklistCrime drama0James Spader, Megan Boone, Diego Klattenhoff, Amir Arison, Mozhan Marnò, Hisham Tawfiq, Harry Lennix, Mary Pat Gleason, Al Sapienza, Marsha Stephanie Blake, Michael Aronov, Max Casella, Sullivan Jones, Katherine Willis, Laurence Mason, Raphael Sbarge, Roxanna Hope Radja, Angela Jeanneau, Daniel Morgan Shelley, Marie Grace Laferrara, Maxim Swinton, Bernie Rachelle, Shpend Xani, Renne Gjoni, Kossim Osseni, Boma Akpore, Jon Bokenkamp, Jon Bokenkamp, John Eisendrath, John Davis, John Fox, Bill Roe, T Cooper, Allison Glock-CoopertrueActorActorActorActorActorActorActorGuest StarGuest StarGuest StarGuest StarGuest StarGuest StarGuest StarGuest StarGuest StarGuest StarGuest StarGuest StarGuest StarGuest StarGuest StarGuest StarGuest StarGuest StarGuest StarCreatorExecutive ProducerExecutive ProducerExecutive ProducerExecutive ProducerDirectorWriterWriterJames Spader as Raymond ``Red'' ReddingtonMegan Boone as Elizabeth KeenDiego Klattenhoff as Donald ResslerAmir Arison as Aram MojtabaiMozhan Marnò as Samar NavabiHisham Tawfiq as Dembe ZumaHarry Lennix as Harold CooperMary Pat GleasonAl SapienzaMarsha Stephanie BlakeMichael AronovMax CasellaSullivan JonesKatherine WillisLaurence MasonRaphael SbargeRoxanna Hope RadjaAngela JeanneauDaniel Morgan ShelleyMarie Grace LaferraraMaxim SwintonBernie RachelleShpend XaniRenne GjoniKossim OsseniBoma AkporeJon BokenkampJon BokenkampJohn EisendrathJohn DavisJohn FoxBill RoeT CooperAllison Glock-Cooper4603600000WCAUDT20000155511720000001555120800000360000015551172000001555117200000Closed Captioned, Stereo, DD5.1, LetterboxfalseTV14falseStereoCCDD5.1LetterboxNew11truefalse
Here is a similiar request from the browser: