The purpose of this Transactional API tutor script based on Python is to facilitate the learning process of Transactional API Calls using the Anaplan platform. This version contemplates the most common Transactional API calls until November 09, 2020.
Download the Python Script file using the file attachment located to the right of this article.
Steps to use it:
Example:
Close that window by clicking on the red x at the top left corner and continue the interaction with the API Transactional Tutor according to the script execution.
Feel free to post your feedback and suggestions in the comments below. I am more than happy to hear from you about your experience using the Python-based Transactional API Tutor script.
Additional Reference: Anaplan Integration API V2 Guide and Reference
What a great feature! We used to have a WS allowance issues on several workspaces and I always wanted to set up automated monitoring with alert in case some limits are reached.
I found a workaround with getting that data from hypercare models though.
Thank you for your feedback on that @Hayk! I do appreciate it.
Willians.s
This is very helpful, Thank you very much
Only one thing we need to add is , if the private is key is protected with passphrase then we need to pass the passphrase as byte string to the load certificate method
ex:
key = crypto.load_privatekey(crypto.FILETYPE_PEM, anaplan_private_certificate, (keyphrase.encode()))
Thank you
Mohan
Thank you for your feedback and comment on that @timmapuramreddy! I do appreciate it.
Hi,
I'm looking at the code you posted in the attachment after the authentication. Could you expand on what it is doing please? I couldn't see where elementID was declared.
for index in range(0, NumberOfItems): # Key commands each step of the operation key = keyword[index] # Generate the set of IDs at the runtime their values are available if key == 'workspaces': workspaceID = elementID elif key == 'models': modelID = elementID elif key == 'modules': moduleID = elementID elif key == 'views': viewID = elementID else: noelementID = 'true' # Generate the API Call URLs if index==0: url[index]='workspaces?tenantDetails=true' elif index==1:url[index]='workspaces/' + workspaceID + '?tenantDetails=true' elif index==2:url[index]='models' elif index==3:url[index]='workspaces/' + workspaceID + '/models/' + modelID + '/currentperiod' elif index==4:url[index]='workspaces/' + workspaceID + '/models/' + modelID + '/currentperiod?date=' + today elif index==5:url[index]='models/' + modelID + '/modules' elif index==6:url[index]='models/' + modelID + '/views' elif index==7:url[index]='models/' + modelID + '/views/' + viewID elif index==8:url[index]='models/' + modelID + '/views/' + viewID + '/data?' elif index==9:url[index]='models/' + modelID + '/processes' else:print('Index out of bond') # Define Current URL current_url = anaplan_api_url + url[index]
thanks
Josh
Hi @joshuastockwell ,
How are you doing? I hope you are having a great day!
Yes.
The variable elementID is reset for every single for loop iteration according to the following instruction:
elementID = container[currentElement[0]]['id']
The goal is to ensure that this script is dynamic enough for all the element types it goes through modules, views, etc.
Please, let me know if it works for you.
Best Regards,
Willians
Check out the latest Anaplan feature updates and enhancements in our August 2025 official release notes. The information below offers supplemental information to that post. Planning experience Multi-browser tab syncing When changing context or data on a UX page, you can now view real-time data updates across up to five…
Check out the latest Anaplan feature updates and enhancements in our July 2025 official release notes. The information below offers supplemental information to that post. Planning experience External URL navigation button Page builders can configure navigation action buttons to link to external URLs, including non-Anaplan…