0

How to find all assets for specific project using python api

import pprint
pprint.pprint(sg.find('Asset',[],['code']))

This code gives me all Assets but i want assets for specific project how to find it ?

1 comment

  • 0
    Avatar
    Sudeepth Patinjarayil

    Please use this code

    filters = [['code', 'is', 'Dummy Project']]

    project = sg.find('Project', filters)


    filters = [['project', 'is', project]]

    fields = ['code']

    assets = sg.find('Asset', filters, fields)

    pprint(assets)
Please sign in to leave a comment.