Role
Rol yönetimi için kullanılan endpoint'ler.
Rolleri listele
Sistemde tanımlı tüm rolleri getirir.
Authentication
x-auth(tenant-id)
HTTP Request
GET /role/roles
Request Parameters
Parametre almaz.
Response Parameters
| Field | Type | Nullable | Desc |
|---|---|---|---|
id | number | false | Rol id'si |
code | string | false | Rol kodu |
name | string | false | Rol adı |
Response Body Example
[
{
"id": 48,
"code": "SUPERUSER",
"name": "Tam Yetkili Yönetici"
},
{
"id": 49,
"code": "OPERATION",
"name": "Operasyon Yetkilisi"
},
{
"id": 50,
"code": "CUSTOMERCARE",
"name": "Müşteri Temsilcisi"
},
{
"id": 1,
"code": "GUEST",
"name": "Guest"
}
]
Rol ekle/güncelle
Yeni rol oluşturur veya mevcut bir rolü günceller. roleId gönderilirse güncelleme, gönderilmezse yeni kayıt oluşturulur.
Authentication
x-auth(tenant-id)
HTTP Request
POST /role/role
Request Parameters
| Field | Type | Required | Default | Desc |
|---|---|---|---|---|
roleId | number | false | - | Güncellenecek rolün id'si (update için) |
code | string | true | - | Rol kodu, eşsiz olmalıdır |
name | string | true | - | Rol adı |
Request Body Example (Create)
{
"code": "TESTROLE1",
"name": "Test Role"
}
Request Body Example (Update)
{
"roleId": 65,
"code": "TESTROLE3",
"name": "Test Role Name"
}
Response Parameters
| Field | Type | Nullable | Desc |
|---|---|---|---|
id | number | false | Oluşturulan/güncellenen rol id |
Response Body Example
{
"id": 65
}
Rol sil
Belirtilen rolü sistemden siler.
Authentication
x-auth(tenant-id)
HTTP Request
DELETE /role/role
Request Parameters
| Field | Type | Required | Default | Desc |
|---|---|---|---|---|
roleId | number | true | - | Silinecek rolün id'si |
Request Body Example
{
"roleId": 65
}
Response Parameters
| Field | Type | Nullable | Desc |
|---|---|---|---|
id | number | false | Silinen rol id'si |
Response Body Example
{
"id": 65
}