Intersight now features a Code Generator that will create Python or PowerShell code from UI actions. Details on using the feature are at https://us-east-1.intersight.com/help/saas/resources/cisco_intersight_code_generator, and there's a video demo of generating PowerShell code at https://youtu.be/-asCSzUmr18.
You can launch the Code Generator from the help (?) icon in Intersight's UI:

For additional information on Intersight's API including Code Samples and Downloads with links to examples, please visit https://intersight.com/apidocs.