Skip to main content

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
FieldTypeNullableDesc
idnumberfalseRol id'si
codestringfalseRol kodu
namestringfalseRol 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
FieldTypeRequiredDefaultDesc
roleIdnumberfalse-Güncellenecek rolün id'si (update için)
codestringtrue-Rol kodu, eşsiz olmalıdır
namestringtrue-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
FieldTypeNullableDesc
idnumberfalseOluş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
FieldTypeRequiredDefaultDesc
roleIdnumbertrue-Silinecek rolün id'si
Request Body Example
{
"roleId": 65
}
Response Parameters
FieldTypeNullableDesc
idnumberfalseSilinen rol id'si
Response Body Example
{
"id": 65
}