Fortinet white logo
Fortinet white logo

Rest API

7.2.0

Post /user/{id}

Post /user/{id}

Description

Adds a new user record to the database.

Request Parameter

Id, the user record DBID.

Request Headers

Key

Value

Type

Description

Authorization Bearer <Authorization Token> String Authorization credential generated by FortiNAC
Content-Type (option 1) application/json String

Content-Type (option 2)

application/xml

Sample Request

Request URL

POST https://10.106.94.152:8443/api/v2/user/3

Request Header

Authorization: Bearer <Authorization_Token>

Content-Type: application/json

Request Body

{

"landscape": 0,

"id": 3,

"role": "string",

"directoryPolicyValue": "string",

"firstName": "string",

"lastName": "string",

"dn": "string",

"position": "string",

"email": "string",

"state": "string",

"userID": "string",

"password": "string",

"status": 0,

"notes": "string",

"language": "string",

"country": "string",

"version": 0,

"packedVersion": 0,

"creationTime": "2024-02-21T18:19:09.436Z",

"validForTime": "2024-02-21T18:19:09.436Z",

"validForInactivityDays": 0,

"validForInactivityAgeTime": 0,

"lastActivityTime": 0,

"address": "string",

"city": "string",

"mailState": "string",

"zipCode": "string",

"phone": "string",

"organization": "string",

"organizationalUnit": "string",

"type": "string",

"attributes": [

{

"version": 0,

"name": "string",

"value": {}

}

],

"adminProfileId": 0,

"guestId": 0,

"mobileNumber": "string",

"mobileProvider": "string",

"ncmPropagateHosts": true,

"lastModifiedBy": "string",

"lastModifiedDate": "2024-02-21T18:19:09.436Z",

"isApiAdmin": true,

"apiAccessToken": "string",

"trustedHosts": "string",

"guestContractor": true,

"locale": {

"script": "string",

"country": "string",

"variant": "string",

"extensionKeys": [

"string"

],

"unicodeLocaleAttributes": [

"string"

],

"unicodeLocaleKeys": [

"string"

],

"iso3Language": "string",

"iso3Country": "string",

"displayLanguage": "string",

"displayScript": "string",

"displayCountry": "string",

"displayVariant": "string",

"displayName": "string",

"language": "string"

},

"adminUser": true,

"validTime": 0,

"auditObjectName": "string",

"auditObjectType": {

"auditTableName": "string",

"mysqlTableName": "string",

"idnameQuery": "string"

},

"addAuditSummary": "string",

"currentEnvironment": {

"additionalProp1": "string",

"additionalProp2": "string",

"additionalProp3": "string"

},

"deleteHostsUponExpiration": true,

"iconType": "string",

"disabled": true,

"directoryDisabled": true,

"apiAdmin": true,

"superUser": true,

"validForTimeMS": 0,

"passwordFromRaw": "string",

"userAdministrator": true,

"userOperator": true,

"userHelpDesk": true,

"userAdministrative": true,

"hashedPassword": "string",

"maxAllowedHosts": 0,

"creationEvent": {

"landscape": 0,

"id": 0,

"state": "string",

"name": "string",

"elementType": "string",

"elementID": 0,

"elementName": "string",

"message": "string",

"timeOfEvent": "2024-02-21T18:19:09.436Z",

"version": 0,

"log": true,

"time": 0,

"eventFormatString": "string",

"empty": true

},

"destroyEvent": {

"landscape": 0,

"id": 0,

"state": "string",

"name": "string",

"elementType": "string",

"elementID": 0,

"elementName": "string",

"message": "string",

"timeOfEvent": "2024-02-21T18:19:09.436Z",

"version": 0,

"log": true,

"time": 0,

"eventFormatString": "string",

"empty": true

},

"establishedEvent": {

"landscape": 0,

"id": 0,

"state": "string",

"name": "string",

"elementType": "string",

"elementID": 0,

"elementName": "string",

"message": "string",

"timeOfEvent": "2024-02-21T18:19:09.436Z",

"version": 0,

"log": true,

"time": 0,

"eventFormatString": "string",

"empty": true

},

"lostEvent": {

"landscape": 0,

"id": 0,

"state": "string",

"name": "string",

"elementType": "string",

"elementID": 0,

"elementName": "string",

"message": "string",

"timeOfEvent": "2024-02-21T18:19:09.436Z",

"version": 0,

"log": true,

"time": 0,

"eventFormatString": "string",

"empty": true

},

"name": "string"

}

Sample Response

{

"status": "success",

"errorMessage": null

}

Post /user/{id}

Post /user/{id}

Description

Adds a new user record to the database.

Request Parameter

Id, the user record DBID.

Request Headers

Key

Value

Type

Description

Authorization Bearer <Authorization Token> String Authorization credential generated by FortiNAC
Content-Type (option 1) application/json String

Content-Type (option 2)

application/xml

Sample Request

Request URL

POST https://10.106.94.152:8443/api/v2/user/3

Request Header

Authorization: Bearer <Authorization_Token>

Content-Type: application/json

Request Body

{

"landscape": 0,

"id": 3,

"role": "string",

"directoryPolicyValue": "string",

"firstName": "string",

"lastName": "string",

"dn": "string",

"position": "string",

"email": "string",

"state": "string",

"userID": "string",

"password": "string",

"status": 0,

"notes": "string",

"language": "string",

"country": "string",

"version": 0,

"packedVersion": 0,

"creationTime": "2024-02-21T18:19:09.436Z",

"validForTime": "2024-02-21T18:19:09.436Z",

"validForInactivityDays": 0,

"validForInactivityAgeTime": 0,

"lastActivityTime": 0,

"address": "string",

"city": "string",

"mailState": "string",

"zipCode": "string",

"phone": "string",

"organization": "string",

"organizationalUnit": "string",

"type": "string",

"attributes": [

{

"version": 0,

"name": "string",

"value": {}

}

],

"adminProfileId": 0,

"guestId": 0,

"mobileNumber": "string",

"mobileProvider": "string",

"ncmPropagateHosts": true,

"lastModifiedBy": "string",

"lastModifiedDate": "2024-02-21T18:19:09.436Z",

"isApiAdmin": true,

"apiAccessToken": "string",

"trustedHosts": "string",

"guestContractor": true,

"locale": {

"script": "string",

"country": "string",

"variant": "string",

"extensionKeys": [

"string"

],

"unicodeLocaleAttributes": [

"string"

],

"unicodeLocaleKeys": [

"string"

],

"iso3Language": "string",

"iso3Country": "string",

"displayLanguage": "string",

"displayScript": "string",

"displayCountry": "string",

"displayVariant": "string",

"displayName": "string",

"language": "string"

},

"adminUser": true,

"validTime": 0,

"auditObjectName": "string",

"auditObjectType": {

"auditTableName": "string",

"mysqlTableName": "string",

"idnameQuery": "string"

},

"addAuditSummary": "string",

"currentEnvironment": {

"additionalProp1": "string",

"additionalProp2": "string",

"additionalProp3": "string"

},

"deleteHostsUponExpiration": true,

"iconType": "string",

"disabled": true,

"directoryDisabled": true,

"apiAdmin": true,

"superUser": true,

"validForTimeMS": 0,

"passwordFromRaw": "string",

"userAdministrator": true,

"userOperator": true,

"userHelpDesk": true,

"userAdministrative": true,

"hashedPassword": "string",

"maxAllowedHosts": 0,

"creationEvent": {

"landscape": 0,

"id": 0,

"state": "string",

"name": "string",

"elementType": "string",

"elementID": 0,

"elementName": "string",

"message": "string",

"timeOfEvent": "2024-02-21T18:19:09.436Z",

"version": 0,

"log": true,

"time": 0,

"eventFormatString": "string",

"empty": true

},

"destroyEvent": {

"landscape": 0,

"id": 0,

"state": "string",

"name": "string",

"elementType": "string",

"elementID": 0,

"elementName": "string",

"message": "string",

"timeOfEvent": "2024-02-21T18:19:09.436Z",

"version": 0,

"log": true,

"time": 0,

"eventFormatString": "string",

"empty": true

},

"establishedEvent": {

"landscape": 0,

"id": 0,

"state": "string",

"name": "string",

"elementType": "string",

"elementID": 0,

"elementName": "string",

"message": "string",

"timeOfEvent": "2024-02-21T18:19:09.436Z",

"version": 0,

"log": true,

"time": 0,

"eventFormatString": "string",

"empty": true

},

"lostEvent": {

"landscape": 0,

"id": 0,

"state": "string",

"name": "string",

"elementType": "string",

"elementID": 0,

"elementName": "string",

"message": "string",

"timeOfEvent": "2024-02-21T18:19:09.436Z",

"version": 0,

"log": true,

"time": 0,

"eventFormatString": "string",

"empty": true

},

"name": "string"

}

Sample Response

{

"status": "success",

"errorMessage": null

}