Introduction
This is the api collection for Samasoft School Management System
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
This API is not authenticated.
Assessment Type Distribution
Store Assessment Type
Example request:
curl --request POST \
"schoolapi-test.samasoftech.net/api/v1/assessment-type-distribution" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/assessment-type-distribution"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display Details
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/assessment-type-distribution/quo" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/assessment-type-distribution/quo"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Details
Example request:
curl --request PUT \
"schoolapi-test.samasoftech.net/api/v1/assessment-type-distribution/consectetur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/assessment-type-distribution/consectetur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove Type
Example request:
curl --request DELETE \
"schoolapi-test.samasoftech.net/api/v1/assessment-type-distribution/non" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/assessment-type-distribution/non"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Assessment Type Management
All
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/assessment-type" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/assessment-type"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Assessment Store
Example request:
curl --request POST \
"schoolapi-test.samasoftech.net/api/v1/assessment-type" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/assessment-type"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Assessment Details
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/assessment-type/consequuntur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/assessment-type/consequuntur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Assessment
Example request:
curl --request PUT \
"schoolapi-test.samasoftech.net/api/v1/assessment-type/ratione" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/assessment-type/ratione"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete
Example request:
curl --request DELETE \
"schoolapi-test.samasoftech.net/api/v1/assessment-type/dolor" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/assessment-type/dolor"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Authentication
Login
This API is for User Login
Example request:
curl --request POST \
"schoolapi-test.samasoftech.net/api/v1/auth/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"osammy820@gmail.com\",
\"password\": \"123Password\"
}"
const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "osammy820@gmail.com",
"password": "123Password"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
User Registration
requires authentication
Example request:
curl --request POST \
"schoolapi-test.samasoftech.net/api/v1/auth/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Samuel\",
\"email\": \"osammy820@gmail.com\",
\"password\": \"123XXX\",
\"role_id\": \"1\"
}"
const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/auth/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Samuel",
"email": "osammy820@gmail.com",
"password": "123XXX",
"role_id": "1"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Class Management
Create Classroom
requires authentication
Example request:
curl --request POST \
"schoolapi-test.samasoftech.net/api/v1/classroom" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"frbcfdpunglkznbjhm\",
\"status\": \"active\",
\"department_id\": 5
}"
const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/classroom"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "frbcfdpunglkznbjhm",
"status": "active",
"department_id": 5
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show Class Details
requires authentication
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/classroom/incidunt" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/classroom/incidunt"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Classroom
requires authentication
Example request:
curl --request PUT \
"schoolapi-test.samasoftech.net/api/v1/classroom/fugiat" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/classroom/fugiat"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Classroom
requires authentication
Example request:
curl --request DELETE \
"schoolapi-test.samasoftech.net/api/v1/classroom/voluptas" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/classroom/voluptas"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Department Management
Display a list of all departments.
requires authentication
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/department" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/department"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create New Department.
requires authentication
This api is for creating department
Example request:
curl --request POST \
"schoolapi-test.samasoftech.net/api/v1/department" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"pariatur\",
\"status\": [
\"active\",
\"inactive\"
]
}"
const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/department"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "pariatur",
"status": [
"active",
"inactive"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display a specific department details.
requires authentication
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/department/adipisci" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/department/adipisci"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
requires authentication
Example request:
curl --request PUT \
"schoolapi-test.samasoftech.net/api/v1/department/voluptas" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/department/voluptas"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified resource from storage.
requires authentication
Example request:
curl --request DELETE \
"schoolapi-test.samasoftech.net/api/v1/department/qui" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/department/qui"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Endpoints
GET api/v1/user
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/user" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/user"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/v1/examination-entry/students
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/examination-entry/students" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"department_id\": \"est\",
\"classroom_id\": \"ut\",
\"subject_id\": \"fugiat\",
\"session_id\": \"et\",
\"examination_id\": \"accusantium\",
\"assessment_type_distribution_id\": \"et\"
}"
const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/examination-entry/students"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"department_id": "est",
"classroom_id": "ut",
"subject_id": "fugiat",
"session_id": "et",
"examination_id": "accusantium",
"assessment_type_distribution_id": "et"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display a listing of the resource.
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/examination-entry/quis" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/examination-entry/quis"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created resource in storage.
Example request:
curl --request POST \
"schoolapi-test.samasoftech.net/api/v1/examination-entry" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/examination-entry"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified resource.
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/examination-entry/et/show" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/examination-entry/et/show"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
Example request:
curl --request PUT \
"schoolapi-test.samasoftech.net/api/v1/examination-entry/rem" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/examination-entry/rem"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified resource from storage.
Example request:
curl --request DELETE \
"schoolapi-test.samasoftech.net/api/v1/examination-entry/et" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/examination-entry/et"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Examinations
All Examinations
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/examination" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/examination"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Examination
Example request:
curl --request POST \
"schoolapi-test.samasoftech.net/api/v1/examination" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/examination"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display Examination Details
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/examination/velit" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/examination/velit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Examination Details
Example request:
curl --request PUT \
"schoolapi-test.samasoftech.net/api/v1/examination/animi" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/examination/animi"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Examination Details
Example request:
curl --request DELETE \
"schoolapi-test.samasoftech.net/api/v1/examination/natus" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/examination/natus"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Grade Scale
Store Grading Scale
Example request:
curl --request POST \
"schoolapi-test.samasoftech.net/api/v1/grading-scale" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/grading-scale"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display Scale Details
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/grading-scale/reprehenderit" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/grading-scale/reprehenderit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Scale Details
Example request:
curl --request PUT \
"schoolapi-test.samasoftech.net/api/v1/grading-scale/ea" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/grading-scale/ea"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Scale
Example request:
curl --request DELETE \
"schoolapi-test.samasoftech.net/api/v1/grading-scale/officia" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/grading-scale/officia"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Grading System Types
Get All Grading Types
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/grading-type" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/grading-type"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Grading System Type
Example request:
curl --request POST \
"schoolapi-test.samasoftech.net/api/v1/grading-type" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/grading-type"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show Details
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/grading-type/quia" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/grading-type/quia"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
Example request:
curl --request PUT \
"schoolapi-test.samasoftech.net/api/v1/grading-type/porro" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/grading-type/porro"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified resource from storage.
Example request:
curl --request DELETE \
"schoolapi-test.samasoftech.net/api/v1/grading-type/omnis" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/grading-type/omnis"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Roles Management
Display list of all roles within a school.
requires authentication
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/roles" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/roles"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created resource in storage.
requires authentication
Example request:
curl --request POST \
"schoolapi-test.samasoftech.net/api/v1/roles" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"rerum\",
\"status\": \"active\",
\"permissions\": [
\"et\"
]
}"
const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/roles"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "rerum",
"status": "active",
"permissions": [
"et"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display Single Role Details.
requires authentication
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/roles/10" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/roles/10"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
requires authentication
Example request:
curl --request PUT \
"schoolapi-test.samasoftech.net/api/v1/roles/ratione" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/roles/ratione"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified resource from storage.
requires authentication
Example request:
curl --request DELETE \
"schoolapi-test.samasoftech.net/api/v1/roles/molestiae" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/roles/molestiae"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
School
Display list of all Schools
requires authentication
This endpoint can be used by only system developers to create new school
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/school" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/school"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new School
requires authentication
This api requires authentication. Only users with the permission to create school can use this endpoint
Example request:
curl --request POST \
"schoolapi-test.samasoftech.net/api/v1/school/store" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=University of Education"\
--form "email=info@uew.edu.gh"\
--form "phone=+233558571228"\
--form "address=Kumasi"\
--form "logo=@/private/var/folders/rl/ybb9hrn920n4_gmzjwq93z1c0000gq/T/phpYpveJ1" \
--form "signature=@/private/var/folders/rl/ybb9hrn920n4_gmzjwq93z1c0000gq/T/phpdN8kvU" const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/school/store"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'University of Education');
body.append('email', 'info@uew.edu.gh');
body.append('phone', '+233558571228');
body.append('address', 'Kumasi');
body.append('logo', document.querySelector('input[name="logo"]').files[0]);
body.append('signature', document.querySelector('input[name="signature"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the details of a school.
requires authentication
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/school/show" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/school/show"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
requires authentication
Example request:
curl --request PUT \
"schoolapi-test.samasoftech.net/api/v1/school/update" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/school/update"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Session Management
Session List Display all Sessions(i.e Academic Year and Term)
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/session" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/session"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Session This api is for creating new academic session
Example request:
curl --request POST \
"schoolapi-test.samasoftech.net/api/v1/session" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"ocejmtjbwcxotyrckfugyawy\",
\"status\": \"active\"
}"
const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/session"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "ocejmtjbwcxotyrckfugyawy",
"status": "active"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show Session Show Session Details
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/session/rerum" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/session/rerum"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Session Update the specified resource in storage.
Example request:
curl --request PUT \
"schoolapi-test.samasoftech.net/api/v1/session/aperiam" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/session/aperiam"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Session
Remove the specified resource from storage.
Example request:
curl --request DELETE \
"schoolapi-test.samasoftech.net/api/v1/session/beatae" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/session/beatae"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Staff Management
Get Staff Filter
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/staff?department_id=11&staff_type=ipsum&subject_id=13&status=deserunt" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"department_id\": 14,
\"staff_type\": \"teaching\",
\"subject_id\": 10,
\"status\": \"active\"
}"
const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/staff"
);
const params = {
"department_id": "11",
"staff_type": "ipsum",
"subject_id": "13",
"status": "deserunt",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"department_id": 14,
"staff_type": "teaching",
"subject_id": 10,
"status": "active"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/v1/staff
Example request:
curl --request POST \
"schoolapi-test.samasoftech.net/api/v1/staff" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/staff"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Staff Details
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/staff/qui?id=14" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/staff/qui"
);
const params = {
"id": "14",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/v1/staff/{id}
Example request:
curl --request PUT \
"schoolapi-test.samasoftech.net/api/v1/staff/sed" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/staff/sed"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Staff
Example request:
curl --request DELETE \
"schoolapi-test.samasoftech.net/api/v1/staff/corporis?id=11" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/staff/corporis"
);
const params = {
"id": "11",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Student Management
Students List
- @urlParam department_id int Nullable. The ID of the department. Example: 1
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/students" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/students"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"gender": "male",
"department": {
"id": 1,
"name": "Computer Science"
},
"classroom": {
"id": 1,
"name": "Class A"
},
// Other student attributes
},
// Other students
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created resource in storage.
Example request:
curl --request POST \
"schoolapi-test.samasoftech.net/api/v1/students" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/students"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified resource.
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/students/qui" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/students/qui"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
Example request:
curl --request PUT \
"schoolapi-test.samasoftech.net/api/v1/students/nulla" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/students/nulla"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified resource from storage.
Example request:
curl --request DELETE \
"schoolapi-test.samasoftech.net/api/v1/students/maiores" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/students/maiores"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Student Type Management
Student Type List
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/student_types" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/student_types"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Student Type
Example request:
curl --request POST \
"schoolapi-test.samasoftech.net/api/v1/student_types" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"regular\",
\"status\": \"active\"
}"
const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/student_types"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "regular",
"status": "active"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Student Types Details
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/student_types/officia" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/student_types/officia"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
Example request:
curl --request PUT \
"schoolapi-test.samasoftech.net/api/v1/student_types/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/student_types/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified resource from storage.
Example request:
curl --request DELETE \
"schoolapi-test.samasoftech.net/api/v1/student_types/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/student_types/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Subject Management
Get Subjects List
Subjects can be filtered by subject_types(core,elective),department_id,classroom_id
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/subjects" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/subjects"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Classroom
Api to create new classroom
Example request:
curl --request POST \
"schoolapi-test.samasoftech.net/api/v1/subjects" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"English Language\",
\"subject_type\": \"core\",
\"status\": \"active\",
\"department_id\": 1,
\"classroom_ids\": [
1,
2,
3
]
}"
const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/subjects"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "English Language",
"subject_type": "core",
"status": "active",
"department_id": 1,
"classroom_ids": [
1,
2,
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Single Subject Details
Example request:
curl --request GET \
--get "schoolapi-test.samasoftech.net/api/v1/subjects/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/subjects/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update subject details
Example request:
curl --request PUT \
"schoolapi-test.samasoftech.net/api/v1/subjects/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"English Language\",
\"subject_type\": \"core\",
\"status\": \"active\",
\"department_id\": 1,
\"classroom_ids\": [
1,
2,
3
]
}"
const url = new URL(
"schoolapi-test.samasoftech.net/api/v1/subjects/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "English Language",
"subject_type": "core",
"status": "active",
"department_id": 1,
"classroom_ids": [
1,
2,
3
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.