Retrieving Item ID from Dimension ID (Transactional API) from model front-end
We have a current use case where we are retrieving module data for a specific object within a list, and achieving this through the use of the transactional APIs (querying the view). We have the view structured such that the dimension for the object that we want to retrieve is in the "Pages" segment of the view. This then allows us to specify a specific item ID for that dimension. We trigger this via a weblink that is published to the front end, that triggers a GET request, where the code of the item is part of the parameters of the call.
Retrieving the specific item ID however is a bit of a pain, as we are then required to loop through the returned list of item IDs from the /dimension/<dim_id>/items call, using the code of the item that was previously sent as a parameter. We've thought about caching the results, such that we do not always have to run through the full list of item IDs, but was wondering if there were any other ways that people have implemented.
We've found that there's a specific pattern for numbered lists (the Item IDs are formatted in a way that it's some dimension ID, and then the internal Anaplan ID (#, but is there anyway to get the item ID from the model itself?
If I understand the question correctly there is an item LIST in a module and you want to obtain the CODE in your export file. I'm also assuming that you want this in the same export that you have today vs using a system module that contains the item properties, such as CODE (this would be best practice)
In your module, add a line item subsidiary view that only uses the item LIST in the "applies to", formatted as text, and it's function is CODE(ITEM([Name of your item LIST])
add this line item to your saved view that you are using for the export
Manually run the export using the same name of the action that you refer to in the RESTful API, and make sure you run it as "EVERYONE"
Try your Export/Download API request again.
Hope this is what you're after. If not, send another message.