Fortinet Document Library

Version:

Version:

Version:


Table of Contents

Administration Guide

Download PDF
Copy Link

Add or update a user - JSON/XML

Add or update a user.

https://<servername>:8443/api/user/

Return value

Type

Description

Id

Integer

User record ID

adminProfile

String

User's admin profile

address

String

User's street address

city

String

User's city

email

String

Email address

firstName

String

First name

lastName

String

Last name

mobileNumber

String

Mobile phone number

mobileProvider

String

Mobile phone service provider

phone

String

Phone number

role

String

User's role

type

String

User Record Type (possible values: User or Administrative)

userId

String

User name

zipCode

String

User's zip code

Example request

curl -k -u '<userId>:<password>' -H "accept: application/json" -H "content-type: application/json" -X POST -d '{"userId":"bigT","lastName":"Tutone"}' https://<servername>/api/user

curl -k -u '<userId>:<password>' -H "accept: application/xml" -H "content-type: application/xml" -X POST -d '<user><lastName>Tutone</lastName><role>NAC-Default</role><userId>bigT</userId></user>' https://<servername>/api/user

Example XML format:

<userResult>

<status>success</status>

<users>

<user>

<id>45</id>

<lastName>Tutone</lastName>

<role>NAC-Default</role>

<userId>bigT</userId>

</user>

</users>

</userResult>

Add or update a user - JSON/XML

Add or update a user.

https://<servername>:8443/api/user/

Return value

Type

Description

Id

Integer

User record ID

adminProfile

String

User's admin profile

address

String

User's street address

city

String

User's city

email

String

Email address

firstName

String

First name

lastName

String

Last name

mobileNumber

String

Mobile phone number

mobileProvider

String

Mobile phone service provider

phone

String

Phone number

role

String

User's role

type

String

User Record Type (possible values: User or Administrative)

userId

String

User name

zipCode

String

User's zip code

Example request

curl -k -u '<userId>:<password>' -H "accept: application/json" -H "content-type: application/json" -X POST -d '{"userId":"bigT","lastName":"Tutone"}' https://<servername>/api/user

curl -k -u '<userId>:<password>' -H "accept: application/xml" -H "content-type: application/xml" -X POST -d '<user><lastName>Tutone</lastName><role>NAC-Default</role><userId>bigT</userId></user>' https://<servername>/api/user

Example XML format:

<userResult>

<status>success</status>

<users>

<user>

<id>45</id>

<lastName>Tutone</lastName>

<role>NAC-Default</role>

<userId>bigT</userId>

</user>

</users>

</userResult>