Hey, everyone!
We are trying to query contract information with the python API, but apparently it isn’t supported? We are getting the following error:
shotgun_api3.shotgun.Fault: API read() invalid/missing string entity 'type':
{"return_paging_info_without_counts"=>true,
"return_fields"=>["id"],
"return_only"=>"active",
"paging"=>{"current_page"=>1, "entities_per_page"=>5000},
"filters"=>
{"logical_operator"=>"and",
"conditions"=>[{"path"=>"id", "values"=>[889], "relation"=>"is"}]},
"api_return_image_urls"=>true,
"type"=>"Contract"}
Valid entity types:
["ActionMenuItem",
"ApiUser",
"ApiUserProjectConnection",
"AppWelcomeUserConnection",
"Asset",
"AssetAssetConnection",
"AssetBlendshapeConnection",
"AssetElementConnection",
"AssetEpisodeConnection",
"AssetLevelConnection",
"AssetMocapTakeConnection",
"AssetSceneConnection",
"AssetSequenceConnection",
"AssetShootDayConnection",
"AssetShotConnection",
"Asset_linked_projects_Connection",
"Attachment",
"BannerUserConnection",
"Booking",
"CameraMocapTakeConnection",
"ClientUser",
"Composition",
...
"Ticket",
"TicketTicketConnection",
"TimeLog",
"Version"]
It shouldn’t be a permission issue, since the Script we use to query has Admin access and read enabled on all entities. Do we know if this is supported? I couldn’t find any documentation pointing to the contrary D:
Another interesting thing is that we can query the HumanUser.contracts
field and it returns a list of contracts, like so:
>>> user = sg.find("HumanUser", [["id", "is", "2958"]], ["contracts"])
>>> user
[{'contracts': [{'type': 'Contract', 'id': 889, 'name': 'New Contract 889'}], 'type': 'HumanUser', 'id': 2958}]
But we would like to get data from the Contract entity itself, e.g status, dates, etc.