returning blank lines

I am having a weird response to one of my API calls, all my other calls work with my API key so I know it isn’t an authentication problem, but whenever I run my script, it outputs a blank line. No error or anything, just nothing.

# Global Imports
import json
import time
from datetime import datetime
# Global Props
apiKey = system.db.runNamedQuery("api/getApiKey", {})
apiRoot = ""
header = {"X-API-Key":apiKey}
logger = system.util.getLogger("bungieAPI")

def getPostGameCarnageReport(activityId,destinyMembershipId):
	apiPath = apiRoot + "/Destiny2/Stats/PostGameCarnageReport/" + str(activityId) + "/"
	apiCall =,headerValues=header)
	print apiCall"getPostGameCarnageReport Completed")


Here is what I am getting in my script console.

By default, should throw an exception if it receives a non-200 response… Is it possible that the request is succeeding but there is simply nothing in the response body?

You might try using something like curl or Postman to issue the request and inspect the response. Additionally, if you need more granular control, you might also look toward our interfaces for making web requests.

Again, not sure about the API in question here, but I also notice you’re not actually using the destinyMembershipId in your request path. Intentional?

Sorry should have clarified, I have tried in Postman and it works.

on the destinyMembershipId my plan is to use it later in the script once I have the response back to parse through the json.

I wonder if supplying useCaches=False to the call would change anything?

The same result, unfortunately.

I don’t know if or why it would change anything, but since you’re on 8.1 you should be using instead.

For replication, I don’t mind sharing my API key via DM; I just didn’t want to post publically.

At least it is a different issue.

Yeah, you’re getting redirected. Create the client with redirect_policy="ALWAYS".

Also you’ll probably want to call .text or .json on the response object you get, once it has content.

That did it!
So with httpClient, are the other methods depreciated now?

Not full on deprecated, but is a significantly better implementation in all regards. If you are writing new code you should use it.

I see, thank you for your help @Kevin.Herron and @kcollins1

OK, I’m curious if you don’t mind sharing, what’s the end goal for pulling in data from Destiny servers? Trying to build some performance dashboards? Just wasn’t expecting to see Bungie servers in Ignition haha.


More or less, over the years there’s been a couple of different sites that have tried to build a score aggregation system grouped by clans where you can compete in various in-game events for the highest aggregate score, unfortunately, they all get shut down usually for the cost of the services or the time it takes to maintain, so I am just trying my hand at bringing that back, using Ignition Maker.