简体   繁体   English

如何使用 Rest API 调用更新 TM1 Cube 数据

[英]How to update TM1 Cube data using Rest API call

I am trying to find a way to make a Rest API call to TM1 that sends it an array of data to be updated in the Cube.我正在尝试找到一种方法来对 TM1 进行 Rest API 调用,该调用向其发送要在多维数据集中更新的数据数组。 The data to be updated will be identifiable by the Cube's key but it wont be all the records to be update (eg update row 3 and 5 with new values).要更新的数据将可以通过 Cube 的键来识别,但不会是要更新的所有记录(例如,使用新值更新第 3 行和第 5 行)。

I am having issue finding an example.我在寻找示例时遇到问题。 I did see from documentation "Cube.UpdateCells" But didnt see example on how to use it.我确实从文档“Cube.UpdateCells”中看到,但没有看到如何使用它的示例。 I also saw https://www.ibm.com/support/knowledgecenter/SS9RXT_10.2.2/com.ibm.swg.ba.cognos.tm1_rest_api.10.2.2.doc/t_tm1_rest_api_cellsets.html#dg_tm1_odata_update_many_cell_values where it mentions updating many cells but no example..我还看到https://www.ibm.com/support/knowledgecenter/SS9RXT_10.2.2/com.ibm.swg.ba.cognos.tm1_rest_api.10.2.2.doc/t_tm1_rest_api_cellsets.html#dg_tm1_odata_update_many提到更新cell_value的单元格但没有例子..

I didn't find anything here about it so any help would be appreciated!我在这里没有找到任何关于它的信息,所以任何帮助将不胜感激!

You should try the tm1.Update function and write the exact crossing in the cube.您应该尝试 tm1.Update function 并在立方体中写入精确的交叉点。 the URL will look like this one; URL 看起来像这个; https://myserver:myportnumber/api/v1/Cubes('mycube')/tm1.Update and in the body of your POST Request you'll puch the exact crossing of your cube with the value. https://myserver:myportnumber/api/v1/Cubes('mycube')/tm1.Update并在您的 POST 请求正文中,您将使用该值精确地穿过立方体。 it will look like this one:它看起来像这样:

{
    "Cells":[
        {"Tuple@odata.bind": [
            "Dimensions('Version')/Hierarchies('Version')/Elements('BUDGET')",
            "Dimensions('Societe')/Hierarchies('Societe')/Elements('S01')",
            "Dimensions('Compte')/Hierarchies('Compte')/Elements('C7090')",
            "Dimensions('Annee')/Hierarchies('Annee')/Elements('2019')",
            "Dimensions('Mois')/Hierarchies('Mois')/Elements('M01')",
            "Dimensions('m_Couts')/Hierarchies('m_Couts')/Elements('MONTANT')"
            ]
        }
    ],
    "Value":"1234"
}

You can learn more about the TM1 REST API here: https://code.cubewise.com/tm1-rest-api您可以在此处了解有关 TM1 REST API 的更多信息: https://code.cubewise.com/tm1-rest-api

You'll have a lot of explanation.你会有很多解释。 Try their Postman Collection for the TM1 REST API you'll learn a lot.试试他们的 Postman TM1 系列 REST API 你会学到很多东西。 You just have to install POSTMAN on your laptop and try it on the IBM samples servers.您只需在笔记本电脑上安装 POSTMAN 并在 IBM 示例服务器上试用。

In general Cubewise as a lot of good tools.一般来说 Cubewise 是很多好的工具。 To go further if you know Python or you want to learn it you have the TM1Py library wich is good to work with the TM1 REST API To go further if you know Python or you want to learn it you have the TM1Py library wich is good to work with the TM1 REST API

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 TM1 REST API Python请求ConnectionResetError MaxRetryError ProxyError但JavaScript / jQuery Works - TM1 REST API Python Requests ConnectionResetError MaxRetryError ProxyError but JavaScript/jQuery Works 如何使用 Azure 数据工厂管道调用 REST API? - How to call a REST API using Azure Data Factory Pipelines? C# - OLAP TM1 的 JSON 正文参数 - 通过 RestSharp 调用补丁 - C# - JSON Body Parameter for OLAP TM1 - Patch Call via RestSharp 使用 REST api 更新数据列表 - Update list of data using REST api 如何在 Spring Boot 中使用带有不记名令牌和表单数据的 Rest 模板调用 REST Api - How to call a REST Api using Rest Template with Bearer Token and form-data in Spring boot REST API如何处理连续数据更新 - How REST API handle continuous data update 如何在php中使用CURL调用REST API? - How to call REST API using CURL in php? 如何使用令牌进行REST API调用? - How to make REST API call using a token? 如何使用wordpress主题调用rest api - How to call rest api using wordpress theme 如何调用 REST API 与主体(表单数据)和参数使用 POST 方法在同一个 API? 在 Android 工作室 - How to Call REST API with Body (form-data) and Params using POST method at same API? in Android Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM