Fortinet white logo
Fortinet white logo

Rest API

7.2.0

Post /user/current-session/initialize-root-user

Post /user/current-session/initialize-root-user

Description

Performs a login which accepts the Acceptable Usage Policy. The login step must be repeated because the session is not valid until the Acceptable Usage Policy is accepted.

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

Request Body Parameters

Name

Required

Type

user Required String

password

Required

String

newUserIdD

Required

String

newPassword

Required

String

Sample Request

Request URL

POST https://10.106.94.152:8443/api/v2/user/current-session/accept-usage-policy

Request Header

Authorization: Bearer <Authorization_Token>

Content-Type: application/json

Request Body

user: xxxx

password: xxxxxx

newUserID: xxxxx

newPassword: xxxxx

Sample Response

{

"status": "string",

"errorMessage": "string",

"sessionKey": "string",

"userRecord": {

"landscape": 0,

"id": 0,

"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-16T16:43:02.495Z",

"validForTime": "2024-02-16T16:43:02.495Z",

"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-16T16:43:02.495Z",

"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,

"auditObjectName": "string",

"auditObjectType": {

"auditTableName": "string",

"mysqlTableName": "string",

"idnameQuery": "string"

},

"addAuditSummary": "string",

"deleteHostsUponExpiration": true,

"iconType": "string",

"disabled": true,

"directoryDisabled": true,

"apiAdmin": true,

"superUser": true,

"validForTimeMS": 0,

"userAdministrator": true,

"userOperator": true,

"userHelpDesk": true,

"userAdministrative": true,

"maxAllowedHosts": 0,

"creationEvent": {

"landscape": 0,

"id": 0,

"state": "string",

"name": "string",

"elementType": "string",

"elementID": 0,

"elementName": "string",

"message": "string",

"timeOfEvent": "2024-02-16T16:43:02.496Z",

"version": 0,

"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-16T16:43:02.496Z",

"version": 0,

"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-16T16:43:02.496Z",

"version": 0,

"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-16T16:43:02.496Z",

"version": 0,

"time": 0,

"eventFormatString": "string",

"empty": true

},

"name": "string"

},

"requiresSecondaryAuthentication": true,

"acceptedAUP": true,

"landingPage": "string",

"licenseExpired": true,

"systemRunning": true,

"needsNewPassword": true,

"licensed": true,

"adminProfile": {

"lastModifiedBy": "string",

"lastModifiedDate": "2024-02-16T16:43:02.496Z",

"global": true,

"administrator": true,

"isKioskMode": false,

"dbid": 0,

"name": "string",

"inactivityTime": 0,

"schedule": "string",

"kioskTemplateID": 0,

"kioskWelcomeMessage": "string",

"note": "string",

"landingPage": "string",

"manageByGroups": true,

"guid": 0,

"globalModifiedDate": "2024-02-16T16:43:02.496Z",

"preventAging": true,

"upgradePermissions": true,

"lockoutThreshold": 0,

"lockoutDuration": 0,

"permissions": {

"additionalProp1": {

"permissions": [

"string"

],

"displayName_API": "string",

"view": true,

"modify": true,

"remove": true,

"customized": true,

"allIDs": true,

"allowedViews": {

"additionalProp1": true,

"additionalProp2": true,

"additionalProp3": true

}

},

"additionalProp2": {

"permissions": [

"string"

],

"displayName_API": "string",

"view": true,

"modify": true,

"remove": true,

"customized": true,

"allIDs": true,

"allowedViews": {

"additionalProp1": true,

"additionalProp2": true,

"additionalProp3": true

}

},

"additionalProp3": {

"permissions": [

"string"

],

"displayName_API": "string",

"view": true,

"modify": true,

"remove": true,

"customized": true,

"allIDs": true,

"allowedViews": {

"additionalProp1": true,

"additionalProp2": true,

"additionalProp3": true

}

}

},

"ncmLandingPage": "string",

"scheduleStr": "string"

}

}

Post /user/current-session/initialize-root-user

Post /user/current-session/initialize-root-user

Description

Performs a login which accepts the Acceptable Usage Policy. The login step must be repeated because the session is not valid until the Acceptable Usage Policy is accepted.

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

Request Body Parameters

Name

Required

Type

user Required String

password

Required

String

newUserIdD

Required

String

newPassword

Required

String

Sample Request

Request URL

POST https://10.106.94.152:8443/api/v2/user/current-session/accept-usage-policy

Request Header

Authorization: Bearer <Authorization_Token>

Content-Type: application/json

Request Body

user: xxxx

password: xxxxxx

newUserID: xxxxx

newPassword: xxxxx

Sample Response

{

"status": "string",

"errorMessage": "string",

"sessionKey": "string",

"userRecord": {

"landscape": 0,

"id": 0,

"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-16T16:43:02.495Z",

"validForTime": "2024-02-16T16:43:02.495Z",

"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-16T16:43:02.495Z",

"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,

"auditObjectName": "string",

"auditObjectType": {

"auditTableName": "string",

"mysqlTableName": "string",

"idnameQuery": "string"

},

"addAuditSummary": "string",

"deleteHostsUponExpiration": true,

"iconType": "string",

"disabled": true,

"directoryDisabled": true,

"apiAdmin": true,

"superUser": true,

"validForTimeMS": 0,

"userAdministrator": true,

"userOperator": true,

"userHelpDesk": true,

"userAdministrative": true,

"maxAllowedHosts": 0,

"creationEvent": {

"landscape": 0,

"id": 0,

"state": "string",

"name": "string",

"elementType": "string",

"elementID": 0,

"elementName": "string",

"message": "string",

"timeOfEvent": "2024-02-16T16:43:02.496Z",

"version": 0,

"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-16T16:43:02.496Z",

"version": 0,

"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-16T16:43:02.496Z",

"version": 0,

"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-16T16:43:02.496Z",

"version": 0,

"time": 0,

"eventFormatString": "string",

"empty": true

},

"name": "string"

},

"requiresSecondaryAuthentication": true,

"acceptedAUP": true,

"landingPage": "string",

"licenseExpired": true,

"systemRunning": true,

"needsNewPassword": true,

"licensed": true,

"adminProfile": {

"lastModifiedBy": "string",

"lastModifiedDate": "2024-02-16T16:43:02.496Z",

"global": true,

"administrator": true,

"isKioskMode": false,

"dbid": 0,

"name": "string",

"inactivityTime": 0,

"schedule": "string",

"kioskTemplateID": 0,

"kioskWelcomeMessage": "string",

"note": "string",

"landingPage": "string",

"manageByGroups": true,

"guid": 0,

"globalModifiedDate": "2024-02-16T16:43:02.496Z",

"preventAging": true,

"upgradePermissions": true,

"lockoutThreshold": 0,

"lockoutDuration": 0,

"permissions": {

"additionalProp1": {

"permissions": [

"string"

],

"displayName_API": "string",

"view": true,

"modify": true,

"remove": true,

"customized": true,

"allIDs": true,

"allowedViews": {

"additionalProp1": true,

"additionalProp2": true,

"additionalProp3": true

}

},

"additionalProp2": {

"permissions": [

"string"

],

"displayName_API": "string",

"view": true,

"modify": true,

"remove": true,

"customized": true,

"allIDs": true,

"allowedViews": {

"additionalProp1": true,

"additionalProp2": true,

"additionalProp3": true

}

},

"additionalProp3": {

"permissions": [

"string"

],

"displayName_API": "string",

"view": true,

"modify": true,

"remove": true,

"customized": true,

"allIDs": true,

"allowedViews": {

"additionalProp1": true,

"additionalProp2": true,

"additionalProp3": true

}

}

},

"ncmLandingPage": "string",

"scheduleStr": "string"

}

}