Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
This API is not authenticated.
Buildings
Create
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/buildings';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'egrxunnaepwez',
'address' => 'illo',
'observations' => 'repellat',
'imageId' => 'non',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/buildings"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "egrxunnaepwez",
"address": "illo",
"observations": "repellat",
"imageId": "non"
};
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.
Search
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/buildings/search';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'offset' => 5,
'limit' => 18,
'searchTerm' => 'exercitationem',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/buildings/search"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"offset": 5,
"limit": 18,
"searchTerm": "exercitationem"
};
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.
Details
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/buildings/1';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/buildings/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
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
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/buildings/3';
$response = $client->put(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'erqfrjpzipdf',
'address' => 'hic',
'observations' => 'quam',
'imageId' => 'pariatur',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/buildings/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "erqfrjpzipdf",
"address": "hic",
"observations": "quam",
"imageId": "pariatur"
};
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.
Delete
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/buildings/3';
$response = $client->delete(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/buildings/3"
);
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
Return an empty response simply to trigger the storage of the CSRF cookie in the browser.
GET _ignition/health-check
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/_ignition/health-check';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/_ignition/health-check"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": ""
}
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 _ignition/execute-solution
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/_ignition/execute-solution';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'solution' => 'architecto',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/_ignition/execute-solution"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"solution": "architecto"
};
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.
POST _ignition/update-config
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/_ignition/update-config';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'theme' => 'light',
'editor' => 'et',
'hide_solutions' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/_ignition/update-config"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"theme": "light",
"editor": "et",
"hide_solutions": true
};
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.
POST rooms/export
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/rooms/export';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'offset' => 9,
'limit' => 1,
'searchTerm' => 'quo',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/rooms/export"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"offset": 9,
"limit": 1,
"searchTerm": "quo"
};
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.
Handle the incoming request.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/health';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/health"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
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.
Facilities
Find all facilities
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/facilities';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/facilities"
);
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
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
{
"errorMessage": "messages.unauthorized"
}
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
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/facilities';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'bknb',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/facilities"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "bknb"
};
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.
Room Types
Find all room type
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/rooms/types';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/rooms/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
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
{
"errorMessage": "messages.unauthorized"
}
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.
Creaate
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/rooms/types';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'wfajslonrrikj',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/rooms/types"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "wfajslonrrikj"
};
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.
Rooms
Create
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/rooms';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'buildingId' => 'consequuntur',
'facultyId' => 7,
'name' => 'mwxmtqnzjqapzdhmbozhht',
'abbreviation' => 'gktuoqcxocbupho',
'typeId' => 2,
'maxSeatsNo' => 38,
'floor' => 1685266.0,
'observations' => 'vitae',
'imageId' => 'quia',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/rooms"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"buildingId": "consequuntur",
"facultyId": 7,
"name": "mwxmtqnzjqapzdhmbozhht",
"abbreviation": "gktuoqcxocbupho",
"typeId": 2,
"maxSeatsNo": 38,
"floor": 1685266,
"observations": "vitae",
"imageId": "quia"
};
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.
Search
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/rooms/search';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'offset' => 3,
'limit' => 7,
'searchTerm' => 'aut',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/rooms/search"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"offset": 3,
"limit": 7,
"searchTerm": "aut"
};
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.
Details
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/rooms/14';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/rooms/14"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
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
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/rooms/18';
$response = $client->put(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'buildingId' => 'ut',
'facultyId' => 19,
'name' => 'dyfyueiiuuuvoal',
'abbreviation' => 'btsopaxjlss',
'typeId' => 2291.511868994,
'maxSeatsNo' => 17,
'floor' => 757319.82542,
'observations' => 'optio',
'imageId' => 'quidem',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/rooms/18"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"buildingId": "ut",
"facultyId": 19,
"name": "dyfyueiiuuuvoal",
"abbreviation": "btsopaxjlss",
"typeId": 2291.511868994,
"maxSeatsNo": 17,
"floor": 757319.82542,
"observations": "optio",
"imageId": "quidem"
};
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.
Delete
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/rooms/14';
$response = $client->delete(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/rooms/14"
);
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.
Export
Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/rooms/export/4';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"http://localhost/rooms/export/4"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
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.