REST API - How can get contact with contact folder

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
Post Reply
eggeggeg
Posts: 1
Joined: Tue Apr 06, 2021 6:00 am

REST API - How can get contact with contact folder

Post by eggeggeg »

I want to get all Contacts with all contacts folder

my contacts folder is

contacts
contacts/111
contacts/222

I can use the following to get contacts, but the contacts of 111 and 222 cannot get

Code: Select all

curl -k 'https://localhost:7071/home/user6@labtest.com/Contacts?fmt=json?auth=qp&zauthtoken=xxxxx'
I have to do this to get

Code: Select all

curl -k 'https://localhost:7071/home/user6@labtest.com/Contacts/111?fmt=json?auth=qp&zauthtoken=xxxxx'
curl -k 'https://localhost:7071/home/user6@labtest.com/Contacts/222?fmt=json?auth=qp&zauthtoken=xxxxx'
I tried this method but it doesn't work

Code: Select all

curl -k 'https://localhost:7071/home/user6@labtest.com/Contacts?query=under:Contacts&fmt=json?auth=qp&zauthtoken=xxxxx'
Damini Vashishtha
Zimbra Employee
Zimbra Employee
Posts: 32
Joined: Tue Oct 18, 2022 12:16 pm

Re: REST API - How can get contact with contact folder

Post by Damini Vashishtha »

To retrieve the contacts of 'contacts + all sub-folders' :
"query=under:Contacts&meta=1"
Example:
curl -k 'https://localhost:7071/home/user6@labte ... oken=xxxxx'
Last edited by Damini Vashishtha on Fri May 05, 2023 4:00 pm, edited 1 time in total.
Post Reply