Skip to content

Commit

Permalink
docs(http): example usage
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdoret committed Oct 2, 2024
1 parent 3754bbf commit c86df56
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions fuzon-http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,36 @@ Start the server with:

Fuzzy matching queries should use `GET /top?collection={collection}&top={top}&query={query}`.

```shell
# example
$ curl 'http://localhost:8080/top?collection=cell_type&top=3&query=leukocyte'
[
{
"label":"\"myeloid leukocyte\"",
"uri":"<http://purl.obolibrary.org/obo/CL_0000766>",
"score":null
},
{
"label":"\"nongranular leukocyte\"",
"uri":"<http://purl.obolibrary.org/obo/CL_0002087>",
"score":null
},
{
"label":"\"myeloid leukocyte migration\"",
"uri":"<http://purl.obolibrary.org/obo/GO_0097529>",
"score":null
}
]
```

To discover available collections, use `GET /list`.

```shell
# example
$ curl 'http://localhost:8080/list'
["cell_type","source_material","taxon_id"]
```

## Example

Here is a minimal example of how fuzon-http may be used from a tool.
Expand Down

0 comments on commit c86df56

Please sign in to comment.