Module or line item id using restful API

Highlighted
Master Anaplanner/Community Boss

Module or line item id using restful API

Hi Guys

Does anyone know if we can export module / line items ids using anaplan rest api?

Using rest api i can export workspace /model/files IDs etc however i cant seems to find any unique keys for modules /line items .

Surely there has to be unique IDs for modules / line items behind the scene .

Thanks
8 REPLIES 8
Highlighted
Master Anaplanner/Community Boss

Re: Module or line item id using restful API

Hi,

 

Yes, we have a unique id for the modules. try this

001.png

I tried same for the line items, but didn't get the unique ID. 

 

Regards,

Vignesh M

 

Highlighted
Community Boss

Re: Module or line item id using restful API

Line items are assigned numeric IDs, but line item metadata is not exposed in the API at that level of detail because there is no requirement to address them individually. An export can be configured to provide line item names, which are unique within the scope of each module.

Highlighted
Master Anaplanner/Community Boss

Re: Module or line item id using restful API

@ben_speight 

 

What you have outlined is exactly how i have done it however the challenge  i am facing is some of the line item names are bigger than 60 char which is prohibiting me for using these as codes when bringing back into my anaplan model . 

 

Bit of a background i have written up a python script which collects line item level information from various models (exporting grid -line items ) DEV , UAT , Prod and brings into another anaplan model on a routine bases . My client uses this to perform some analytics in-terms of how each model is growing space wise and some other KPI's . 

 

Challenge i am facing is a line one i highlighted above + line item name will be same in let say DEV and prod . Also cases like what if line item name was updated ? . Therefore i was hoping to get some uniqueness 

Highlighted
Master Anaplanner/Community Boss

Re: Module or line item id using restful API

Thanks @VIGNESH.M  i did not try this . I will give this a try

Highlighted
Master Anaplanner/Community Boss

Re: Module or line item id using restful API

@karank ,

 

Not sure if this helps you, but you may want to use the Code of the line item:

 

https://help.anaplan.com/anapedia/Content/Modeling/Build%20Models/Blueprint.html#Code

 

Hope this helps,

 

Rob

Highlighted
Master Anaplanner/Community Boss

Re: Module or line item id using restful API

@rob_marshall  Thanks its a very good workaround however in my case it will not work as it has to be manually updated .  

Highlighted
Master Anaplanner/Community Boss

Re: Module or line item id using restful API

@VIGNESH.M 

 

I tried the api call you outlined above and it works 98% of the times thanks !!!! 

 

For some reasons it misses some the modules from a particular model ????

I cant figure out why it would omit just some modules . I have attached an output of what it misses  

 

cannot figure out a pattern may be you can throw some light 

 

Highlighted
Master Anaplanner/Community Boss

Re: Module or line item id using restful API

Just found out what it was . It was my access 😛

 

all good 

 

Thanks