Query Contracts via API

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':
 "paging"=>{"current_page"=>1, "entities_per_page"=>5000},
   "conditions"=>[{"path"=>"id", "values"=>[889], "relation"=>"is"}]},
Valid entity types:

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.

Hi Nathalia,

You can’t access Contracts via the API, sadly, I asked the Autodesk Support.
We ended up with our own Custom Entity to manage contracts.

I see, thanks @Alefeve !