Inventário de Endpoints REST
Fonte principal: we-dhedalos/functions/rest/**.
Convenção de URL
- Prefixo customizado de REST:
/api(filtrorest_url_prefixemwe-dhedalos/functions/wp/rest_path.php). - Exemplo final:
/api/dhedalos/v1/search.
Matriz de rotas
| Endpoint | Métodos | Permissão principal | Arquivo |
|---|---|---|---|
/dhedalos/v1/search | GET | __return_true | we-dhedalos/functions/rest/search_summary.php |
/dhedalos/v1/theme_settings | GET | __return_true | we-dhedalos/functions/rest/theme_settings.php |
/dhedalos/v1/maintenance_mode | GET | __return_true | we-dhedalos/functions/rest/maintenance_mode.php |
/dhedalos/v1/user | GET, POST | is_user_logged_in | we-dhedalos/functions/rest/user.php |
/dhedalos/v1/login_by_cpf | GET, POST | is_user_logged_in | we-dhedalos/functions/rest/login_by_cpf.php |
/dhedalos/v1/user_by_cpf | GET | is_user_logged_in | we-dhedalos/functions/rest/login_by_cpf.php |
/dhedalos/v1/registration/people | POST | rest_auth_validate_token | we-dhedalos/functions/rest/registration/signup.php |
/dhedalos/v1/registration/people/{cpf} | GET | rest_auth_validate_token | we-dhedalos/functions/rest/registration/find.php |
/dhedalos/v1/registration/people/phone/{phone} | GET | rest_auth_validate_token | we-dhedalos/functions/rest/registration/findbyphone.php |
/dhedalos/v1/registration/people/{id} | PUT | rest_auth_validate_token | we-dhedalos/functions/rest/registration/update_put.php |
/dhedalos/v1/registration/people/{id} | PATCH | rest_auth_validate_token | we-dhedalos/functions/rest/registration/update_patch.php |
/dhedalos/v1/enroll/{slug_curso}/status | GET | rest_auth_validate_token | we-dhedalos/functions/rest/course/enroll_open.php |
/dhedalos/v1/enroll/{slug_curso}/meta | POST | rest_auth_validate_token | we-dhedalos/functions/rest/course/enroll_meta.php |
/dhedalos/v1/enroll/{slug_curso} | POST | rest_auth_validate_token | we-dhedalos/functions/rest/course/enroll.php |
/dhedalos/v1/enroll/cancel/{enrollment_id} | POST | is_user_logged_in | we-dhedalos/functions/rest/course/enroll.php |
/dhedalos/v1/enroll/{enroll_id} | DELETE | rest_auth_validate_token | we-dhedalos/functions/rest/course/disenroll.php |
/dhedalos/v1/course/enrolled/{slug_curso}/{user_id} | GET | rest_auth_validate_token | we-dhedalos/functions/rest/course/enrolled.php |
/dhedalos/v1/group/{uid} | GET | rest_auth_validate_token | we-dhedalos/functions/rest/course/group_link.php |
/dhedalos/v1/group/recall_group_link | GET | rest_auth_validate_token | we-dhedalos/functions/rest/course/inactive_group.php |
/dhedalos/v1/courses | GET | callback local (usuário logado + role) | we-dhedalos/functions/rest/courses.php |
/dhedalos/v1/courses/sidebar | GET | callback local (usuário logado + role) | we-dhedalos/functions/rest/courses.php |
/dhedalos/v1/course/{slug} | GET | sem permission_callback explicito | we-dhedalos/functions/rest/courses.php |
/dhedalos/v1/courses/{class_id}/meeting-type | GET | callback local (usuário logado + role) | we-dhedalos/functions/rest/courses.php |
/dhedalos/v1/course/{slug}/next-cycle | GET | sem permission_callback explicito | we-dhedalos/functions/rest/courses.php |
/dhedalos/v1/cycles | GET | callback local (usuário logado + role) | we-dhedalos/functions/rest/cycles.php |
/dhedalos/v1/cycles/{cycle_id}/classes | GET | callback local (usuário logado + role) | we-dhedalos/functions/rest/cycles.php |
/dhedalos/v1/cycles/{year} | GET | callback local (usuário logado + role) | we-dhedalos/functions/rest/cycles.php |
/dhedalos/v1/cycles/pcd-upcoming | GET | rest_auth_validate_token | we-dhedalos/functions/rest/cycles.php |
/dhedalos/v1/cycles/recovery-status | GET | callback local (is_user_logged_in) | we-dhedalos/functions/rest/cycles.php |
/dhedalos/v1/classes/supervisor | GET | callback local (is_user_logged_in + role) | we-dhedalos/functions/rest/classes.php |
/dhedalos/v1/classes/facilitator | GET | callback local (is_user_logged_in + role) | we-dhedalos/functions/rest/classes.php |
/dhedalos/v1/classes/subscriber | GET | callback local (is_user_logged_in + role) | we-dhedalos/functions/rest/classes.php |
/dhedalos/v1/class/{class_id} | GET | callback local (is_user_logged_in + role) | we-dhedalos/functions/rest/classes.php |
/dhedalos/v1/class/{class_id}/facilitator | GET | callback local (is_user_logged_in + role) | we-dhedalos/functions/rest/classes.php |
/dhedalos/v1/classes/subscriber/{subscriber_id}/cpf | GET | callback local (is_user_logged_in + role) | we-dhedalos/functions/rest/classes.php |
/dhedalos/v1/class/{class_id}/presence | GET | callback local (is_user_logged_in + role) | we-dhedalos/functions/rest/classes.php |
/dhedalos/v1/class/{class_id}/participants | GET | callback local (is_user_logged_in + role) | we-dhedalos/functions/rest/classes.php |
/dhedalos/v1/class/{class_id}/student/{student_id}/activity/{activity} | POST | callback local (role admin/supervisor/facilitator) | we-dhedalos/functions/rest/classes.php |
/dhedalos/v1/class/{class_id}/recovery-presence/{activity} | POST | callback local (is_user_logged_in + roles_allowed) | we-dhedalos/functions/rest/classes.php |
/dhedalos/v1/class/{class_id}/auto-presence | POST | callback local (current_user_can custom) | we-dhedalos/functions/rest/classes.php |
/dhedalos/v1/user/{subscriber_id}/data | GET | rest_auth_validate_token | we-dhedalos/functions/rest/classes.php |
/dhedalos/v1/enrollment/{enrollment_id}/request-cancellation | EDITABLE | __return_true | we-dhedalos/functions/rest/classes.php |
/dhedalos/v1/facilitator/calendar | GET | user_is_facilitator | we-dhedalos/functions/rest/calendar.php |
/dhedalos/v1/facilitator/calendar | POST | user_is_admin | we-dhedalos/functions/rest/calendar.php |
/dhedalos/v1/individual/disponibility | GET | is_user_logged_in | we-dhedalos/functions/rest/individual_disponibility.php |
/dhedalos/v1/individual/available-slots | GET | is_user_logged_in | we-dhedalos/functions/rest/individual_disponibility.php |
/dhedalos/v1/individual/booking | POST | callback local (is_user_logged_in) | we-dhedalos/functions/rest/individual_booking.php |
/dhedalos/v1/individual/booking | DELETE | callback local (is_user_logged_in) | we-dhedalos/functions/rest/individual_booking.php |
/dhedalos/v1/individual/bookings | GET | is_user_logged_in | we-dhedalos/functions/rest/my_calendar.php |
/dhedalos/v1/bookings/{booking_id} | GET | is_user_logged_in | we-dhedalos/functions/rest/my_calendar.php |
/dhedalos/v1/class_room | GET | callback local (is_user_logged_in) | we-dhedalos/functions/rest/class_room.php |
/dhedalos/v1/class_room/one_on_one | GET | callback local (is_user_logged_in) | we-dhedalos/functions/rest/class_room.php |
/dhedalos/v1/class_room/group | GET | callback local (is_user_logged_in) | we-dhedalos/functions/rest/class_room.php |
/dhedalos/v1/live/cycles | GET | rest_auth_validate_token | we-dhedalos/functions/rest/live/cycles.php |
/dhedalos/v1/live/enrollments | GET | rest_auth_validate_token | we-dhedalos/functions/rest/live/enrollments.php |
/dhedalos/v1/live/enrollments-stats | GET | rest_auth_validate_token | we-dhedalos/functions/rest/live/enrollments-stats.php |
/dhedalos/v1/live/enrolls_by_cycle | GET | rest_auth_validate_token | we-dhedalos/functions/rest/live/enrolls_by_cycle.php |
/dhedalos/v1/logs | POST | callback local (is_user_logged_in) | we-dhedalos/functions/rest/logs.php |
/dhedalos/v1/participant-mode-log | POST | callback local (is_user_logged_in) | we-dhedalos/functions/rest/participant_mode_logs.php |
/dhedalos/v1/system-logs | GET | rest_auth_validate_token | we-dhedalos/functions/rest/system_logs.php |
/dhedalos/v1/system-logs/stats | GET | rest_auth_validate_token | we-dhedalos/functions/rest/system_logs.php |
/dhedalos/v1/partners/{code} | GET | rest_auth_validate_token | we-dhedalos/functions/rest/partners.php |
/dhedalos/v1/surplus/{course_slug} | GET | rest_auth_validate_token | we-dhedalos/functions/rest/relocate_participant.php |
/dhedalos/v1/realocated | GET | rest_auth_validate_token | we-dhedalos/functions/rest/relocate_participant.php |
/dhedalos/v1/duplicated-students/search | GET | rest_auth_validate_token | we-dhedalos/functions/rest/duplicated_students.php |
/dhedalos/v1/duplicated-students/delete | GET | rest_auth_validate_token | we-dhedalos/functions/rest/duplicated_students.php |
/dhedalos/v1/tests | GET | rest_auth_validate_token | we-dhedalos/functions/rest/tests.php |
/dhedalos/v1/tests/links | GET | rest_auth_validate_token | we-dhedalos/functions/rest/tests.php |
/dhedalos/v1/tests/fixtures/create | POST | rest_auth_validate_token | we-dhedalos/functions/rest/tests-fixtures.php |
/dhedalos/v1/tests/fixtures/cleanup | DELETE | rest_auth_validate_token | we-dhedalos/functions/rest/tests-fixtures.php |
/dhedalos/v1/tests/fixtures/links | POST | rest_auth_validate_token | we-dhedalos/functions/rest/tests-fixtures.php |
/dhedalos/v1/export/users | GET | current_user_can('manage_options') | we-dhedalos/functions/rest/export.php |
/dhedalos/v1/export/classes | GET | current_user_can('manage_options') | we-dhedalos/functions/rest/export.php |
/dhedalos/v1/export/courses | GET | rest_auth_validate_token | we-dhedalos/functions/rest/export.php |
/dhedalos/v1/export/enrollments | GET | rest_auth_validate_token | we-dhedalos/functions/rest/export.php |
/dhedalos/v1/export/activities | GET | current_user_can('manage_options') | we-dhedalos/functions/rest/export.php |
/dhedalos/v1/export/enrollment-stats | GET | rest_auth_validate_token | we-dhedalos/functions/rest/export.php |
/dhedalos/v1/export/cycles-stats | GET | rest_auth_validate_token | we-dhedalos/functions/rest/export.php |
Pendências
WP_REST_Server::EDITABLEnão detalha método HTTP único no inventário; a implementação aceita métodos editáveis do WP REST.- Há rotas com
permission_callbackinline que dependem de combinação deis_user_logged_in, role e validações de negócio no callback. - A rota
DELETE /dhedalos/v1/enroll/{enroll_id}é condicionada por ambiente (piloto/homolog) no próprio registro da rota. - A rota
/dhedalos/v1/cycles/recovery-statusregistra o parâmetroclass_idd(com doisd) no estado atual do código.