Fortinet white logo
Fortinet white logo

Create a profile

Create a profile

Method

URL

Description

Arguments

Outputs

POST

account/roles/

Create a new profile

None

JSON array

Arguments (JSON payload)

Parameter

Type

Description

service_provider

int

The service provider ID

name

string

The new profile name

service_type

string

The profile type (Provider or Customer)

permissions

array

A list of permission IDs

Outputs

Parameter

Type

Description

profile

JSON array

The new profile record

Permissions

For details about permission IDs, see Access Permissions.

Example request

curl -k -X POST -H "Content-Type: application/json" -H "Authorization: Token 9fb3fa217a23edbf50c8c358dab61beb07f6e8a191ecc597568f45e9455846e6" -d '{"name": "testtest", "service_type":"Provider", "service_provider": 1, "permissions": [1, 2, 3]}' https://<ip_address>/fpc/v1/api/account/roles/

Example response

{

"create_type" : "Custom",

"id" : 4,

"name" : "testtest",

"permissions" : [

1,

2,

3

],

"service_provider" : 1,

"service_type" : "Provider"

}

Create a profile

Create a profile

Method

URL

Description

Arguments

Outputs

POST

account/roles/

Create a new profile

None

JSON array

Arguments (JSON payload)

Parameter

Type

Description

service_provider

int

The service provider ID

name

string

The new profile name

service_type

string

The profile type (Provider or Customer)

permissions

array

A list of permission IDs

Outputs

Parameter

Type

Description

profile

JSON array

The new profile record

Permissions

For details about permission IDs, see Access Permissions.

Example request

curl -k -X POST -H "Content-Type: application/json" -H "Authorization: Token 9fb3fa217a23edbf50c8c358dab61beb07f6e8a191ecc597568f45e9455846e6" -d '{"name": "testtest", "service_type":"Provider", "service_provider": 1, "permissions": [1, 2, 3]}' https://<ip_address>/fpc/v1/api/account/roles/

Example response

{

"create_type" : "Custom",

"id" : 4,

"name" : "testtest",

"permissions" : [

1,

2,

3

],

"service_provider" : 1,

"service_type" : "Provider"

}