Admins:#
Create Admin User in SystemRequest Body:#
Response Body (Success, 200 OK):#
List All Admin Profile Information
Request
Provide your bearer token in the Authorization
header when making requests to protected resources. Example:Authorization: Bearer ********************
Body Params application/json
{
"username": "admin2",
"email": "admin2@gmail.com",
"password": "admin2",
"first_name": "admin2",
"second_name": "admin2",
"third_name": "admin2",
"fourth_name": "admin2",
"last_name": "admin2",
"gender": "m",
"birth_date": "2002-02-02",
"user_type": 1,
"city": "Cairo",
"address": "Address",
"phone": "+201111111111",
"is_active": true,
"is_staff": true,
"is_superuser": true
}
Request Code Samples
curl --location --request POST 'http://127.0.0.1:80/api/accounts/admins/' \
--header 'Content-Type: application/json' \
--data-raw '{
// Required Fileds
"username": "admin2",
"email": "admin2@gmail.com",
"password": "admin2",
"first_name": "admin2",
"second_name": "admin2",
"third_name": "admin2",
"fourth_name": "admin2",
"last_name": "admin2",
"gender": "m",
"birth_date": "2002-02-02",
"user_type": 1, // 1 => Admin, 2 => Instructor, 3 => Student
// Optional Fileds
"city": "Cairo",
"address": "Address",
"phone": "+201111111111",
"is_active": true,
"is_staff": true,
"is_superuser": true
}'
Responses
application/json {
"url": "http://127.0.0.1:80/api/accounts/admins/8/",
"id": 8,
"username": "admin2",
"email": "admin2@gmail.com",
"first_name": "admin2",
"second_name": "admin2",
"third_name": "admin2",
"fourth_name": "admin2",
"last_name": "admin2",
"gender": "m",
"birth_date": "2002-02-02",
"city": "Cairo",
"address": "Address",
"phone": "+201111111111",
"is_active": true,
"is_staff": true,
"is_superuser": true,
"date_joined": "2024-03-16T21:02:52.972125Z",
"user_type": 1
}
Modified at 2024-03-16 21:19:13