Shotgrid API query help

Hi, I am new to the API side of Shotgun and trying to get my head around the filter formatting. I’m trying to get a list of shots associated with a given sequence.

I have the following line of code which works well for listing the sequences within an episode:

sequence = sg.find(“Sequence”, filters= [[‘project’,‘is’,{‘type’: ‘Project’,‘id’: 758}]] , fields=[“code”])
sequence_list = [d[‘code’] for d in sequence]

However I’m having difficulty getting the right filters working to list all shots associated with a given sequence. I’ve tried the following, but does not work (returns nothing). I’ve confirmed that there are shots under the “shot” field, and that I’m using the correct field name.

filters = [[‘id’, ‘is’, 3360]] #this is the sequence id
sequence_shots = sg.find(“Shot”,filters,fields = [‘shots’] )

Any help would be greatly appreciated in explaining where I am going wrong or how I might list the info easier.

Craig

filters = [["sg_sequence.Sequence.id", "is", 3360]]
The sequence id is a transitive property of the shot’s sequence, so you have to refer to it this way :point_up:

Thank you mmoshev for the prompt reply. That did the trick, much appreciated. :+1: