Files
math-problems-structure/ENDPOINTS-EXAMPLE.md
2026-05-26 11:26:26 -04:00

69 lines
2.2 KiB
Markdown

# Endpoints examples
Test quick examples for each endpoint:
## Grade 1
### Join pictures with quantity
```bash
curl -X POST "http://127.0.0.1:8000/math/grade_1/join_pictures_with_quantity" \
-H "Content-Type: application/json" \
-d '{
"available_pictures": [
{"id": "picture-1", "name": "Apple", "image_path": "/images/apple.png"},
{"id": "picture-2", "name": "Banana", "image_path": "/images/banana.png"},
{"id": "picture-3", "name": "Car", "image_path": "/images/car.png"},
{"id": "picture-4", "name": "Dog", "image_path": "/images/dog.png"},
{"id": "picture-5", "name": "Elephant", "image_path": "/images/elephant.png"},
{"id": "picture-6", "name": "Fish", "image_path": "/images/fish.png"},
{"id": "picture-7", "name": "Grape", "image_path": "/images/grape.png"},
{"id": "picture-8", "name": "Hat", "image_path": "/images/hat.png"},
{"id": "picture-9", "name": "Ice Cream", "image_path": "/images/ice-cream.png"},
{"id": "picture-10", "name": "Juice", "image_path": "/images/juice.png"}
],
"container_count_per_side": 5,
"min_quantity": 1,
"max_quantity": 10,
"seed": 1
}'
```
### Where are more items
```bash
curl -X POST "http://127.0.0.1:8000/math/grade_1/where_are_more_items" \
-H "Content-Type: application/json" \
-d '{
"available_pictures": [
{"id": "picture-1", "name": "Panda", "image_path": "/images/panda.png"},
{"id": "picture-2", "name": "Koala", "image_path": "/images/koala.png"},
{"id": "picture-3", "name": "Orange", "image_path": "/images/orange.png"},
{"id": "picture-4", "name": "Apple", "image_path": "/images/apple.png"},
{"id": "picture-5", "name": "Donut", "image_path": "/images/donut.png"},
{"id": "picture-6", "name": "Candy", "image_path": "/images/candy.png"}
],
"comparison_count": 3,
"min_quantity": 1,
"max_quantity": 10,
"seed": 1
}'
```
### Compose and decompose numbers
```
curl -X POST "http://127.0.0.1:8000/math/grade_1/compose_and_decompose_numbers" \
-H "Content-Type: application/json" \
-d '{
"picture": {
"id": "cube",
"name": "Cube",
"image_path": "/images/cube.png"
},
"whole": 10,
"randomize_rows": false,
"seed": 1
}'
```