Hi,
I am trying to retreive all the projects from a Urban model including those of UrbanDesignDatabases.
I am using the following snippet in python using sgqlc but the results is empty.
def query_urban_design_db_projects(endpoint_url, urban_model_id, token):
endpoint = HTTPEndpoint(endpoint_url, {"Authorization": "Bearer " + token, "Content-type": "application/json", "Accept": "application/json"})
op = Operation(schema.Query)
projects = op.urban_model(urban_model_id=urban_model_id).urban_design_databases.projects(
paging={"limit": 100}
)
attributes = projects.attributes()
attributes.event_name()
result = endpoint(op)
errors = result.get("errors")
if errors:
raise Exception(errors)
return result
This function returns: {'data': {'urbanModel': {'urbanDesignDatabases': []}}}
I know there is many projects from UrbanDesignDatabase in the Urban model I am querying.
Am I using the API correctly? Do I have to be the owner of the UrbanDesignDatabases to be able to query them?
I am the owner of the Urban model.
Thank you!