FortiManager icon

FortiManager

Interact with FortiManager API

Firewall → Create Service

AI-generated

Summary

Create a firewall service object on FortiManager

Inputs

  • domain (required) — Domain of FortiManager API to operate on
  • adom (required) — Administrative Domain name
  • serviceName (required) — Name of the service object
  • protocol (required) — Protocol type for the service
  • tcpPortRange — TCP port range (e.g., "80", "443:445", "8000-9000")
  • udpPortRange — UDP port range (e.g., "53", "500:4500")
  • sctpPortRange — SCTP port range (e.g., "9999")
  • icmpType — ICMP type number (e.g., 8 for echo request)
  • icmpCode — ICMP code number
  • protocolNumber — IP protocol number (e.g., 47 for GRE, 50 for ESP)
  • comment — Comment for the service object
  • category — Service category
  • color — Color code for GUI display (0-32)

Output shape

a list containing the created service object

On success the response includes the created service details; on error an object with an error message may be returned

Examples

Example 1: Add a TCP service named "HTTP" on ADOM "root" using Policy Manager domain

{ "domain": "pm", "adom": "root", "serviceName": "HTTP", "protocol": "TCP/UDP/SCTP", "additionalFields": { "tcpPortRange": "80" } }

Discussion