Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Kopdar Zimbra-ID , How to use Zimbra SOAP API

163 Aufrufe

Veröffentlicht am

This slide contain how to use Zimbra SOAP API (with example) once as a speaker in Indonesia Zimbra Community

Veröffentlicht in: Technologie
  • Als Erste(r) kommentieren

  • Gehören Sie zu den Ersten, denen das gefällt!

Kopdar Zimbra-ID , How to use Zimbra SOAP API

  1. 1. How to Use Zimbra SOAP API by: Imam Omar mochtar kopdarZimbraID#1 31-08-2019 @kedaiJadoel
  2. 2. > whoami ● Father of one beloved daughter and wife (for now). ● Working as IT consultant with “PALUGADA” oriented. ● Love to Code, commonly Python chosen as my swiss army knife. ● Hold several IT certificates one of them is Zimbra Admin.
  3. 3. What Is SOAP anyway ? and how it related to Zimbra ?
  4. 4. SOAP (Simple Object Access Protocol) ● (Old) A Web Service. ● Through HTTP and POST method to exchange the data. ● Commonly using XML for message format. *In a glance
  5. 5. Example Request Response
  6. 6. SOAP in Zimbra
  7. 7. Preparation
  8. 8. 1. RTFM
  9. 9. 2. See How to Compose and Receive the Payload
  10. 10. 3. Get SOAP End Point ● Admin namespace https://[SERVER]/:7071/service/admin/soap ● Non admin namespace https://[SERVER]/service/soap Under the hood
  11. 11. 4. Choose the Arsenal (HTTP Client)
  12. 12. Using Zimbra API
  13. 13. 1. Get the token Request Response Login Token Lifetime in milliseconds, 12 hours as default Namespace Note: ● You can extend token lifetime by modify zimbraAdminAuthTokenLifetime ● zmprov using zimbra_user and zimbra_ldap_password for login ● We will use token for next request, if it was expired then refetch again.
  14. 14. Hint: you can use JSON though
  15. 15. Hint: you can use JSON though (cont’d) Note: ● Set Content-Type header to application/json. ● The returned content also as JSON.
  16. 16. 2. Add Payload and Set Token in Header Token
  17. 17. Hint: zmsoap can be useful Note: ● Use argument -vv to print out the SOAP request and response. ● You can also change the format to JSON instead XML by argument --json. ● -z is for authenticated as admin, you can specify user & password too by -a for user and -p for password. ● Use -t to specify the scoop / namespace, the default is admin. ● Set “as user” by using argument -m.
  18. 18. Demo
  19. 19. 1. Scripting, Usecase: Bulk Set User Attributes and Renaming Account. The sequences are: 1. Loop through csv file, first column is existing email, the second one is new email. 2. Make sure the account is exist. 3. Rename account for prevent duplicated account while in process. 4. Add existing email as alias. 5. Set existing email in canonical address (outgoing email masking). 6. Rename account to actual new email.
  20. 20. Hint: Java is Fast But it Slow to Start. It’s Fast brah ….
  21. 21. 2. Identity and Access Management (IAM) Integration.
  22. 22. Question ?
  23. 23. Contact: iomarmochtar@gmail.com iomarmochtar (github, telegram) Blog: https://blog.mochtar.net

×