API-static tree calculation The "static tree" contains the full configuration of a data model for each tenant. Example of a sample data model: Reading static tree To read all the values of "primary" static tree, a GET request should be performed to the "/api/v1/data/static-tree" endpoint. Endpoint method GET URI /api/v1/data/static-tree headers ! Authorization Bearer <userToken or APIkey> response the response is a JSON containing the details of the static tree. Example cURL curl --request GET 'https://tenantName.sweagle.com/api/v1/data/static-tree' --header 'Authorization: bearer Xeb940d3-ea37-4766-bb6c-f0b83deafb6f' Deleting all static trees In order to delete all the static trees a DELETE request to the /api/v1/data/static-tree/all endpoint should be executed. This will delete all the static trees that belong to the tenant of the user who makes the request. Endpoint method DELETE URI /api/v1/data/static-tree/all headers ! Authorization Bearer <userToken or APIkey> Example cURL curl --request DELETE 'https://tenantName.sweagle.com/api/v1/data/static-tree/all' --header 'Authorization: bearer Xeb940d3-ea37-4766-bb6c-f0b83deafb6f' Deleting "old" static trees This endpoint deletes the changeset static trees that are older than 30 days, it doesn't delete the primary static tree. Endpoint method DELETE URI /api/v1/data/static-tree/old headers ! Authorization Bearer <userToken or APIkey> Example cURL curl --request DELETE 'https://tenantName.sweagle.com/api/v1/data/static-tree/old' --header 'Authorization: bearer Xeb940d3-ea37-4766-bb6c-f0b83deafb6f' Recalculate static tree In order to recalculate static trees, call the delete all API first and make a GET request to read the tree, the static tree will be recreated. response the response is a JSON containing the details of the static tree.