Introduction
Laravel API for the ZeroOCD Project (VU and Orb Amsterdam)
Hi Orb!
These are testing routes. While they won't save anything to the database, they'll still show actual response behavior.
Remove docs/ from these routes to get the paths to the actual routes.
They'll also require a secret value set in the body. For purpose of demonstration, the secret here is set to 1234, and the only user_id that is allowed is 1001.
Update 29-04-25: 10 more testing users have been added as requested.
Happy testing!
Authenticating requests
This API is not authenticated.
Endpoints
POST api/docs/login
Example request:
curl --request POST \
"https://zeroocd.psy.vu.nl/api/docs/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"secret\": \"1234\",
\"user_id\": \"1001\"
}"
const url = new URL(
"https://zeroocd.psy.vu.nl/api/docs/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"secret": "1234",
"user_id": "1001"
};
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 api/docs/reply
Example request:
curl --request POST \
"https://zeroocd.psy.vu.nl/api/docs/reply" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"secret\": \"1234\",
\"user_id\": \"1001\",
\"question_id\": \"RandomString\",
\"answer\": \"Test\",
\"datetime\": \"Test\"
}"
const url = new URL(
"https://zeroocd.psy.vu.nl/api/docs/reply"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"secret": "1234",
"user_id": "1001",
"question_id": "RandomString",
"answer": "Test",
"datetime": "Test"
};
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 api/docs/module
Example request:
curl --request POST \
"https://zeroocd.psy.vu.nl/api/docs/module" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"secret\": \"1234\",
\"user_id\": \"1001\",
\"module_id\": \"Test\",
\"duration\": \"Test\",
\"datetime\": \"Test\"
}"
const url = new URL(
"https://zeroocd.psy.vu.nl/api/docs/module"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"secret": "1234",
"user_id": "1001",
"module_id": "Test",
"duration": "Test",
"datetime": "Test"
};
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 api/docs/archoice
Example request:
curl --request POST \
"https://zeroocd.psy.vu.nl/api/docs/archoice" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"secret\": \"1234\",
\"user_id\": \"1001\",
\"ar_type\": \"Test\",
\"datetime\": \"Test\"
}"
const url = new URL(
"https://zeroocd.psy.vu.nl/api/docs/archoice"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"secret": "1234",
"user_id": "1001",
"ar_type": "Test",
"datetime": "Test"
};
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 api/docs/ar
Example request:
curl --request POST \
"https://zeroocd.psy.vu.nl/api/docs/ar" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"secret\": \"1234\",
\"user_id\": \"1001\",
\"ar_type\": \"Test\",
\"ar_level\": \"Test\",
\"datetime\": \"Test\",
\"duration\": \"Test\"
}"
const url = new URL(
"https://zeroocd.psy.vu.nl/api/docs/ar"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"secret": "1234",
"user_id": "1001",
"ar_type": "Test",
"ar_level": "Test",
"datetime": "Test",
"duration": "Test"
};
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 api/docs/disgustlevel
Example request:
curl --request POST \
"https://zeroocd.psy.vu.nl/api/docs/disgustlevel" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"secret\": \"1234\",
\"user_id\": \"1001\",
\"ar_level\": \"Test\",
\"ar_type\": \"Test\",
\"datetime\": \"Test\",
\"disgust_level\": \"Test\"
}"
const url = new URL(
"https://zeroocd.psy.vu.nl/api/docs/disgustlevel"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"secret": "1234",
"user_id": "1001",
"ar_level": "Test",
"ar_type": "Test",
"datetime": "Test",
"disgust_level": "Test"
};
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 api/docs/anxietylevel
Example request:
curl --request POST \
"https://zeroocd.psy.vu.nl/api/docs/anxietylevel" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"secret\": \"1234\",
\"user_id\": \"1001\",
\"ar_level\": \"Test\",
\"ar_type\": \"Test\",
\"datetime\": \"Test\",
\"anxiety_level_before_ar\": \"Test\",
\"anxiety_level_after_ar\": \"Test\"
}"
const url = new URL(
"https://zeroocd.psy.vu.nl/api/docs/anxietylevel"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"secret": "1234",
"user_id": "1001",
"ar_level": "Test",
"ar_type": "Test",
"datetime": "Test",
"anxiety_level_before_ar": "Test",
"anxiety_level_after_ar": "Test"
};
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 api/docs/daily
Example request:
curl --request POST \
"https://zeroocd.psy.vu.nl/api/docs/daily" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"secret\": \"1234\",
\"user_id\": \"1001\",
\"datetime\": \"Test\",
\"anxiety_level\": \"Test\"
}"
const url = new URL(
"https://zeroocd.psy.vu.nl/api/docs/daily"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"secret": "1234",
"user_id": "1001",
"datetime": "Test",
"anxiety_level": "Test"
};
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.