-
Notifications
You must be signed in to change notification settings - Fork 3
Home
This is the single-entry point for interaction between the OCARIoT clients (Data Acquisition App, OCARIoT App, OCARIoT dashboard and Embedded Gateway) and microservices. Acting as a reverse proxy, the API Gateway integrates all the microservice APIs in a single RESTful API, abstracting the complexities of the OCARIoT microservice platform and simplifying the communication for OCARIoT clients. It also implements a set of transversal features, e.g., authentication and authorization policies, load balancing, rate limiter, etc.
This documentation describes all possible responses for all routes mapped in this component, with different response types and errors separated by feature. In addition to describing who is allowed to access each route.
Visit auth to understand a little about the authentication mechanism and how to use it. After that, just explore the other available routes.
The scopes of each user are detailed here, where for example a Family user can read data from a child (children:read, which is the scope of the GET child by ID route), but the child must be associated with it to make this possible.
Most of the mapped routes have some similar permission details that were implemented through authorization policies here in the API Gateway, these details are explained (and highlighted in bold) in 'description' section of each route.
Some GET ALL routes support the use of query strings, and on each of these routes there are specific usage examples.
For more details go to the Query Strings section.
- POST /v1/auth
- DELETE /v1/users/{user_id}
- PUT /v1/users/{user_id}/password
- POST /v1/users/{user_id}/reset-password
- POST /v1/users/types/{user_type}/scopes
- POST /v1/institutions
- GET /v1/institutions
- GET /v1/institutions/{institution_id}
- PATCH /v1/institutions/{institution_id}
- DELETE /v1/institutions/{institution_id}
- POST /v1/children
- GET /v1/children
- GET /v1/children/{child_id}
- PATCH /v1/children/{child_id}
- POST /v1/educators
- GET /v1/educators
- GET /v1/educators/{educator_id}
- PATCH /v1/educators/{educator_id}
- POST /v1/educators/{educator_id}/children/groups
- GET /v1/educators/{educator_id}/children/groups
- GET /v1/educators/{educator_id}/children/groups/{group_id}
- PATCH /v1/educators/{educator_id}/children/groups/{group_id}
- DELETE /v1/educators/{educator_id}/children/groups/{group_id}
- POST /v1/families
- GET /v1/families
- GET /v1/families/{family_id}
- PATCH /v1/families/{family_id}
- GET /v1/families/{family_id}/children
- POST /v1/families/{family_id}/children/{child_id}
- DELETE /v1/families/{family_id}/children/{child_id}
- POST /v1/healthprofessionals
- GET /v1/healthprofessionals
- GET /v1/healthprofessionals/{healthprofessional_id}
- PATCH /v1/healthprofessionals/{healthprofessional_id}
- POST /v1/healthprofessionals/{healthprofessional_id}/children/groups
- GET /v1/healthprofessionals/{healthprofessional_id}/children/groups
- GET /v1/healthprofessionals/{healthprofessional_id}/children/groups/{group_id}
- PATCH /v1/healthprofessionals/{healthprofessional_id}/children/groups/{group_id}
- DELETE /v1/healthprofessionals/{healthprofessional_id}/children/groups/{group_id}
- POST /v1/applications
- GET /v1/applications
- GET /v1/applications/{application_id}
- PATCH /v1/applications/{application_id}
- POST /v1/children/{child_id}/physicalactivities
- GET /v1/children/{child_id}/physicalactivities
- GET /v1/children/{child_id}/physicalactivities/{physicalactivity_id}
- DELETE /v1/children/{child_id}/physicalactivities/{physicalactivity_id}
- POST /v1/children/{child_id}/logs/{resource}
- GET /v1/children/{child_id}/logs/date/{date_start}/{date_end}
- GET /v1/children/{child_id}/logs/{resource}/date/{date_start}/{date_end}
- POST /v1/children/{child_id}/sleep
- GET /v1/children/{child_id}/sleep
- GET /v1/children/{child_id}/sleep/{sleep_id}
- DELETE /v1/children/{child_id}/sleep/{sleep_id}
- POST /v1/children/{child_id}/weights
- GET /v1/children/{child_id}/weights
- GET /v1/children/{child_id}/weights/{weight_id}
- DELETE /v1/children/{child_id}/weights/{weight_id}
- POST /v1/children/{child_id}/bodyfats
- GET /v1/children/{child_id}/bodyfats
- GET /v1/children/{child_id}/bodyfats/{bodyfat_id}
- DELETE /v1/children/{child_id}/bodyfats/{bodyfat_id}
- POST /v1/institutions/{institution_id}/environments
- GET /v1/institutions/{institution_id}/environments
- DELETE /v1/institutions/{institution_id}/environments
- DELETE /v1/institutions/{institution_id}/environments/{environment_id}
- GET /v1/fitbit
- POST /v1/users/{user_id}/fitbit/auth
- GET /v1/users/{user_id}/fitbit/auth
- POST /v1/users/{user_id}/fitbit/auth/revoke
- GET /v1/q1sociodemographics/count
- PUT /v1/q1sociodemographics/{id}
- PATCH /v1/q1sociodemographics/{id}
- GET /v1/q1sociodemographics/{id}
- DELETE /v1/q1sociodemographics/{id}
- POST /v1/q1sociodemographics
- PATCH /v1/q1sociodemographics
- GET /v1/q1sociodemographics
- GET /v1/q21childshealthconditions/count
- PUT /v1/q21childshealthconditions/{id}
- PATCH /v1/q21childshealthconditions/{id}
- GET /v1/q21childshealthconditions/{id}
- DELETE /v1/q21childshealthconditions/{id}
- POST /v1/q21childshealthconditions
- PATCH /v1/q21childshealthconditions
- GET /v1/q21childshealthconditions
- GET /v1/q22parentshealthconditions/count
- PUT /v1/q22parentshealthconditions/{id}
- PATCH /v1/q22parentshealthconditions/{id}
- GET /v1/q22parentshealthconditions/{id}
- DELETE /v1/q22parentshealthconditions/{id}
- POST /v1/q22parentshealthconditions
- PATCH v1/q22parentshealthconditions
- GET /v1/q22parentshealthconditions
- GET /v1/q23ipaq/count
- PUT /v1/q23ipaq/{id}
- PATCH /v1/q23ipaq/{id}
- GET /v1/q23ipaq/{id}
- DELETE /v1/q23ipaq/{id}
- POST /v1/q23ipaq
- PATCH /v1/q23ipaq
- GET /v1/q23ipaq
- GET /v1/q3physicalandanthropometricmeasures/count
- PUT /v1/q3physicalandanthropometricmeasures/{id}
- PATCH /v1/q3physicalandanthropometricmeasures/{id}
- GET /v1/q3physicalandanthropometricmeasures/{id}
- DELETE /v1/q3physicalandanthropometricmeasures/{id}
- POST /v1/q3physicalandanthropometricmeasures
- PATCH /v1/q3physicalandanthropometricmeasures
- GET /v1/q3physicalandanthropometricmeasures
- GET /v1/q401ffq/count
- PUT /v1/q401ffq/{id}
- PATCH /v1/q401ffq/{id}
- GET /v1/q401ffq/{id}
- DELETE /v1/q401ffq/{id}
- POST /v1/q401ffq
- PATCH /v1/q401ffq
- GET /v1/q401ffq
- GET /v1/q402foodhabitsandfeedingbehaviors/count
- PUT /v1/q402foodhabitsandfeedingbehaviors/{id}
- PATCH /v1/q402foodhabitsandfeedingbehaviors/{id}
- GET /v1/q402foodhabitsandfeedingbehaviors/{id}
- DELETE /v1/q402foodhabitsandfeedingbehaviors/{id}
- POST /v1/q402foodhabitsandfeedingbehaviors
- PATCH /v1/q402foodhabitsandfeedingbehaviors
- GET /v1/q402foodhabitsandfeedingbehaviors
- GET /v1/q501physicalactivityforchildren/count
- PUT /v1/q501physicalactivityforchildren/{id}
- PATCH /v1/q501physicalactivityforchildren/{id}
- GET /v1/q501physicalactivityforchildren/{id}
- DELETE /v1/q501physicalactivityforchildren/{id}
- POST /v1/q501physicalactivityforchildren
- PATCH /v1/q501physicalactivityforchildren
- GET /v1/q501physicalactivityforchildren
- GET /v1/q502physicalactivityandsedentaryhabits/count
- PUT /v1/q502physicalactivityandsedentaryhabits/{id}
- PATCH /v1/q502physicalactivityandsedentaryhabits/{id}
- GET /v1/q502physicalactivityandsedentaryhabits/{id}
- DELETE /v1/q502physicalactivityandsedentaryhabits/{id}
- POST /v1/q502physicalactivityandsedentaryhabits
- PATCH /v1/q502physicalactivityandsedentaryhabits
- GET /v1/q502physicalactivityandsedentaryhabits
- GET /v1/q503sleepinghabits/count
- PUT /v1/q503sleepinghabits/{id}
- PATCH /v1/q503sleepinghabits/{id}
- GET /v1/q503sleepinghabits/{id}
- DELETE /v1/q503sleepinghabits/{id}
- POST /v1/q503sleepinghabits
- PATCH /v1/q503sleepinghabits
- GET /v1/q503sleepinghabits
- GET /v1/q601childeatingbehaviour/count
- PUT /v1/q601childeatingbehaviour/{id}
- PATCH /v1/q601childeatingbehaviour/{id}
- GET /v1/q601childeatingbehaviour/{id}
- DELETE /v1/q601childeatingbehaviour/{id}
- POST /v1/q601childeatingbehaviour
- PATCH /v1/q601childeatingbehaviour
- GET /v1/q601childeatingbehaviour
- GET /v1/q602autoperception/count
- PUT /v1/q602autoperception/{id}
- PATCH /v1/q602autoperception/{id}
- GET /v1/q602autoperception/{id}
- DELETE /v1/q602autoperception/{id}
- POST /v1/q602autoperception
- PATCH /v1/q602autoperception
- GET /v1/q602autoperception
- GET /v1/qfoodtrackings/count
- PUT /v1/qfoodtrackings/{id}
- PATCH /v1/qfoodtrackings/{id}
- GET /v1/qfoodtrackings/{id}
- DELETE /v1/qfoodtrackings/{id}
- POST /v1/qfoodtrackings
- PATCH /v1/qfoodtrackings
- GET /v1/qfoodtrackings
- GET /v1/agentreports/count
- PUT /v1/agentreports/{id}
- PATCH /v1/agentreports/{id}
- GET /v1/agentreports/{id}
- DELETE /v1/agentreports/{id}
- POST /v1/agentreports
- PATCH /v1/agentreports
- GET /v1/agentreports
- GET /v1/badges/count
- PUT /v1/badges/{id}
- PATCH /v1/badges/{id}
- GET /v1/badges/{id}
- DELETE /v1/badges/{id}
- POST /v1/badges
- PATCH /v1/badges
- GET /v1/badges
- GET /v1/customizationitems/count
- PUT /v1/customizationitems/{id}
- PATCH /v1/customizationitems/{id}
- GET /v1/customizationitems/{id}
- DELETE /v1/customizationitems/{id}
- POST /v1/customizationitems
- PATCH /v1/customizationitems
- GET /v1/customizationitems
- GET /v1/gamificationprofiles/count
- PUT /v1/gamificationprofiles/{id}
- PATCH /v1/gamificationprofiles/{id}
- GET /v1/gamificationprofiles/{id}
- DELETE /v1/gamificationprofiles/{id}
- POST /v1/gamificationprofiles
- PATCH /v1/gamificationprofiles
- GET /v1/gamificationprofiles
- GET /v1/missions/count
- PUT /v1/missions/{id}
- PATCH /v1/missions/{id}
- GET /v1/missions/{id}
- DELETE /v1/missions/{id}
- POST /v1/missions
- PATCH /v1/missions
- GET /v1/missions
- GET /v1/questions/count
- PUT /v1/questions/{id}
- PATCH /v1/questions/{id}
- GET /v1/questions/{id}
- DELETE /v1/questions/{id}
- POST /v1/questions
- PATCH /v1/questions
- GET /v1/questions
- GET /v1/foodqs/count
- PUT /v1/foodqs/{id}
- PATCH /v1/foodqs/{id}
- GET /v1/foodqs/{id}
- DELETE /v1/foodqs/{id}
- POST /v1/foodqs
- PATCH /v1/foodqs
- GET /v1/foodqs
- GET /v1/observations/observations-severities/{childId}
- GET /v1/observations/analyze-results/{childId}
- POST /v1/observations/update-progress/{missionId}
- POST /v1/observations/activate-mission/{missionId}
- POST /v1/observations/complete-mission/{missionId}
- GET /v1/observations/get-active-missions/{childId}
- GET /v1/observations/get-completed-missions/{childId}
- GET /v1/observations/get-all-missions/{childId}
- GET /v1/observations/get-stratification/{childId}
- POST /v1/observations/answer-question/{childId}
- GET /v1/observations/get-questionnaires
- GET /v1/observations/get-week-questionnaires/{childId}
- GET /v1/robot-result/food-recognition/{childId}
- POST /v1/robot-result/food-recognition
- POST /v1/robot-result
- GET /v1/robot-result/mission/{childId}
- POST /v1/educator-missions
- GET /v1/educator-missions
- GET /v1/educator-missions/{missionId}
- PUT /v1/educator-missions/{missionId}
- DELETE /v1/educator-missions/{missionId}
- POST /v1/educator-missions/activate
- POST /v1/educator-missions/validate
- GET /v1/educator-missions/active/{childId}
- GET /v1/educator-missions/completed/{childId}
- POST /v1/educator-missions/assign
- GET /v1/educator-missions/assign/{childId}
- POST /v1/notifications/user/{userId}
- GET /v1/notifications/pendingnotification/{userId}
- DELETE /v1/notifications/deletetoken/{userId}
OCARIoT API Gateway (Full documentation)
- POST institutions
- GET institutions
- GET institutions.inst_id
- PATCH institutions.inst_id
- DELETE institutions.inst_id
- POST children.physicalactivities
- GET children.physicalactivities
- GET children.physicalactivities.activity_id
- DELETE children.physicalactivities.activity_id
- POST children.weights
- GET children.weights
- GET children.weights.weight_id
- DELETE children.weights.weight_id
- POST children.bodyfats
- GET children.bodyfats
- GET children.bodyfats.bodyfat_id
- DELETE children.bodyfats.bodyfat_id
- POST educators.children.groups
- GET educators.children.groups
- GET educators.children.groups.group_id
- PATCH educators.children.groups.group_id
- DELETE educators.children.groups.group_id
- POST healthprofessionals
- GET healthprofessionals
- GET healthprofessionals.hprof_id
- PATCH healthprofessionals.hprof_id
- POST healthprofessionals.children.groups
- GET healthprofessionals.children.groups
- GET healthprofessionals.children.groups.group_id
- PATCH healthprofessionals.children.groups.group_id
- DELETE healthprofessionals.children.groups.group_id
- POST institutions.environments
- GET institutions.environments
- DELETE institutions.environments
- DELETE institutions.environments.environment_id
- Invalid ID
- Invalid JSON format
- Missing fields
- Empty string
- Invalid string
- Invalid date
- Negative number
- Invalid number
- Unregistered institution
- Unregistered children
- Invalid children attribute type
- Invalid children items
- Empty ID(s) in children attribute
- ID(s) with invalid format in children
- Attempting to update password on wrong route
- Child does not exist
- Institution does not exist