mio · Acciones GPT
mio
This is the mio database server
GET /get-user-data/Get User dataGet user data such as daily calorie goals
POST /create-user/Create UserCreate a new user profile
POST /update-userUpdate UserUpdate user info such as age, height, or weight or timezone
GET /get_current_user_time_and_user_infoGet Current User Time, User Info, Food Diary, Activity Log, and User RecipesGET /get-food-diary/Get Food DiaryGet food diary with the time period the user asked for
POST /insert-food-entriesInsert UserInsert food entries the user just shared
POST /delete-food-entriesDelete Food EntriesDelete any food entries the user asked for, can only delete the latest entry of that specific food
POST /update-food-entriesUpdate Food EntriesUpdate any food entries the user asked to be updated, can only update the latest entry of that specific food
GET /get-recipes/Get RecipesGet recipes created by the user with optional filters for recipe name or tags
POST /insert-recipesInsert RecipesInsert multiple new recipes created by the user
POST /delete-recipesDelete RecipesDelete recipes specified by the user
POST /update-recipesUpdate RecipesUpdate details of existing recipes, updating only the latest entry of a specific recipe
GET /get-activities/Get activitiesGet any activity the user has logged previously
POST /insert-activity-entriesInsert Activity EntriesInsert any activities the user has submitted
POST /update-activity-entriesUpdate Activity EntriesUpdate activity entries the user has shared, will only update the latest entry of that specific activity
POST /delete-activity-entriesDelete Activity EntriesDelete any activity entries the user asked for, can only delete the latest entry of that specific activity
Esquema original API
{
"openapi": "3.1.0",
"info": {
"title": "mio",
"description": "This is the mio database server",
"version": "1.0.0"
},
"paths": {
"/get-user-data/": {
"get": {
"tags": [
"Database"
],
"summary": "Get User data",
"description": "Get user data such as daily calorie goals",
"operationId": "get_user_data_",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
},
"security": [
{
"Auth0ImplicitBearer": []
},
{
"Auth0HTTPBearer": []
}
],
"x-openai-isConsequential": false
}
},
"/create-user/": {
"post": {
"tags": [
"Database"
],
"summary": "Create User",
"description": "Create a new user profile",
"operationId": "insert_user_create__post",
"security": [
{
"Auth0ImplicitBearer": []
},
{
"Auth0HTTPBearer": []
}
],
"parameters": [
{
"name": "username",
"in": "query",
"required": true,
"schema": {
"type": "string",
"title": "Username"
}
},
{
"name": "daily_calorie_goal",
"in": "query",
"required": true,
"schema": {
"type": "number",
"title": "Daily Calorie Goal"
}
},
{
"name": "daily_protein_percentage",
"in": "query",
"required": true,
"schema": {
"type": "number",
"title": "Daily Protein Percentage"
}
},
{
"name": "daily_carbs_percentage",
"in": "query",
"required": true,
"schema": {
"type": "number",
"title": "Daily Carbs Percentage"
}
},
{
"name": "daily_fats_percentage",
"in": "query",
"required": true,
"schema": {
"type": "number",
"title": "Daily Fats Percentage"
}
},
{
"name": "daily_activity_goal",
"in": "query",
"required": true,
"schema": {
"type": "number",
"title": "Daily Activity Goal"
}
},
{
"name": "age",
"in": "query",
"required": true,
"schema": {
"type": "number",
"title": "Age"
}
},
{
"name": "height",
"in": "query",
"required": true,
"schema": {
"type": "string",
"title": "Height"
}
},
{
"name": "weight",
"in": "query",
"required": true,
"schema": {
"type": "string",
"title": "Weight"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"x-openai-isConsequential": false
}
},
"/update-user": {
"post": {
"tags": [
"Database"
],
"summary": "Update User",
"description": "Update user info such as age, height, or weight or timezone",
"operationId": "update_user_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateUserRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Auth0ImplicitBearer": []
},
{
"Auth0HTTPBearer": []
}
],
"x-openai-isConsequential": false
}
},
"/get_current_user_time_and_user_info": {
"get": {
"tags": [
"Helper"
],
"summary": "Get Current User Time, User Info, Food Diary, Activity Log, and User Recipes",
"operationId": "get_current_user_time_and_info",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
},
"security": [
{
"Auth0ImplicitBearer": []
},
{
"Auth0HTTPBearer": []
}
],
"x-openai-isConsequential": false
}
},
"/get-food-diary/": {
"get": {
"tags": [
"Database"
],
"summary": "Get Food Diary",
"description": "Get food diary with the time period the user asked for",
"operationId": "get_food_diary_",
"security": [
{
"Auth0ImplicitBearer": []
},
{
"Auth0HTTPBearer": []
}
],
"parameters": [
{
"name": "start_time",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 formatted date-time with timezone for the start of the time window. Example: '2024-01-23T10:00:00+00:00'",
"title": "Start Time"
},
"description": "ISO 8601 formatted date-time with timezone for the start of the time window. Example: '2024-01-23T10:00:00+00:00'"
},
{
"name": "end_time",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 formatted date-time with timezone for the end of the time window. Example: '2024-01-23T10:00:00+00:00'",
"title": "End Time"
},
"description": "ISO 8601 formatted date-time with timezone for the end of the time window. Example: '2024-01-23T10:00:00+00:00'"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"x-openai-isConsequential": false
}
},
"/insert-food-entries": {
"post": {
"tags": [
"Database"
],
"summary": "Insert User",
"description": "Insert food entries the user just shared",
"operationId": "insert_food_entries_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FoodEntries"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Auth0ImplicitBearer": []
},
{
"Auth0HTTPBearer": []
}
],
"x-openai-isConsequential": false
}
},
"/delete-food-entries": {
"post": {
"tags": [
"Database"
],
"summary": "Delete Food Entries",
"description": "Delete any food entries the user asked for, can only delete the latest entry of that specific food",
"operationId": "delete_food_entries_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FoodEntriesNames"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Auth0ImplicitBearer": []
},
{
"Auth0HTTPBearer": []
}
],
"x-openai-isConsequential": false
}
},
"/update-food-entries": {
"post": {
"tags": [
"Database"
],
"summary": "Update Food Entries",
"description": "Update any food entries the user asked to be updated, can only update the latest entry of that specific food",
"operationId": "update_food_entries_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FoodEntries"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Auth0ImplicitBearer": []
},
{
"Auth0HTTPBearer": []
}
],
"x-openai-isConsequential": false
}
},
"/get-recipes/": {
"get": {
"tags": [
"Database"
],
"summary": "Get Recipes",
"description": "Get recipes created by the user with optional filters for recipe name or tags",
"operationId": "get_recipes_",
"security": [
{
"Auth0ImplicitBearer": []
},
{
"Auth0HTTPBearer": []
}
],
"parameters": [
{
"name": "recipe_name",
"in": "query",
"required": true,
"schema": {
"type": "string",
"description": "Optional filter by recipe name",
"title": "Recipe Name"
},
"description": "Optional filter by recipe name"
},
{
"name": "tag",
"in": "query",
"required": true,
"schema": {
"type": "string",
"description": "Optional filter by tag",
"title": "Tag"
},
"description": "Optional filter by tag"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"x-openai-isConsequential": false
}
},
"/insert-recipes": {
"post": {
"tags": [
"Database"
],
"summary": "Insert Recipes",
"description": "Insert multiple new recipes created by the user",
"operationId": "insert_recipes_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Recipes"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Auth0ImplicitBearer": []
},
{
"Auth0HTTPBearer": []
}
],
"x-openai-isConsequential": false
}
},
"/delete-recipes": {
"post": {
"tags": [
"Database"
],
"summary": "Delete Recipes",
"description": "Delete recipes specified by the user",
"operationId": "delete_recipes_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RecipeNames"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Auth0ImplicitBearer": []
},
{
"Auth0HTTPBearer": []
}
],
"x-openai-isConsequential": false
}
},
"/update-recipes": {
"post": {
"tags": [
"Database"
],
"summary": "Update Recipes",
"description": "Update details of existing recipes, updating only the latest entry of a specific recipe",
"operationId": "update_recipes_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Recipes"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Auth0ImplicitBearer": []
},
{
"Auth0HTTPBearer": []
}
],
"x-openai-isConsequential": false
}
},
"/get-activities/": {
"get": {
"tags": [
"Database"
],
"summary": "Get activities",
"description": "Get any activity the user has logged previously",
"operationId": "get_activities_",
"security": [
{
"Auth0ImplicitBearer": []
},
{
"Auth0HTTPBearer": []
}
],
"parameters": [
{
"name": "start_time",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 formatted date-time with timezone for the start of the time window. Example: '2024-01-23T10:00:00+00:00'",
"title": "Start Time"
},
"description": "ISO 8601 formatted date-time with timezone for the start of the time window. Example: '2024-01-23T10:00:00+00:00'"
},
{
"name": "end_time",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 formatted date-time with timezone for the end of the time window. Example: '2024-01-23T10:00:00+00:00'",
"title": "End Time"
},
"description": "ISO 8601 formatted date-time with timezone for the end of the time window. Example: '2024-01-23T10:00:00+00:00'"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"x-openai-isConsequential": false
}
},
"/insert-activity-entries": {
"post": {
"tags": [
"Database"
],
"summary": "Insert Activity Entries",
"description": "Insert any activities the user has submitted",
"operationId": "insert_activity_entries_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ActivityEntries"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Auth0ImplicitBearer": []
},
{
"Auth0HTTPBearer": []
}
],
"x-openai-isConsequential": false
}
},
"/update-activity-entries": {
"post": {
"tags": [
"Database"
],
"summary": "Update Activity Entries",
"description": "Update activity entries the user has shared, will only update the latest entry of that specific activity",
"operationId": "update_activity_entries_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ActivityEntries"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Auth0ImplicitBearer": []
},
{
"Auth0HTTPBearer": []
}
],
"x-openai-isConsequential": false
}
},
"/delete-activity-entries": {
"post": {
"tags": [
"Database"
],
"summary": "Delete Activity Entries",
"description": "Delete any activity entries the user asked for, can only delete the latest entry of that specific activity",
"operationId": "delete_activity_entries_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ActivityEntryNames"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"Auth0ImplicitBearer": []
},
{
"Auth0HTTPBearer": []
}
],
"x-openai-isConsequential": false
}
}
},
"components": {
"schemas": {
"ActivityEntries": {
"properties": {
"activity_entries": {
"items": {
"$ref": "#/components/schemas/ActivityEntry"
},
"type": "array",
"title": "Activity Entries",
"description": "List of activities"
}
},
"type": "object",
"required": [
"activity_entries"
],
"title": "ActivityEntries"
},
"ActivityEntry": {
"properties": {
"activity_type": {
"type": "string",
"title": "Activity Type"
},
"duration_in_minutes": {
"type": "number",
"title": "Duration In Minutes"
},
"calories_burned": {
"type": "number",
"title": "Calories Burned"
},
"completed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Completed At",
"description": "ISO 8601 formatted date-time with timezone for the completion time of the activity. Example: '2024-01-23T10:00:00+00:00'"
}
},
"type": "object",
"required": [
"activity_type",
"duration_in_minutes",
"calories_burned"
],
"title": "ActivityEntry"
},
"ActivityEntryName": {
"properties": {
"activity_type": {
"type": "string",
"title": "Activity Type"
}
},
"type": "object",
"required": [
"activity_type"
],
"title": "ActivityEntryName"
},
"ActivityEntryNames": {
"properties": {
"activity_entries_names": {
"items": {
"$ref": "#/components/schemas/ActivityEntryName"
},
"type": "array",
"title": "Activity Entries Names",
"description": "List of activity entries names"
}
},
"type": "object",
"required": [
"activity_entries_names"
],
"title": "ActivityEntryNames"
},
"FoodEntries": {
"properties": {
"food_entries": {
"items": {
"$ref": "#/components/schemas/FoodEntry"
},
"type": "array",
"title": "Food Entries",
"description": "List of food entries"
}
},
"type": "object",
"required": [
"food_entries"
],
"title": "FoodEntries"
},
"FoodEntriesNames": {
"properties": {
"food_entries_names": {
"items": {
"$ref": "#/components/schemas/FoodEntryName"
},
"type": "array",
"title": "Food Entries Names",
"description": "List of food entries names"
}
},
"type": "object",
"required": [
"food_entries_names"
],
"title": "FoodEntriesNames"
},
"FoodEntry": {
"properties": {
"food_name": {
"type": "string",
"title": "Food Name"
},
"serving_size": {
"type": "string",
"title": "Serving Size"
},
"calories": {
"type": "number",
"title": "Calories"
},
"protein_grams": {
"type": "number",
"title": "Protein Grams"
},
"carbs_grams": {
"type": "number",
"title": "Carbs Grams"
},
"fats_grams": {
"type": "number",
"title": "Fats Grams"
},
"meal_type": {
"type": "string",
"title": "Meal Type"
},
"consumed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Consumed At",
"description": "ISO 8601 formatted date-time with timezone for the consumption time of the food-entry. Example: '2024-01-23T10:00:00+00:00'"
}
},
"type": "object",
"required": [
"food_name",
"serving_size",
"calories",
"protein_grams",
"carbs_grams",
"fats_grams",
"meal_type"
],
"title": "FoodEntry"
},
"FoodEntryName": {
"properties": {
"food_name": {
"type": "string",
"title": "Food Name"
}
},
"type": "object",
"required": [
"food_name"
],
"title": "FoodEntryName"
},
"HTTPValidationError": {
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
},
"Recipe": {
"properties": {
"recipe_name": {
"type": "string",
"title": "Recipe Name"
},
"recipe_steps": {
"type": "string",
"title": "Recipe Steps"
},
"suggested_serving": {
"type": "string",
"title": "Suggested Serving"
},
"total_servings_made": {
"type": "string",
"title": "Total Servings Made"
},
"calorie_estimate_per_serving": {
"type": "string",
"title": "Calorie Estimate Per Serving"
},
"tags": {
"items": {
"type": "string"
},
"type": "array",
"title": "Tags"
},
"ingredients": {
"items": {
"type": "string"
},
"type": "array",
"title": "Ingredients"
}
},
"type": "object",
"required": [
"recipe_name",
"recipe_steps",
"suggested_serving",
"total_servings_made",
"calorie_estimate_per_serving",
"tags",
"ingredients"
],
"title": "Recipe"
},
"RecipeName": {
"properties": {
"recipe_name": {
"type": "string",
"title": "Recipe Name"
}
},
"type": "object",
"required": [
"recipe_name"
],
"title": "RecipeName"
},
"RecipeNames": {
"properties": {
"recipe_names": {
"items": {
"$ref": "#/components/schemas/RecipeName"
},
"type": "array",
"title": "Recipe Names",
"description": "List of recipe names"
}
},
"type": "object",
"required": [
"recipe_names"
],
"title": "RecipeNames"
},
"Recipes": {
"properties": {
"recipes": {
"items": {
"$ref": "#/components/schemas/Recipe"
},
"type": "array",
"title": "Recipes",
"description": "List of recipes"
}
},
"type": "object",
"required": [
"recipes"
],
"title": "Recipes"
},
"UpdateUserRequest": {
"properties": {
"username": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Username"
},
"daily_calorie_goal": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Daily Calorie Goal"
},
"daily_protein_percentage": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Daily Protein Percentage"
},
"daily_carbs_percentage": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Daily Carbs Percentage"
},
"daily_fats_percentage": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Daily Fats Percentage"
},
"daily_activity_goal": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Daily Activity Goal"
},
"local_timezone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Local Timezone"
},
"age": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Age"
},
"height": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Height"
},
"weight": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Weight"
}
},
"type": "object",
"title": "UpdateUserRequest"
},
"ValidationError": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
}
},
"securitySchemes": {
"Auth0ImplicitBearer": {
"type": "oauth2",
"flows": {
"implicit": {
"scopes": {},
"authorizationUrl": "https://dev-ywafix8czs5pz6wm.us.auth0.com/authorize?audience=amo-test.com"
}
}
}
}
},
"servers": [
{
"url": "https://mio.os-1.xyz/",
"description": "Production Server"
}
]
}