Skip to main content
aelkadi
Staff
Staff
May 13, 2026

Technical Tip: How to create a user admin group on FortiWeb using REST API

  • May 13, 2026
  • 0 replies
  • 43 views

Description


This article describes how to create a user admin group on FortiWeb using the REST API.


Scope


FortiWeb.


Solution


Before issuing the API call, generate a Base64-encoded token for the Authorization header. This token is used to authenticate with FortiWeb. To generate the encoded token, visit Base64 Encode and Decode - Online.


  1. Obtain the CURL Commands by following the steps in this guide: Technical Tip: How to use browsers to obtain curl commands for testing.


807dfd2a.jpg


  1. Prepare Authorization Token:
    Encode the ForitWeb credentials in BASE64 format to use as an Authorization token.
    Example: {"username":"admin","password":"password1234","vdom":"root"}.


29384f3e.jpg


  1. Set Up Postman:
    Open Postman and create a new request.
    Select the POST method.


  1. Define API URL:
    Use the appropriate API endpoint for creating Admin User Group. Replace <FWB-IP> and <port> with the FortiWeb IP address and source port.
    Example URL: https://<FWB-IP>:<port>/api/v2.0/cmdb/user/admin-usergrp.


  1. Set Headers:
    Add the Authorization header with the encoded token.
    Example: Authorization: <encoded_token>.


  1. Send the Request: Select Send to create the Admin User Group.

The result should look like this:


curl 'https://<FWB-IP>:<port>/api/v2.0/cmdb/user/admin-usergrp' \
  -X POST \
  -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: en-US,en;q=0.9' \
  -H 'Accept-Encoding: gzip, deflate, br, zstd' \
  -H 'Content-Type: application/json;charset=utf-8' \
  -H 'Authorization: <encoded-token>' \
  --data-raw '{"data":{"q_type":1,"name":"Test_Admin_User","sz_members":-1}}'


a1602618.jpg