Hello,
i believe you mixed up the different ways to leverage the api.
"add-access-rule" uses web service
"add access-rule" uses the mgmt cli (which is calling API too but is called via cli at management server)
you can switch between them in the documentation - see attached screenshot.
When you are logging in into the API, a session id is generated and sent back to you as response. This session id you will need to add at the following request´s header.
Example for callin web API with SDK:
with APIClient(client_args) as client:
# If Error occurs due to fingerprint mismatch
if client.check_fingerprint() is False:
#output_text.update({"Message":"Could not get the server's fingerprint - Check connectivity with the server."})
print("UNKNOWN! Logging into SMS not successful! Please troubleshoot/debug script! "+str(output_text))
raise SystemExit()
# login to server:
login_res = client.login(api_user, api_pwd)
so:
documentation is acurate - when using the correct way to call the api
SDK simplifies things like session handling - to understand all the things, you can manually write https requests towards the API with correct headers and so.
in case you need help, feel free to reach out