Skip to content

Commit d1223c4

Browse files
authored
Document JSON/YAML request body support in README
1 parent d03f5d9 commit d1223c4

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1657,6 +1657,21 @@ sources:
16571657

16581658
The server exposes a REST API at `http://localhost:8080` (default). For complete API documentation with all request/response schemas, see the interactive Swagger UI at `/api/v1/docs/`.
16591659

1660+
#### Request Body Formats (JSON and YAML)
1661+
1662+
Every endpoint that accepts a request body accepts **both JSON and YAML** payloads
1663+
interchangeably. The format is selected from the request's `Content-Type` header:
1664+
send `application/json` (the default) for JSON, or one of `application/yaml`,
1665+
`application/x-yaml`, or `text/yaml` for YAML. When no `Content-Type` is provided,
1666+
the body is parsed as JSON.
1667+
1668+
```bash
1669+
# Create a query using a YAML body
1670+
curl -X POST http://localhost:8080/api/v1/queries \
1671+
-H "Content-Type: application/yaml" \
1672+
--data-binary $'id: high-values\nquery: "MATCH (n) WHERE n.value > 75 RETURN n"\nautoStart: true'
1673+
```
1674+
16601675
### API Documentation
16611676

16621677
| Endpoint | Description |

0 commit comments

Comments
 (0)