Introduction
This documentation aims to provide all the information you need to work with our API.
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
Authenticating requests
To authenticate requests, include an Authorization
header with the value "Bearer Bearer {YOUR_API_BEARER_TOKEN}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
Para autenticar, use o header Authorization: Bearer {YOUR_API_BEARER_TOKEN}
.
Critérios de Avaliação
Endpoints para gestão de critérios de avaliação (listar, criar, ver, atualizar, remover).
Listar todos os critérios de avaliação
requires authentication
Retorna a lista de critérios de avaliação disponíveis.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/evaluation-criteria" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/evaluation-criteria"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"data": []
}
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.
Criar um novo critério de avaliação
requires authentication
Cria um novo critério de avaliação na base de dados.
Example request:
curl --request POST \
"http://localhost:8000/api/v1/evaluation-criteria" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
"http://localhost:8000/api/v1/evaluation-criteria"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"description": "Dolores dolorum amet iste laborum eius est dolor."
};
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.
Ver detalhes de um critério de avaliação
requires authentication
Retorna os detalhes de um critério de avaliação específico pelo ID.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/evaluation-criteria/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/evaluation-criteria/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"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
access-control-allow-origin: *
{
"message": "No query results for model [App\\Models\\EvaluationCriterion] 17"
}
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.
Atualizar um critério de avaliação
requires authentication
Atualiza os dados de um critério de avaliação existente.
Example request:
curl --request PUT \
"http://localhost:8000/api/v1/evaluation-criteria/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
"http://localhost:8000/api/v1/evaluation-criteria/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"description": "Dolores dolorum amet iste laborum eius est dolor."
};
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.
Remover um critério de avaliação
requires authentication
Remove um critério de avaliação da base de dados pelo ID.
Example request:
curl --request DELETE \
"http://localhost:8000/api/v1/evaluation-criteria/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/evaluation-criteria/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"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.
Detalhes de Caso
Endpoints para gestão de detalhes de casos clínicos (listar, criar, ver, atualizar, remover).
Listar detalhes de caso por caso
requires authentication
Retorna a lista de detalhes de caso filtrada por case_id.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/case-details/by-case?case_id=17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"case_id\": 17
}"
const url = new URL(
"http://localhost:8000/api/v1/case-details/by-case"
);
const params = {
"case_id": "17",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"case_id": 17
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
[{...}]
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.
Listar todos os detalhes de casos
requires authentication
Retorna a lista de detalhes de casos disponíveis.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/case-details" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/case-details"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"data": [
{
"id": 1,
"case_id": 1,
"patient_avatar_id": "man-30",
"clinical_scene_id": "office",
"outfit": "dressed",
"description": "For the past two weeks, the patient has been experiencing intermittent chest tightness. The patient noticed occasional shortness of breath and increased fatigue.",
"patient_prompt": "You are Samuel Thompson, a 45-year-old marketing executive visiting a doctor's office. ...",
"condition_name": "Angina",
"checklist": "[]",
"physical_exams": "[]",
"settings": "{\"durationMinutes\":8,\"preparationMinutes\":2,\"warningMinutes\":2}",
"created_at": null,
"updated_at": null
}
]
}
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.
Criar um novo detalhe de caso
requires authentication
Cria um novo detalhe de caso na base de dados.
Example request:
curl --request POST \
"http://localhost:8000/api/v1/case-details" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"case_id\": 17,
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
"http://localhost:8000/api/v1/case-details"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"case_id": 17,
"description": "Dolores dolorum amet iste laborum eius est dolor."
};
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.
Ver detalhes de um detalhe de caso
requires authentication
Retorna os detalhes de um detalhe de caso específico pelo ID.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/case-details/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/case-details/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"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
access-control-allow-origin: *
{
"message": "No query results for model [App\\Models\\CaseDetail] 17"
}
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.
Atualizar um detalhe de caso
requires authentication
Atualiza os dados de um detalhe de caso existente.
Example request:
curl --request PUT \
"http://localhost:8000/api/v1/case-details/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"case_id\": 17,
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
"http://localhost:8000/api/v1/case-details/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"case_id": 17,
"description": "Dolores dolorum amet iste laborum eius est dolor."
};
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.
Remover um detalhe de caso
requires authentication
Remove um detalhe de caso da base de dados pelo ID.
Example request:
curl --request DELETE \
"http://localhost:8000/api/v1/case-details/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/case-details/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"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.
Exam Sets
Endpoints para gestão de conjuntos de exames (listar, criar, ver, atualizar, remover).
Listar todos os conjuntos de exames
requires authentication
Retorna a lista de conjuntos de exames disponíveis.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/exam-sets" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/exam-sets"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"data": [
{
"id": 1,
"name": "General Clinical Skills Assessment",
"profession_id": 1,
"case_count": 8,
"duration_minutes": 80,
"case_types": "[\"history_taking\",\"clinical_examination\",\"diagnosis\"]",
"system_generated": null,
"created_at": null,
"updated_at": null
},
{
"id": 2,
"name": "Neurology Focused Assessment",
"profession_id": 1,
"case_count": 6,
"duration_minutes": 60,
"case_types": "[\"history_taking\",\"clinical_examination\"]",
"system_generated": null,
"created_at": null,
"updated_at": null
},
{
"id": 3,
"name": "System Generated",
"profession_id": 1,
"case_count": null,
"duration_minutes": null,
"case_types": "[\"history_taking\",\"clinical_examination\",\"diagnosis\",\"counselling\"]",
"system_generated": "{\"available\":true,\"maxCases\":20,\"caseTypes\":[\"history_taking\",\"clinical_examination\",\"diagnosis\",\"counselling\"]}",
"created_at": null,
"updated_at": null
}
]
}
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.
Criar um novo conjunto de exames
requires authentication
Cria um novo conjunto de exames na base de dados.
Example request:
curl --request POST \
"http://localhost:8000/api/v1/exam-sets" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"profession_id\": 17
}"
const url = new URL(
"http://localhost:8000/api/v1/exam-sets"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"profession_id": 17
};
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.
Ver detalhes de um conjunto de exames
requires authentication
Retorna os detalhes de um conjunto de exames específico pelo ID.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/exam-sets/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/exam-sets/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"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
access-control-allow-origin: *
{
"message": "No query results for model [App\\Models\\ExamSet] 17"
}
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.
Atualizar um conjunto de exames
requires authentication
Atualiza os dados de um conjunto de exames existente.
Example request:
curl --request PUT \
"http://localhost:8000/api/v1/exam-sets/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"profession_id\": 17
}"
const url = new URL(
"http://localhost:8000/api/v1/exam-sets/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"profession_id": 17
};
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.
Remover um conjunto de exames
requires authentication
Remove um conjunto de exames da base de dados pelo ID.
Example request:
curl --request DELETE \
"http://localhost:8000/api/v1/exam-sets/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/exam-sets/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"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.
Modelos de Caso
Endpoints para gestão de modelos de casos clínicos (listar, criar, ver, atualizar, remover).
Listar casos por especialidade
requires authentication
Retorna a lista de casos filtrada por especialidade.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/cases/by-specialty?specialty_id=17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"specialty_id\": 17
}"
const url = new URL(
"http://localhost:8000/api/v1/cases/by-specialty"
);
const params = {
"specialty_id": "17",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"specialty_id": 17
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
[{...}]
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.
Listar todos os modelos de casos
requires authentication
Retorna a lista de modelos de casos disponíveis.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/cases" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/cases"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"data": [
{
"id": 1,
"profession_id": 1,
"training_type_id": 1,
"case_type_id": 1,
"specialty_id": 1,
"title_practice": "Chest tightness",
"title_exam": "Case 1",
"duration_minutes": 8,
"preparation_minutes": 2,
"supports_guided": true,
"enabled": true,
"icon": "ChestTightness",
"created_at": null,
"updated_at": null
},
{
"id": 2,
"profession_id": 1,
"training_type_id": 1,
"case_type_id": 1,
"specialty_id": 1,
"title_practice": "Exercise intolerance",
"title_exam": "Case 2",
"duration_minutes": 8,
"preparation_minutes": 2,
"supports_guided": true,
"enabled": true,
"icon": "ExerciseIntolerance",
"created_at": null,
"updated_at": null
},
{
"id": 3,
"profession_id": 1,
"training_type_id": 1,
"case_type_id": 1,
"specialty_id": 1,
"title_practice": "Chest tightness",
"title_exam": "Case 3",
"duration_minutes": 8,
"preparation_minutes": 2,
"supports_guided": true,
"enabled": true,
"icon": "ChestTightness",
"created_at": null,
"updated_at": null
},
{
"id": 4,
"profession_id": 1,
"training_type_id": 1,
"case_type_id": 1,
"specialty_id": 1,
"title_practice": "Exercise intolerance",
"title_exam": "Case 4",
"duration_minutes": 8,
"preparation_minutes": 2,
"supports_guided": true,
"enabled": true,
"icon": "ExerciseIntolerance",
"created_at": null,
"updated_at": null
},
{
"id": 5,
"profession_id": 1,
"training_type_id": 1,
"case_type_id": 1,
"specialty_id": 1,
"title_practice": "Exercise intolerance",
"title_exam": "Case 5",
"duration_minutes": 8,
"preparation_minutes": 2,
"supports_guided": true,
"enabled": true,
"icon": "ExerciseIntolerance",
"created_at": null,
"updated_at": null
},
{
"id": 6,
"profession_id": 1,
"training_type_id": 1,
"case_type_id": 1,
"specialty_id": 1,
"title_practice": "Exercise intolerance",
"title_exam": "Case 6",
"duration_minutes": 8,
"preparation_minutes": 2,
"supports_guided": true,
"enabled": true,
"icon": "ExerciseIntolerance",
"created_at": null,
"updated_at": null
},
{
"id": 7,
"profession_id": 1,
"training_type_id": 1,
"case_type_id": 1,
"specialty_id": 2,
"title_practice": "Worsening cold symptoms",
"title_exam": "Case 7",
"duration_minutes": 8,
"preparation_minutes": 2,
"supports_guided": true,
"enabled": true,
"icon": "Pulmonology",
"created_at": null,
"updated_at": null
},
{
"id": 8,
"profession_id": 1,
"training_type_id": 1,
"case_type_id": 1,
"specialty_id": 3,
"title_practice": "Fatigue and yellow eyes",
"title_exam": "Case 8",
"duration_minutes": 8,
"preparation_minutes": 2,
"supports_guided": true,
"enabled": true,
"icon": "Gastroenterology",
"created_at": null,
"updated_at": null
},
{
"id": 9,
"profession_id": 3,
"training_type_id": 7,
"case_type_id": 2,
"specialty_id": 4,
"title_practice": "Adult Critical Care Nursing",
"title_exam": "ICU Demo",
"duration_minutes": 15,
"preparation_minutes": 2,
"supports_guided": false,
"enabled": true,
"icon": "content_card_icu_image",
"created_at": null,
"updated_at": null
}
]
}
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.
Criar um novo modelo de caso
requires authentication
Cria um novo modelo de caso na base de dados.
Example request:
curl --request POST \
"http://localhost:8000/api/v1/cases" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
"http://localhost:8000/api/v1/cases"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"description": "Dolores dolorum amet iste laborum eius est dolor."
};
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.
Ver detalhes de um modelo de caso
requires authentication
Retorna os detalhes de um modelo de caso específico pelo ID.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/cases/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/cases/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"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
access-control-allow-origin: *
{
"message": "No query results for model [App\\Models\\CaseModel] 17"
}
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.
Atualizar um modelo de caso
requires authentication
Atualiza os dados de um modelo de caso existente.
Example request:
curl --request PUT \
"http://localhost:8000/api/v1/cases/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
"http://localhost:8000/api/v1/cases/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"description": "Dolores dolorum amet iste laborum eius est dolor."
};
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.
Remover um modelo de caso
requires authentication
Remove um modelo de caso da base de dados pelo ID.
Example request:
curl --request DELETE \
"http://localhost:8000/api/v1/cases/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/cases/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"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.
Professions
Endpoints para gestão de profissões (listar, criar, ver, atualizar, remover).
Listar todas as profissões
requires authentication
Retorna a lista de profissões disponíveis para seleção no menu inicial.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/professions" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/professions"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{"description": "Select your professional area to proceed:", "professions": [{"id": 1, "name": "Medical", ...}]}
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.
Criar uma nova profissão
requires authentication
Cria uma nova profissão na base de dados.
Example request:
curl --request POST \
"http://localhost:8000/api/v1/professions" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"enabled\": false,
\"icon\": \"consequatur\"
}"
const url = new URL(
"http://localhost:8000/api/v1/professions"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"enabled": false,
"icon": "consequatur"
};
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.
Ver detalhes de uma profissão
requires authentication
Retorna os detalhes de uma profissão específica pelo ID.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/professions/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/professions/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"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
access-control-allow-origin: *
{
"message": "No query results for model [App\\Models\\Profession] 17"
}
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.
Atualizar uma profissão
requires authentication
Atualiza os dados de uma profissão existente.
Example request:
curl --request PUT \
"http://localhost:8000/api/v1/professions/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"enabled\": false,
\"icon\": \"consequatur\"
}"
const url = new URL(
"http://localhost:8000/api/v1/professions/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"enabled": false,
"icon": "consequatur"
};
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.
Remover uma profissão
requires authentication
Remove uma profissão da base de dados pelo ID.
Example request:
curl --request DELETE \
"http://localhost:8000/api/v1/professions/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/professions/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"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.
Specialties
Endpoints para gestão de especialidades (listar, criar, ver, atualizar, remover).
Listar especialidades por tipo de caso
requires authentication
Retorna a lista de especialidades filtrada por tipo de caso.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/specialties/by-case-type?case_type_id=17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"case_type_id\": 17
}"
const url = new URL(
"http://localhost:8000/api/v1/specialties/by-case-type"
);
const params = {
"case_type_id": "17",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"case_type_id": 17
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{"description": "Select a specialty for 'nome do case_type' practice:", "specialties": [{...}]}
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.
Listar todas as especialidades
requires authentication
Retorna a lista de especialidades disponíveis.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/specialties" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/specialties"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"data": [
{
"id": 1,
"name": "cardiology",
"case_type_id": 1,
"enabled": true,
"icon": null,
"created_at": null,
"updated_at": null
},
{
"id": 2,
"name": "pulmonology",
"case_type_id": 1,
"enabled": true,
"icon": null,
"created_at": null,
"updated_at": null
},
{
"id": 3,
"name": "hepatology",
"case_type_id": 1,
"enabled": true,
"icon": null,
"created_at": null,
"updated_at": null
},
{
"id": 4,
"name": "critical_care",
"case_type_id": 2,
"enabled": true,
"icon": null,
"created_at": null,
"updated_at": null
}
]
}
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.
Criar uma nova especialidade
requires authentication
Cria uma nova especialidade na base de dados.
Example request:
curl --request POST \
"http://localhost:8000/api/v1/specialties" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"case_type_id\": 17
}"
const url = new URL(
"http://localhost:8000/api/v1/specialties"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"case_type_id": 17
};
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.
Ver detalhes de uma especialidade
requires authentication
Retorna os detalhes de uma especialidade específica pelo ID.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/specialties/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/specialties/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"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
access-control-allow-origin: *
{
"message": "No query results for model [App\\Models\\Specialty] 17"
}
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.
Atualizar uma especialidade
requires authentication
Atualiza os dados de uma especialidade existente.
Example request:
curl --request PUT \
"http://localhost:8000/api/v1/specialties/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"case_type_id\": 17
}"
const url = new URL(
"http://localhost:8000/api/v1/specialties/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"case_type_id": 17
};
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.
Remover uma especialidade
requires authentication
Remove uma especialidade da base de dados pelo ID.
Example request:
curl --request DELETE \
"http://localhost:8000/api/v1/specialties/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/specialties/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"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.
Tipos de Caso
Endpoints para gestão de tipos de casos clínicos (listar, criar, ver, atualizar, remover).
Listar tipos de caso por tipo de treino
requires authentication
Retorna a lista de tipos de caso filtrada por tipo de treino.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/case-types/by-training-type?training_type_id=17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"training_type_id\": 17
}"
const url = new URL(
"http://localhost:8000/api/v1/case-types/by-training-type"
);
const params = {
"training_type_id": "17",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"training_type_id": 17
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{"description": "Choose the skill you want to focus on:", "case_types": [{...}]}
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.
Listar todos os tipos de casos
requires authentication
Retorna a lista de tipos de casos disponíveis.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/case-types" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/case-types"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"data": [
{
"id": 1,
"name": "history_taking",
"training_type_id": 1,
"enabled": true,
"icon": null,
"created_at": null,
"updated_at": null
},
{
"id": 2,
"name": "icu_procedures",
"training_type_id": 7,
"enabled": true,
"icon": null,
"created_at": null,
"updated_at": null
}
]
}
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.
Criar um novo tipo de caso
requires authentication
Cria um novo tipo de caso na base de dados.
Example request:
curl --request POST \
"http://localhost:8000/api/v1/case-types" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
"http://localhost:8000/api/v1/case-types"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"description": "Dolores dolorum amet iste laborum eius est dolor."
};
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.
Ver detalhes de um tipo de caso
requires authentication
Retorna os detalhes de um tipo de caso específico pelo ID.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/case-types/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/case-types/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"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
access-control-allow-origin: *
{
"message": "No query results for model [App\\Models\\CaseType] 17"
}
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.
Atualizar um tipo de caso
requires authentication
Atualiza os dados de um tipo de caso existente.
Example request:
curl --request PUT \
"http://localhost:8000/api/v1/case-types/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
"http://localhost:8000/api/v1/case-types/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"description": "Dolores dolorum amet iste laborum eius est dolor."
};
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.
Remover um tipo de caso
requires authentication
Remove um tipo de caso da base de dados pelo ID.
Example request:
curl --request DELETE \
"http://localhost:8000/api/v1/case-types/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/case-types/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"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.
Training Types
Endpoints para gestão de tipos de treino (listar, criar, ver, atualizar, remover).
Listar tipos de treino por profissão
requires authentication
Retorna a lista de tipos de treino filtrada por profissão.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/training-types/by-profession?profession_id=17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"profession_id\": 17
}"
const url = new URL(
"http://localhost:8000/api/v1/training-types/by-profession"
);
const params = {
"profession_id": "17",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"profession_id": 17
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{"description": "Choose your preferred preparation format:", "training_types": [{...}]}
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.
Listar todos os tipos de treino
requires authentication
Retorna a lista de todos os tipos de treino disponíveis.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/training-types" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/training-types"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"data": [
{
"id": 1,
"name": "OSCE Practice",
"profession_id": 1,
"enabled": true,
"icon": "OSCEPractice",
"created_at": null,
"updated_at": null
},
{
"id": 2,
"name": "SOE Practice",
"profession_id": 1,
"enabled": false,
"icon": "SOEPractice",
"created_at": null,
"updated_at": null
},
{
"id": 3,
"name": "OSCE & SOE Exam",
"profession_id": 1,
"enabled": false,
"icon": "OSCE_SOE_EXAM",
"created_at": null,
"updated_at": null
},
{
"id": 4,
"name": "OSCE Practice",
"profession_id": 2,
"enabled": false,
"icon": "OSCEPractice",
"created_at": null,
"updated_at": null
},
{
"id": 5,
"name": "SOE Practice",
"profession_id": 2,
"enabled": false,
"icon": "SOEPractice",
"created_at": null,
"updated_at": null
},
{
"id": 6,
"name": "OSCE & SOE Exam",
"profession_id": 2,
"enabled": false,
"icon": "OSCE_SOE_EXAM",
"created_at": null,
"updated_at": null
},
{
"id": 7,
"name": "Procedures",
"profession_id": 3,
"enabled": true,
"icon": "nursing",
"created_at": null,
"updated_at": null
}
]
}
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.
Criar um novo tipo de treino
requires authentication
Cria um novo tipo de treino na base de dados.
Example request:
curl --request POST \
"http://localhost:8000/api/v1/training-types" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"profession_id\": 17
}"
const url = new URL(
"http://localhost:8000/api/v1/training-types"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"profession_id": 17
};
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.
Ver detalhes de um tipo de treino
requires authentication
Retorna os detalhes de um tipo de treino específico pelo ID.
Example request:
curl --request GET \
--get "http://localhost:8000/api/v1/training-types/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/training-types/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"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
access-control-allow-origin: *
{
"message": "No query results for model [App\\Models\\TrainingType] 17"
}
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.
Atualizar um tipo de treino
requires authentication
Atualiza os dados de um tipo de treino existente.
Example request:
curl --request PUT \
"http://localhost:8000/api/v1/training-types/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"profession_id\": 17
}"
const url = new URL(
"http://localhost:8000/api/v1/training-types/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"profession_id": 17
};
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.
Remover um tipo de treino
requires authentication
Remove um tipo de treino da base de dados pelo ID.
Example request:
curl --request DELETE \
"http://localhost:8000/api/v1/training-types/17" \
--header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://localhost:8000/api/v1/training-types/17"
);
const headers = {
"Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
"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.