Info
Welcome to the generated API reference. Get Postman Collection
Admin panel, CRUD schools
Display all schools
Example request:
curl -X GET \
-G "http://localhost/sola" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/sola"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET sola
Display the specified school
Example request:
curl -X GET \
-G "http://localhost/sola/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/sola/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET sola/{solaID}
Return the view for the creation of a new school
Example request:
curl -X GET \
-G "http://localhost/createSola" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/createSola"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET createSola
Store a newly created school
Example request:
curl -X POST \
"http://localhost/sola" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/sola"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST sola
Update the specified school
Example request:
curl -X PUT \
"http://localhost/sola/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/sola/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT sola/{solaID}
Admin panel, to manage contests
Display aall the contests
Example request:
curl -X GET \
-G "http://localhost/contest" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/contest"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET contest
Display a specific contest defined by the ID, if message is present display also the warning message
Example request:
curl -X GET \
-G "http://localhost/contest/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/contest/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET contest/{contestID}
Display a specific contest defined by the ID, if message is present display also the warning message
Example request:
curl -X GET \
-G "http://localhost/contest/1/" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/contest/1/"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET contest/{contestID}/{message?}
Return the view for the creation of a new contest
Example request:
curl -X GET \
-G "http://localhost/createContest" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/createContest"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET createContest
Store a newly created contest in the DB
Example request:
curl -X POST \
"http://localhost/contest" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/contest"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST contest
Update the specified contest
Example request:
curl -X PUT \
"http://localhost/contest/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/contest/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT contest/{contestID}
Activate the specific contest
Example request:
curl -X GET \
-G "http://localhost/activateContest/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/activateContest/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (302):
null
HTTP Request
GET activateContest/{contestID}
Deactivate the specific contest
Example request:
curl -X GET \
-G "http://localhost/deactivateContest/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/deactivateContest/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (302):
null
HTTP Request
GET deactivateContest/{contestID}
Print results of the current contest
Example request:
curl -X GET \
-G "http://localhost/getContestResults/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/getContestResults/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET getContestResults/{contestID}
Admin panel, to manage permissions to compete
Show the view for the creation of a new permission
Example request:
curl -X GET \
-G "http://localhost/dovoljenje/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/dovoljenje/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET dovoljenje/{contestID}
Store a newly created permission
Example request:
curl -X POST \
"http://localhost/dovoljenje/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/dovoljenje/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST dovoljenje/{contestID}
Show the form for editing a permission
Example request:
curl -X GET \
-G "http://localhost/dovoljenje/edit/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/dovoljenje/edit/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET dovoljenje/edit/{dovoljenjeID}
Update the specified permission
Example request:
curl -X PUT \
"http://localhost/dovoljenje/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/dovoljenje/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT dovoljenje/{dovoljenjeID}
Remove the specified permission from the DB
Example request:
curl -X DELETE \
"http://localhost/dovoljenje/1/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/dovoljenje/1/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE dovoljenje/{dovoljenjeID}/{contestID}
Admin panel, to manage problems
Return all existing problems in the view problem
Example request:
curl -X GET \
-G "http://localhost/problem" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/problem"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET problem
Create a new problem
Example request:
curl -X POST \
"http://localhost/problem" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/problem"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST problem
Update the data about a problem
Example request:
curl -X PUT \
"http://localhost/problem/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/problem/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT problem/{problemID}
Show the data about a problem
Example request:
curl -X GET \
-G "http://localhost/problem/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/problem/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET problem/{problemID}
Delete a defined problem by the ID
Example request:
curl -X DELETE \
"http://localhost/problem/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/problem/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE problem/{problemID}
Login/Register management
APIs for Login, Register users
Return the view containing the login register page.
Example request:
curl -X GET \
-G "http://localhost/loginregister" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/loginregister"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET loginregister
Register a new user and redirect to LoginRegister
Example request:
curl -X POST \
"http://localhost/register" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/register"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST register
Perform the login and redirect to the begin page.
Example request:
curl -X POST \
"http://localhost/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/login"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST login
reset password
by sending an email with modify password option and update the pwd in DB
Example request:
curl -X GET \
-G "http://localhost/reset" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/reset"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET reset
Verify the user after the first registration
Example request:
curl -X GET \
-G "http://localhost/verification/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/verification/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (302):
null
HTTP Request
GET verification/{token}
Return the view to change the password
the token identifies the user
Example request:
curl -X GET \
-G "http://localhost/resetpass/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/resetpass/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET resetpass/{token}
Change the password of the user, important to check the token of the user
Example request:
curl -X POST \
"http://localhost/newPassword" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/newPassword"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST newPassword
Destroy the session of the use and Logout from the system, then redirect to welcome page
Example request:
curl -X GET \
-G "http://localhost/logout" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/logout"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (302):
null
HTTP Request
GET logout
User's data management
API's where user can change it's own data
Display data about the current user and return a new viev nastavitve
Example request:
curl -X GET \
-G "http://localhost/nastavitve" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/nastavitve"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (302):
null
HTTP Request
GET nastavitve
User functions during competition
APIs to let the user compete in the contest
Get all the data about the contest (problems and instructions)
Example request:
curl -X GET \
-G "http://localhost/solve" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/solve"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (302):
null
HTTP Request
GET solve
Execute users program and store results in the DB
Example request:
curl -X POST \
"http://localhost/solve" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/solve"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST solve
Allow to change user's programming language.
Example request:
curl -X GET \
-G "http://localhost/solve/1/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/solve/1/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET solve/{problemId}/{progjezik}
AJAX function that returns the state of the contest and the coutdown to the contest
Example request:
curl -X GET \
-G "http://localhost/contestInfo" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/contestInfo"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (302):
null
HTTP Request
GET contestInfo
general
Show the main page of the X-Codign platform.
Example request:
curl -X GET \
-G "http://localhost/" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET /
Show the form for creating a new resource.
Example request:
curl -X GET \
-G "http://localhost/izbiraProblema/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/izbiraProblema/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET izbiraProblema/{contestID}
Store a newly created resource in storage.
Example request:
curl -X POST \
"http://localhost/izbiraProblema/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/izbiraProblema/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST izbiraProblema/{contestID}
Remove the specified resource from storage.
Example request:
curl -X GET \
-G "http://localhost/izbiraProblema/delete/1/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/izbiraProblema/delete/1/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (302):
null
HTTP Request
GET izbiraProblema/delete/{contestID}/{problemID}