Fortinet Document Library

Version:

Version:

Version:


Table of Contents

REST API Solution Guide

Download PDF
Copy Link

FortiGuard messaging (/fortiguardmessages/)

URL:  https://[server_name]/api/[api_version]/fortiguardmessages/

This endpoint is used to query FortiGuard Messaging (SMS) license status including the number of messages in the licenses and the number of messages in total available for use. It's also used to activate a FortiGuard Messaging (SMS) license.

Supported fields

Field Display name Type Required Other restrictions
license FortiGuard Messaging license string Yes Only valid in POST method.
total_sms Total number of SMS messages in the license integer No Read-only field returned by the GET method.
used_sms Number of SMS messages that have been used integer No Read-only field returned by the GET method.
available_sms Number of SMS messages available for future use integer No Read-only field returned by the GET method.

Allowed methods

HTTP method Resource URI Action Note
GET /api/v1/fortiguardmessages/ Get FortiGaurd Messaging statistics. Returns total_sms, used_sms, and available_sms fields.
POST /api/v1/fortiguardmessages/ Activate FortiGuard Messaging license. Requires license field.

Examples

Get fortiguardmessages stats:

 

curl -k -v \

-u "webadmin:[hash]" \

https://[FAC_IP]/api/v1/fortiguardmessages/

 

Response : {"available_sms": ###, "total_sms": ###, "used_sms": ###}

 

Activate a license:

 

curl -k -v -X POST \

https://[FAC_IP]/api/v1/fortiguardmessages/ \

-H 'Content-Type: application/json' \

-u "webadmin:[hash]" \

-d '{"license": "####-####-####-####-####"}'

 

Note: Used valid licenses will return a success response, but will not add SMS

FortiGuard messaging (/fortiguardmessages/)

URL:  https://[server_name]/api/[api_version]/fortiguardmessages/

This endpoint is used to query FortiGuard Messaging (SMS) license status including the number of messages in the licenses and the number of messages in total available for use. It's also used to activate a FortiGuard Messaging (SMS) license.

Supported fields

Field Display name Type Required Other restrictions
license FortiGuard Messaging license string Yes Only valid in POST method.
total_sms Total number of SMS messages in the license integer No Read-only field returned by the GET method.
used_sms Number of SMS messages that have been used integer No Read-only field returned by the GET method.
available_sms Number of SMS messages available for future use integer No Read-only field returned by the GET method.

Allowed methods

HTTP method Resource URI Action Note
GET /api/v1/fortiguardmessages/ Get FortiGaurd Messaging statistics. Returns total_sms, used_sms, and available_sms fields.
POST /api/v1/fortiguardmessages/ Activate FortiGuard Messaging license. Requires license field.

Examples

Get fortiguardmessages stats:

 

curl -k -v \

-u "webadmin:[hash]" \

https://[FAC_IP]/api/v1/fortiguardmessages/

 

Response : {"available_sms": ###, "total_sms": ###, "used_sms": ###}

 

Activate a license:

 

curl -k -v -X POST \

https://[FAC_IP]/api/v1/fortiguardmessages/ \

-H 'Content-Type: application/json' \

-u "webadmin:[hash]" \

-d '{"license": "####-####-####-####-####"}'

 

Note: Used valid licenses will return a success response, but will not add SMS