Перейти к основному содержанию

Tangl Value Analysis Result Export via OData

Около 3 мин

Tangl Value Analysis Result Export via OData

Function for exporting data on performed analysis results. Represents a REST API access point for getting data according to the specification ODataopen in new window.

Authorization

The point is protected and accessible only to authorized users who have appropriate access rights.

You must obtain a JWT Bearer access token to use the hotspot.

For details on setting up authorization and getting an access token, see Organizing Access to the Tangl APIopen in new window

Receiving data

At the moment, data retrieval is organized from summary trees, but in the near future will also be added to retrieve data from the tree of individual directories and the tree of elements.

Union tree

To retrieve the summary tree data, you need to make the following query in OData notation and pass the desired data.

GET https://value.tangl.cloud/api/odata/UnionTree({companyName},{projectName},{modelName},{unionTreeName})?parents={bool}

  • Fields to pass on:
  1. companyName - company name.
  2. projectName - project name.
  3. modelName - the name of the model that contains the results of the analysis.
  4. unionTreeName - the name of the union tree in analysis result, the contents of which are to be retrieved.
  5. parents - the need to load all positions, including parent positions. The default setting is false.

All names are required. Names are written in quotation marks.

  • Example of a successful response:
{
    "@odata.context": "http://value.tangl.cloud/api/odata/$metadata#UnionTree",
    "value": [
        {
            "Id": "6aff1999-2a57-0f5c-cd45-39f9a06810e0",          
            "CatalogName": "УКС - ГЭСН 06",
            "Code": "06-01-001-22",
            "Name": "Устройство ленточных фундаментов: железобетонных при ширине по верху до 1000 мм",
            "Unit": "куб.м",
            "Value": 14.563823339999999,
            "Company": "Tangl",
            "Project": "Тестовый проект Настя",
            "Model": "rst_basic_sample_project test ser",
            "Tree": "test",
            "ValueCost": 12268.0,
            "TotalCost": 178668.98473512,
            "FullTotalCost": 178668.98473512,
            "Version": 14
        },
        {
            "Id": "6aff1999-2a57-0f5c-cd45-39f9a06817e8",          
            "CatalogName": "Test VN",
            "Code": "2.2",
            "Name": "pos7",
            "Unit": "100 м3",
            "Value": 0.0,
            "Company": "Tangl",
            "Project": "Тестовый проект Настя",
            "Model": "rst_basic_sample_project test ser",
            "Tree": "test",
            "ValueCost": 0.0,
            "TotalCost": 0.0,
            "FullTotalCost": 0.0,
            "Version": 14
        }
    ]
}

Getting a list of available companies, projects, models and union tree names for an authorized user

List of companies

GET https://auth.tangl.cloud/api/app/company

  1. No transferable data.
  • Example of a successful response:
[
    {
        "id": "6aff1999-2a57-0f5c-cd45-39f9a06810e0",
        "name": "Bim-Cluster"
    },
    {
        "id": "5015c0af-1853-001b-564b-39f9a058e224",
        "name": "Tangl"
    }
]

List of company projects and models

GET https://value.tangl.cloud/api/app/project/{companyGuid}/byCompanyId

  • Fields to pass on:
    • companyGuid - the unique GUID of the company.
  • Example of a successful response:
[
    {
        "name": "Тестовый проект",
        "companyId": "6aff1999-2a57-0f5c-cd45-39f9a06810e0",
        "currency": null,
        "startDate": null,
        "endDate": null,
        "users": null,
        "folders": [
            {
                "models": [
                    {
                        "id": "93649f36-9b57-c3e6-1583-39fdcfcabda5",
                        "sw": "RVT",
                        "name": "46-20ПИ-КР1"
                    },                   
                    {
                        "id": "2c19869c-7996-d90b-e177-39ff90c1fb31",
                        "sw": "RVT",
                        "name": "RST_basic_sample_project"
                    },
                    {
                        "id": "a2cea030-053a-35e5-3e8c-39ffa19f8a95",
                        "sw": "RVT",
                        "name": "_PRK_КЖ_Р_R21_Опалубка_отсоединено"
                    }
                ],
                "folders": [],
                "unionModels": [],
                "name": "Стадия П"
            }
        ],
        "models": [],
        "catalogPrioritiesSchemeIds": [
            "136b81a5-2cc6-4da0-b43b-ace98e51079e",
            "f113cd54-fa5d-43aa-978b-5ea5bbb26114"
        ],
        "overridenTwigs": [],
        "catalogPrioritiesSchemes": [],
        "unionModels": [],
        "extraProperties": {},
        "concurrencyStamp": "29aa297f579a4a779bcfb055cd2c2a0c",
        "id": "43a15cf9-b7fe-5f37-5473-39fd75795f09"
    }
]

Analysis data by model GUID

GET https://value.tangl.cloud/api/app/analysis/{modelGuid}/byModel

  • Fields to pass on:
    • modelGuid - a unique GUID of the model, the general data on the analysis of which are to be obtained.
  • Example of a successful response:
{
  "status": 1,
          "version": 33,
          "date": "2021-10-23T07:00:03.07Z",
          "dateModel": "0001-01-01T00:00:00",
          "progress": 100,
          "error": "",
          "name": null,
          "projId": "43a15cf9-b7fe-5f37-5473-39fd75795f09",
          "modelId": "93649f36-9b57-c3e6-1583-39fdcfcabda5",
          "metaModelId": "93649f36-9b57-c3e6-1583-39fdcfcabda5",
          "desc": "Данные элементов модели",
          "totalCost": 0,
          "isTest": false,
          "positionUnits": [
    {
      "type": "",
      "unit": "шт"
    },
    {
      "type": "Объем",
      "unit": "м3"
    }
  ],
          "childAnalyzes": null,
          "catalogPrioritiesSchemes": [
    {
      "name": "Группировка и сбор",
      "catalogPriorities": [
        {
          "id": "645a0129-db23-e931-426f-39fd7562eea4",
          "name": "Виды конструкций",
          "priority": 2,
          "isUse": true,
          "filterTwigIds": [],
          "type": 2,
          "isSelfPrice": false
        },
        {
          "id": "360d049c-c2dd-6b40-1db9-39fdd03cf7e5",
          "name": "Материалы",
          "priority": 3,
          "isUse": true,
          "filterTwigIds": [],
          "type": 0,
          "isSelfPrice": false
        },
        {
          "id": "de0f895c-77db-505c-eb1c-39ffbb445d43",
          "name": "Разделы",
          "priority": 1,
          "isUse": true,
          "filterTwigIds": [],
          "type": 1,
          "isSelfPrice": false
        }
      ],
      "id": "136b81a5-2cc6-4da0-b43b-ace98e51079e",
      "concurrencyStamp": null
    },
    {
      "name": "Группировка",
      "catalogPriorities": [
        {
          "id": "645a0129-db23-e931-426f-39fd7562eea4",
          "name": "Виды конструкций",
          "priority": 2,
          "isUse": true,
          "filterTwigIds": [],
          "type": 0,
          "isSelfPrice": false
        },
        {
          "id": "360d049c-c2dd-6b40-1db9-39fdd03cf7e5",
          "name": "Материалы",
          "priority": 3,
          "isUse": true,
          "filterTwigIds": [],
          "type": 0,
          "isSelfPrice": false
        },
        {
          "id": "de0f895c-77db-505c-eb1c-39ffbb445d43",
          "name": "Разделы",
          "priority": 1,
          "isUse": true,
          "filterTwigIds": [],
          "type": 1,
          "isSelfPrice": false
        }
      ],
      "id": "e5073bd9-0b9e-4ff8-9248-74d6afc5bff2",
      "concurrencyStamp": null
    }
  ],
          "id": "65aad6d4-fe3c-3cab-151e-39ffbe1fe02f",
          "concurrencyStamp": "84bfb060f0d04568ae1b75f5661bf5ec",
          "evalJobId": null,
          "isCreateUnionAnalyses": false,
          "nextAnalysesChain": null,
          "lastModifiedEmail": "vnovozhilov@bimcl.ru"
}

In this response you can see the catalogPrioritiesSchemes section. This section contains the composition and names of the priority schemes that were used to build the analysis. The names of the priority schemes are also the names of the union trees, which can be used when retrieving data from a particular union tree.