Fortinet black logo

Create a site

Create a site

Method

URL

Description

Arguments

Outputs

POST

device/site/

Create a site

JSON array

Arguments (URL)

None.

Arguments (JSON payload)

Parameter

Type

Required

Description

customerId

int

Y

The organization ID

name

string

Y

The unique name for this site

contactName

string

N

The primary contact name for this site

email

email

N

The primary contact email for this site

phone

phone

N

The primary contact phone number for this site

sandbox

bool

N

Enable or disable sandbox capability

switches

array

N

A list of managed FortiSwitch IDs to associate with this site

vdoms

array

N

A list of managed FortiManager IDs to associate with this site

aps

array

N

A list of managed FortiAP IDs to associate with this site

Outputs

Parameter

Type

Description

status

JSON array

A success or failure message

Example request

curl -k -X POST -H "Content-Type: application/json" -H "Authorization: Token 7f89ef48dc5bca218a8ac0268653ffafa74ce6a6ed7a8a703e113b13219b18a6" -d '{"name":"site3","contactName":"aaa","email":"aaa@test.com","phone":"","sandbox":false,"vdoms":[54],"aps":[],"switches":[],"customerId":"1"}' "https://<ip_address>/fpc/v1/api/device/site/

Example response

{

"status" : "success",

"id": 3,

"data": {

"id" : 3,

"vdoms" : []

"aps" : [],

"switches" : [],

"name" : "site3",

"contactName" : "aaa",

"email" : "aaa@test.com",

"phone" : "",

"sandbox" : false,

"customer" : 1,

"user" : [],

}

}

Create a site

Method

URL

Description

Arguments

Outputs

POST

device/site/

Create a site

JSON array

Arguments (URL)

None.

Arguments (JSON payload)

Parameter

Type

Required

Description

customerId

int

Y

The organization ID

name

string

Y

The unique name for this site

contactName

string

N

The primary contact name for this site

email

email

N

The primary contact email for this site

phone

phone

N

The primary contact phone number for this site

sandbox

bool

N

Enable or disable sandbox capability

switches

array

N

A list of managed FortiSwitch IDs to associate with this site

vdoms

array

N

A list of managed FortiManager IDs to associate with this site

aps

array

N

A list of managed FortiAP IDs to associate with this site

Outputs

Parameter

Type

Description

status

JSON array

A success or failure message

Example request

curl -k -X POST -H "Content-Type: application/json" -H "Authorization: Token 7f89ef48dc5bca218a8ac0268653ffafa74ce6a6ed7a8a703e113b13219b18a6" -d '{"name":"site3","contactName":"aaa","email":"aaa@test.com","phone":"","sandbox":false,"vdoms":[54],"aps":[],"switches":[],"customerId":"1"}' "https://<ip_address>/fpc/v1/api/device/site/

Example response

{

"status" : "success",

"id": 3,

"data": {

"id" : 3,

"vdoms" : []

"aps" : [],

"switches" : [],

"name" : "site3",

"contactName" : "aaa",

"email" : "aaa@test.com",

"phone" : "",

"sandbox" : false,

"customer" : 1,

"user" : [],

}

}