# 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": "873b877d-825c-41e7-b3c1-bee9722f27dc",
"Name": "Products",
"IsSystemPermissionGroup": false
},
{
"Uid": "9f050913-bfe9-4727-b583-8f6449b6def9",
"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": "a0ae0469-bac7-4b9f-98b8-611863cd0cc3",
"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": "2e800a6f-fff6-4b64-a43f-430b1fd9f2a6",
"PermissionGroupUid": "80c31c9b-c22c-42db-afe9-31f41d3db942",
"PermissionName": "Create products",
"Description": "Permission required by users to be able to create new products",
"IsSystemPermission": false
},
{
"Uid": "eeb3f976-e465-4d24-98a8-55888df960e1",
"PermissionGroupUid": "80c31c9b-c22c-42db-afe9-31f41d3db942",
"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": "d4c6cd34-a039-4390-8880-2eaf87714256",
"PermissionGroupUid": "b065dc47-5261-4d70-aad7-67ec04c60306",
"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": "cca7b0ca-0d43-42bf-beb6-c92ea7b70555",
"PermissionGroupUid": "f8e46f10-c9b2-43ac-aab2-b2ddafea25ed",
"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": "2dd8d858-4bac-463d-95a8-570b18520ea5",
"PermissionGroupUid": "c325145f-afdf-4f1d-be94-42817dcc7fc0",
"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)
Property name | Data type | Description |
---|---|---|
Id | string | |
Name | string | |
PermissionUids | array |
PUT /security/usergroups Update a user group
{
"Id": "2",
"Name": "Editors",
"PermissionUids": [
"812b332a-6b6e-4277-b1b6-77dd1498f39a",
"094ce3c0-a9bd-4802-9360-ce1b46c2593f"
]
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
model | body | object : UserGroupModel |
Property name | Data type | Description |
---|---|---|
Id | string | |
Name | string | |
PermissionUids | array |
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 | |
PermissionUids | array |
Response status OK (200)
GET /security/usergroups/{id} Get a specific user group
{
"Id": "2",
"Name": "Editors",
"PermissionUids": [
"73b77bcf-3c46-43d6-a9cc-044d4ebd158b",
"5820f65d-895b-49da-8f2a-ff09fea0f6d7"
]
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
id | path | integer |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
Id | string | |
Name | string | |
PermissionUids | array |
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 |