Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ A public API for global CO2 measurements, powered by the [Ribbit Network](https:
## 📖 Documentation

Interactive API reference (try requests in the browser):
**[ribbit-api.fly.dev/docs](https://ribbit-api.fly.dev/docs)**
**[api.ribbitnetwork.org/docs](https://api.ribbitnetwork.org/docs)**

Machine-readable OpenAPI spec:
**[ribbit-api.fly.dev/openapi.yaml](https://ribbit-api.fly.dev/openapi.yaml)**
**[api.ribbitnetwork.org/openapi.yaml](https://api.ribbitnetwork.org/openapi.yaml)**

The spec also lives in this repo at [`internal/docs/openapi.yaml`](internal/docs/openapi.yaml) and is the source of truth — use it to generate client SDKs (`openapi-generator`, `oapi-codegen`, etc.) or to import into Postman / Insomnia / Bruno.

Expand All @@ -18,7 +18,7 @@ Once you have an [API key](#api-keys), fetch the last day of CO2 readings:

```sh
curl -H "Authorization: Bearer $RIBBIT_API_KEY" \
"https://ribbit-api.fly.dev/data?start=2024-01-01T00:00:00Z&stop=2024-01-02T00:00:00Z&fields=co2,lat,lon&interval=1h"
"https://api.ribbitnetwork.org/data?start=2024-01-01T00:00:00Z&stop=2024-01-02T00:00:00Z&fields=co2,lat,lon&interval=1h"
```

Endpoints at a glance:
Expand All @@ -31,7 +31,7 @@ Endpoints at a glance:
| `GET /data` | ✅ | Sensor measurements over a time range |
| `GET /sensors` | ✅ | List of known sensor IDs |

See **[/docs](https://ribbit-api.fly.dev/docs)** for full parameter, response, and error documentation.
See **[/docs](https://api.ribbitnetwork.org/docs)** for full parameter, response, and error documentation.

## Rate limits

Expand Down
4 changes: 3 additions & 1 deletion internal/docs/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ info:
url: https://github.com/Ribbit-Network/api

servers:
- url: https://ribbit-api.fly.dev
- url: https://api.ribbitnetwork.org
description: Production
- url: https://ribbit-api.fly.dev
description: Production (Fly-assigned fallback URL)
- url: http://localhost:8080
description: Local development

Expand Down
Loading