【问题标题】:comparing tm1py authentication method with postman commands将 tm1py 身份验证方法与邮递员命令进行比较
【发布时间】:2021-01-14 04:07:02
【问题描述】:

我成功使用了 tm1py 包,并且能够使用以下代码获取立方体信息。

from TM1py.Services import TM1Service

with TM1Service(address= "localhost",port="51130",user= "pm",password= "IBMDem0s",namespace="Harmony LDAP",ssl= False) as tm1:
    df =tm1.cubes.cells.execute_view_dataframe(cube_name ="PUR_Sales_Planning",view_name="View1",private= False)

现在我需要使用 Postman 命令检查同样的事情。我试过https://code.cubewise.com/blog/mastering-the-tm1-rest-api-with-postman 来测试一下

。所以我使用授权类型为“基本身份验证”。用户名为 pm,密码为 IBMDemos。URL 如下。http://localhost:51130/api/v1/Cubes(我只需要所有立方体名称)。

但是我收到了来自邮递员“401 Unauthorized”的错误。谁能告诉我这里出了什么问题。我需要在邮递员的某个地方输入命名空间名称字段吗?

【问题讨论】:

    标签: python postman cognos-tm1


    【解决方案1】:

    您是否尝试过使用 https 而不是 http? 因为对我来说,当我在邮递员上尝试您的示例时,我使用 HTTPS,它对我有用。 在示例中也是 HTTPS。

    此外,您必须将服务器的服务器名称放在您的 TM1server 所在的位置(而不是 localhost)。在您必须将输入的 httpportnumber 放入您的 tm1s.cfg 文件之后。

    这是一个例子: https://'servername':'httpportnumber'/api/v1/Cubes

    请告诉我你是如何处理它的。

    【讨论】:

    • 嗨@Wuzardor,,尝试了你的方法,1)尝试使用https,但结果是错误“该错误的想法需要与http一起使用”。 2)然后我替换了计算机名而不是本地主机。No Luck mate,,,
    猜你喜欢
    • 2018-05-07
    • 1970-01-01
    • 1970-01-01
    • 2013-04-29
    • 1970-01-01
    • 1970-01-01
    • 2017-04-15
    • 2021-09-15
    • 2014-10-13
    相关资源
    最近更新 更多