Page 1 of 1

TM1 REST API Postman Requests

Posted: Fri Jun 28, 2019 5:36 pm
by SarahChang
Hi,

After referencing the swagger file from IBM's website (https://ibm.ent.box.com/s/7qtprz4zntkhl ... pol9w1z5vr), I've been trying to find working Postman requests to IBM TM1 for:

1) POST /Cubes('{Name}')/ibm.tm1.api.v1.UpdateCells

I have tried the request body:

Code: Select all

{
  "Updates": [
    {
      "Tuple": [
      {
     	"Name": "Sales" ,
     	"UniqueName": "[}Cubes].[}Cubes].[Sales]",
     	"Type": "N_Elem",
     	"Level": 0,
     	"Attributes": {},
     	"Hierarchy": {},
     	"Parents": [],
     	"Components": [],
     	"Edges": [],
     	"LocalizedAttributes": []
      }
      ],
      "Value": "READ",
      "ReferenceCube": {},
      "ReferenceCell": []
  ],
  "Order": "NoOrder"
}
but I get back code 278, "Could not find entity reference in payload."

2) GET for TM1SecurityRightRead(), TM1SecurityRightWrite(), TM1SecurityRightNone(), TM1SecurityRightReserve(), TM1SecurityRightLock(), and TM1SecurityRightAdmin().

If anyone could point me in the correct direction, it would be greatly appreciated.

Thank you!

Re: TM1 REST API Postman Requests

Posted: Mon Jul 01, 2019 9:46 pm
by PlanningDev
Are you trying to get data from a cube or trying to write data to a cube? Or just looking for working examples of a few types of operations?

Re: TM1 REST API Postman Requests

Posted: Tue Jul 02, 2019 5:04 pm
by SarahChang
Thank you for the response - I'm mainly just looking for examples that will work in Postman.

Re: TM1 REST API Postman Requests

Posted: Tue Jul 02, 2019 5:47 pm
by PlanningDev
Get dimensions that have a name matching the specified text
http://server:port/api/v1/Dimensions?$filter=contains(Name, 'search text here')

Remove element from parent
http://server:port/api/v1/Dimensions('DimName')/Hierarchies('HierarchyName')/Edges(ParentName='ParentElementName', ComponentName='ChildElementName')

Get all element names from Dimension/Hierarchy
http://server:port/api/v1/Dimensions('dimname')/Hierarchies('hierarchyname')/Elements?$select=Name

ExecuteCubeView and Get cellset back
http://server:port/api/v1/Cubes('CubeName')/Views('ViewName')/tm1.Execute?$expand=Cells

Not sure if you have seen this guide but it has plenty of examples on how to perform various operations
https://www.ibm.com/support/knowledgece ... st_api.pdf

Re: TM1 REST API Postman Requests

Posted: Fri Jul 05, 2019 3:06 am
by ByronB
There is a Postman collection for the TM1 REST API available for free, I would recommend starting with this collection, just Google TM1 and Postman and you will find it. There are also articles which will explain to you how to connect to your TM1 instance.

I hope this help