New feature: HTTP API

Michael Slusarz michael.slusarz at dovecot.fi
Tue May 24 18:38:55 UTC 2016


> 
>     On May 24, 2016 at 12:20 PM Peer Heinlein <p.heinlein at heinlein-support.de> wrote:
> 
>     Thanks for the new HTTP API.
> 
>     I get the API with some commands up and running, but I'm still not able
>     to create folder.
> 
>     curl -k -H "Content-Type: application/json" -H "Authorization: Basic
>     secret" -d
>     '[["mailboxCreate",{"user":"user at example.org","mailbox":["INBOX/TEST"]},c01]]'
>     https://xxx.xxx.xxx.xxx.:8080/doveadm/v1
> 

The identifier is a JSON string (c01) and needs to be in quotes, at a minimum.

> 
>     and also
> 
>     curl -k -H "Content-Type: application/json" -H "Authorization: Basic
>     secret" -d
>     '[["mailboxList",{"user":"user at example.org","mailboxMask":["INBOX/TEST"]},c01]]'
>     https://xxx.xxx.xxx.xxx.:8080/doveadm/v1
> 
>     doesn't work.
> 
>     It /should/ create INBOX/TEST -- but doveadm always says it's "Invalid
>     JSON input".
> 
>     What am I doing wrong?
> 

michael


More information about the dovecot mailing list