Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
msperl
New Contributor

Fortimail API

Hello,

 

I'm planning to implement a portal for TLS enforcement. Therefore I need to get a List of all members of a specific email group (later I'll implement a kind of self-service portal for certain users to maintain this list).

What I currently have:

curl -k -b cookie.txt -H "Content-Type: application/json" -X GET -d '{"reqAction":0,"sortingDirection":2}' https://<my_fortimail&...omain>_TLS_enforce/

 

Unfortunately I'm only getting the objectID, the name and description of this email group but not the members which I'd need.

The API documentation doesn't help me either.

 

Thanks in advance!

5 REPLIES 5
MartienssenL
New Contributor

Hi

 

same problem here with email-address groups. Did you get it ?

 

greetings

lars

msperl

Problem still not solved...

Any suggestions?

If not possible, I'll go the ugly way with ssh and CLI commands.

MartienssenL

Hi

 

I found this for EmailAdressGroups

 

its for internal domain "a.com" and group "grp"

 

**CREATE**    curl -s -k -b cookie.txt -H 'Content-Type: application/json' -X POST -d ''  [link]https://$[/link]{FMLIP}/api/v1/Domain/a.com/ProfEmail_address_group/grp   **MODIFY Comment**    curl -s -k -b cookie.txt -H 'Content-Type: application/json' -X POST -d '{"reqAction" : 5, "comment" : "mycomment"}'  [link]https://$[/link]{FMLIP}/api/v1/Domain/a.com/ProfEmail_address_group/grp   **LIST Content**    curl -s -k -b cookie.txt -H "Content-Type: application/json" -X GET  [link]https://$[/link]{FMLIP}/api/v1/Domain/a.com/ProfEmail_address_group        curl -s -k -b cookie.txt -H 'Content-Type: application/json' -X POST -d '{"reqAction" : "1", "parent_mkey" : "grp", "mdomain" : "a.com"}'  [link]https://$[/link]{FMLIP}/api/v1/ProfEmail_address_groupEmailAddressGroupMember        curl -s -k -b cookie.txt -H 'Content-Type: application/json' -X POST -d '{"reqAction" : "1", "parent_mkey" : "grp" }'  [link]https://$[/link]{FMLIP}/api/v1/Domain/a.com/ProfEmail_address_groupEmailAddressGroupMemberCollection   **MODIFY Content** ADD    curl -s -k -b cookie.txt -H "Content-Type: application/json" -X POST [link]https://$[/link]{FMLIP}/api/v1/Domain/a.com/ProfEmail_address_group/grp/ProfEmail_address_groupEmailAddressGroupMember/a@a.com DELETE    curl -s -k -b cookie.txt -H "Content-Type: application/json" -X DELETE [link]https://$[/link]{FMLIP}/api/v1/Domain/a.com/ProfEmail_address_group/grp/ProfEmail_address_groupEmailAddressGroupMember/a@a.com   **DELETE curl -s -k -b cookie.txt -H 'Content-Type: application/json' -X DELETE -d ''  [link]https://$[/link]{FMLIP}/api/v1/Domain/a.com/ProfEmail_address_group/grp

 

greetings

lars

msperl

Thanks! 

I will try and report soon.

msperl

Works great! 

 

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors