You can upload a snapshot to the EcoStruxure Machine Advisor Code Analysis portal:
With your personal user account.
Refer to Create a Snapshot and Upload (with Personal User Account).
With a technical user account (access token).
You can create a technical user (access token) that is allowed to upload a snapshot for one specific analysis project. For example, for CI-Systems (Continuous Integration Systems), it is possible to upload snapshots via Python scripts.
Click
to open this window.
Step |
Action |
---|---|
1 |
Enter a . |
2 |
Select an . After this date, the access token cannot be used to upload a snapshot. |
3 |
Click the button.Result: A window is displayed which provides the access token as a character string. |
4 |
Retain this string in a secure manner because the string is provided only once. |
5 |
the window. Result: A new row is displayed in the table. |
You can use the token (saved character string) to log into the EcoStruxure Machine Advisor Code Analysis portal via a Python script.
Example of a Python script:
# application object searched
app = projects.primary.find("Application", True)[0]
# full analysis will be executed
app.code_analysis.perform_full_analysis()
#login
projects.primary.code_analysis.portal.login
('eyJVcmwiOiJodHRwczovL2Vjb3N0cnV4dXJlLW1hY2hpbmUtYWR2aXNvci1jb2RlYW5h'
+'bHlzaXMuc2UuYXBwIiwiQ2xpZW50SWQiOiJlNWM5aDI4ODdiZDV3YWZiajlpMWw5N2Zl'
+'NDMwZGNqOSIsIkNsaWVudFNlY3JldCI6Ijc2U1VBWkNVU0VEUDExMTExMTExIn0='
)
app.code_analysis.portal.snapshots.upload("mySnapshot")
# logout
app.code_analysis.portal.logout()
Result: After executing the Python script, the uploaded snapshot is displayed in the overview.