1

Topic: Restful API - Create Mail User not working in v2.7.0

==== Required information ====
- iRedMail version (check /etc/iredmail-release): v0.9.5-1
- Linux/BSD distribution name and version: Centos6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes     v2.7.0 (LDAP)
- Related log if you're reporting an issue:
====

Create Mail User API call working in previous version, not working in v2.7.0

This is the syntax of the API call:

$exec_cmd = 'curl -X POST -i -b '.$cookie_jar.' -k -d "cn='.$cn.'&password=password&language=en_US&quota=32" https://mx1.mydomain.com/iredadmin/api/user/'.$cc.'@archive.mydomain.com';

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Restful API - Create Mail User not working in v2.7.0

A wrong parameter name: not "cn", but "name".

3

Re: Restful API - Create Mail User not working in v2.7.0

Was this a change from the previous version of the API? This has worked up until I installed the new version of iRedAdmin.

4

Re: Restful API - Create Mail User not working in v2.7.0

We have 3 parameter names changed in new iRedAdmin-Pro release, mentioned in the ChangeLog section:
http://www.iredmail.org/docs/iredadmin- … #changelog

* Variable names in returned JSON data has been changed to: {'_success': ..., '_msg': ...} (was {'success': ..., 'msg': ...}).
* Some variable names have been renamed:
  - cn -> name
  - mailQuota -> quota
  - preferredLanguage -> language