Hot!FML Rest API email address group

Author
shkim
New Member
  • Total Posts : 10
  • Scores: 0
  • Reward points: 0
  • Joined: 2018/05/31 00:45:58
  • Status: offline
2018/05/31 00:59:24 (permalink) FortiMail
0

FML Rest API email address group

Hi,
 
I want to create an "email address group" using REST API.
I created "Group" but I do not know how to add "Member".
Thank you for your advice.
 
Thanks.
#1
MartienssenL
New Member
  • Total Posts : 4
  • Scores: 0
  • Reward points: 0
  • Joined: 2017/07/06 03:53:53
  • Status: offline
Re: FML Rest API email address group 2018/11/27 01:22:44 (permalink)
0
Hi
 
did you get a solution ?
 
greetings
lars
#2
shkim
New Member
  • Total Posts : 10
  • Scores: 0
  • Reward points: 0
  • Joined: 2018/05/31 00:45:58
  • Status: offline
Re: FML Rest API email address group 2018/12/04 00:56:16 (permalink)
0
Hi,
 
I am still looking for documents.
I am contacting "Fortinet" but have not received an answer.
 
There are many other "API" to check.
 
post edited by shkim - 2018/12/04 00:57:24
#3
Carl Windsor_FTNT
Fortinet
  • Total Posts : 222
  • Scores: 36
  • Reward points: 0
  • Joined: 2012/05/02 03:09:16
  • Location: United Kingdom
  • Status: offline
Re: FML Rest API email address group 2018/12/04 09:52:41 (permalink)
0
>I am still looking for documents.
 
Did you find the FortiMail API Guide?
 
 

Carl Windsor
Senior Director, Product Management
Fortinet
#4
shkim
New Member
  • Total Posts : 10
  • Scores: 0
  • Reward points: 0
  • Joined: 2018/05/31 00:45:58
  • Status: offline
Re: FML Rest API email address group 2018/12/04 16:34:14 (permalink)
0
Hi,
 
"email address group", "ip address group", and other commands were not found.
This does not exist in the API documentation.
 
Thanks
#5
MartienssenL
New Member
  • Total Posts : 4
  • Scores: 0
  • Reward points: 0
  • Joined: 2017/07/06 03:53:53
  • Status: offline
Re: FML Rest API email address group 2018/12/06 04:52:07 (permalink)
0
creating emailaddress group is working here with api/v1//ProfEmail_address_group/. But i cant add member to it.
 
greetings
lars
#6
Frank
New Member
  • Total Posts : 2
  • Scores: 0
  • Reward points: 0
  • Joined: 2014/11/03 05:00:07
  • Location: the Netherlands
  • Status: offline
Re: FML Rest API email address group 2018/12/07 02:33:33 (permalink)
0
Hi,
 
We had the same question. It's not documented. Got this from Fortinet:
 
In the example bellow I am managing a group called grp for a domain a.com where I am handling a@a.com
 
**CREATE**
   curl -s -k -b cookie.txt -H 'Content-Type: application/json' -X POST -d ''  https://${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"}'  https://${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  https://${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"}'  https://${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" }'  https://${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 https://${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 https://${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 ''  https://${FMLIP}/api/v1/Domain/a.com/ProfEmail_address_group/grp
#7
MartienssenL
New Member
  • Total Posts : 4
  • Scores: 0
  • Reward points: 0
  • Joined: 2017/07/06 03:53:53
  • Status: offline
Re: FML Rest API email address group 2018/12/07 03:30:35 (permalink)
0
thats it !
 
many thanks.
 
greetings
lars
#8
emnoc
Expert Member
  • Total Posts : 5082
  • Scores: 311
  • Reward points: 0
  • Joined: 2008/03/20 13:30:33
  • Location: AUSTIN TX AREA
  • Status: offline
Re: FML Rest API email address group 2018/12/07 11:51:17 (permalink)
0
Good Job  Frank, but I believe the modify actions should be PUT so a -X PUT in your above actions.
 
General rule of thumb 
 
http.request.method GET =  retrieve something if available
http.request.method DELETE =  delete something existing
http.request.method PUT =  modify something existing
http.request.method POST =  add something that does NOT exist
http.request.method OPTIONS = review what support options exist for that URL
 
Ken Felix
 
post edited by emnoc - 2018/12/07 11:54:12

PCNSE,  NSE , Forcepoint ,  StrongSwan Specialist
#9
Jump to:
© 2018 APG vNext Commercial Version 5.5