# Security
Use security endpoint to manage permissions and security settings in the system programmatically. Permissions can be created and added to resource actions to define granular permission control of what users can do in the system
GET /security/permissiongroups Get all permission groups added to the system
[
{
"Uid": "15f70399-9fc0-4d99-979f-cc50c6415a79",
"Name": "Products",
"IsSystemPermissionGroup": false
},
{
"Uid": "ecf7aab7-a65e-483b-902d-5197a027fa80",
"Name": "Variants",
"IsSystemPermissionGroup": false
}
]
Response status OK (200)
Property name | Data type | Description |
---|---|---|
Uid | string |
Unique id of permission group |
Name | string |
Name of permission group |
IsSystemPermissionGroup | boolean |
Is system permission group (readonly) |
PUT /security/permissiongroups Update a permission group
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
model | body | object : PermissionGroupModel |
Property name | Data type | Description |
---|---|---|
Uid | string |
Unique id of permission group |
Name | string |
Name of permission group |
IsSystemPermissionGroup | boolean |
Is system permission group (readonly) |
Response status OK (200)
POST /security/permissiongroups Add permission group to system
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
model | body | object : PermissionGroupModel |
Property name | Data type | Description |
---|---|---|
Uid | string |
Unique id of permission group |
Name | string |
Name of permission group |
IsSystemPermissionGroup | boolean |
Is system permission group (readonly) |
Response status OK (200)
GET /security/permissiongroups/{uid} Get a specific permission group
{
"Uid": "27c7b3ed-6c98-43a4-bbff-8773465b6228",
"Name": "Products",
"IsSystemPermissionGroup": false
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
uid | path | string |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
Uid | string |
Unique id of permission group |
Name | string |
Name of permission group |
IsSystemPermissionGroup | boolean |
Is system permission group (readonly) |
DELETE /security/permissiongroups/{uid} Delete a permission group
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
uid | path | string |
the Unique id of the permission group |
Response status OK (200)
GET /security/permissions Get all permissions added to the system
[
{
"Uid": "7f8283a5-05dc-4895-a1d4-964f7628abc1",
"PermissionGroupUid": "cffa5a9c-04bc-4d04-89c0-0990f71c03b5",
"PermissionName": "Create products",
"Description": "Permission required by users to be able to create new products",
"IsSystemPermission": false
},
{
"Uid": "786cabf1-8019-49db-975c-310b9d21a406",
"PermissionGroupUid": "cffa5a9c-04bc-4d04-89c0-0990f71c03b5",
"PermissionName": "Update products",
"Description": "Permission required by users to be able to update products",
"IsSystemPermission": false
}
]
Response status OK (200)
Property name | Data type | Description |
---|---|---|
Uid | string |
Unique id of permission |
PermissionGroupUid | string |
Uid of group to place permission in |
PermissionName | string |
Name of permission |
Description | string |
Description of permission |
IsSystemPermission | boolean |
Is system permission (readonly) |
PUT /security/permissions Update a permission
{
"Uid": "beef1dd3-4e84-484b-b5f0-9b9763ca9163",
"PermissionGroupUid": "1ce33013-4d85-497e-82e8-921ca3894c46",
"PermissionName": "Manage colors",
"Description": "Allows users to manage values in the colors global list",
"IsSystemPermission": false
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
model | body | object : PermissionModel |
Property name | Data type | Description |
---|---|---|
Uid | string |
Unique id of permission |
PermissionGroupUid | string |
Uid of group to place permission in |
PermissionName | string |
Name of permission |
Description | string |
Description of permission |
IsSystemPermission | boolean |
Is system permission (readonly) |
Response status OK (200)
POST /security/permissions Add permission to system
{
"Uid": "6bad5dd8-29d4-4b69-ad4c-0831816506e1",
"PermissionGroupUid": "eb22cd3a-29aa-40e9-bc0c-b0734095a601",
"PermissionName": "Manage colors",
"Description": "Allows users to manage values in the colors global list",
"IsSystemPermission": false
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
model | body | object : PermissionModel |
Property name | Data type | Description |
---|---|---|
Uid | string |
Unique id of permission |
PermissionGroupUid | string |
Uid of group to place permission in |
PermissionName | string |
Name of permission |
Description | string |
Description of permission |
IsSystemPermission | boolean |
Is system permission (readonly) |
Response status OK (200)
GET /security/permissions/{uid} Get a specific permission
{
"Uid": "8e227508-b9e5-408f-a2d5-185656818bcb",
"PermissionGroupUid": "2ea41e1d-f546-4406-8a00-6b6d3039ee05",
"PermissionName": "Create products",
"Description": "Permission required by users to be able to create new products",
"IsSystemPermission": false
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
uid | path | string |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
Uid | string |
Unique id of permission |
PermissionGroupUid | string |
Uid of group to place permission in |
PermissionName | string |
Name of permission |
Description | string |
Description of permission |
IsSystemPermission | boolean |
Is system permission (readonly) |
DELETE /security/permissions/{uid} Delete a permission
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
uid | path | string |
the Unique id of the permission |
Response status OK (200)
GET /security/usergroups Get all user groups added to the system
[
{
"Id": "1",
"Name": "Administrators"
},
{
"Id": "2",
"Name": "Editors"
}
]
Response status OK (200)
PUT /security/usergroups Update a user group
{
"Id": "2",
"Name": "Editors"
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
model | body | object : UserGroupModel |
Property name | Data type | Description |
---|---|---|
Id | string | |
Name | string |
Response status OK (200)
POST /security/usergroups Add user group to system
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
model | body | object : CreateUserGroupModel |
Property name | Data type | Description |
---|---|---|
Alias | string | |
Name | string |
Response status OK (200)
GET /security/usergroups/{id} Get a specific user group
{
"Id": "2",
"Name": "Editors"
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
id | path | integer |
Response status OK (200)
DELETE /security/usergroups/{id} Delete a user group
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
id | path | integer |
the id of the user group |
Response status OK (200)
GET /security/users Get all users added to the system
[
{
"Id": 1,
"Username": "Test",
"Email": "[email protected]",
"Groups": [
1,
2
],
"IsApproved": false
},
{
"Id": 2,
"Username": "writer",
"Email": "[email protected]",
"Groups": [
1
],
"IsApproved": false
}
]
Response status OK (200)
Property name | Data type | Description |
---|---|---|
Id | integer | |
Name | string | |
Username | string | |
string | ||
Groups | array | |
IsApproved | boolean |
PUT /security/users Update a user
{
"Id": 1,
"Username": "Test",
"Email": "[email protected]",
"Groups": [
1,
2
],
"IsApproved": false
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
model | body | object : UserModel |
Property name | Data type | Description |
---|---|---|
Id | integer | |
Name | string | |
Username | string | |
string | ||
Groups | array | |
IsApproved | boolean |
Response status OK (200)
POST /security/users Add user to system
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
model | body | object : CreateUserModel |
Property name | Data type | Description |
---|---|---|
Name | string | |
Username | string | |
string | ||
Groups | array |
Response status OK (200)
GET /security/users/{id} Get a specific user
{
"Id": 1,
"Username": "Test",
"Email": "[email protected]",
"Groups": [
1,
2
],
"IsApproved": false
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
id | path | string |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
Id | integer | |
Name | string | |
Username | string | |
string | ||
Groups | array | |
IsApproved | boolean |
DELETE /security/users/{id} Delete a user
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
id | path | integer |
the id of the user |