Skip to content

Commit

Permalink
docs: talk about session idempotency
Browse files Browse the repository at this point in the history
- add information around session idempotency in rest api docs
- improve formatting

closes #58
  • Loading branch information
detj committed Sep 27, 2023
1 parent 1a399d3 commit fb1b4cf
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Measure APIs are built following sound REST API design principles. Find all the
- [Status Codes \& Troubleshooting](#status-codes--troubleshooting)
- [Resources \& Endpoints](#resources--endpoints)
- [PUT `/sessions`](#put-sessions)
- [Response Body](#response-body)
- [Request Body](#request-body)
- [Session Reference](#session-reference)
- [Resource Reference](#resource-reference)
Expand Down Expand Up @@ -65,13 +66,26 @@ This single, unified endopint accepts everything that was captured in a single M
- The maximum number of attributes allowed in a single event is capped to **10**.
- Ensure each event `timestamp` is in nanosecond precision - `"2023-08-24T14:51:38.000000534Z"`
- Successful response always return a `202 Accepted` with the following response
- Previously seen sessions matching by `session_id` won't be processed.

#### Response Body

- For new sessions

```json
{
"ok": "accepted"
}
```

- For already seen sessions

```json
{
"ok": "accepted, known session"
}
```

> **Note**
>
> A success response of `202 Accepted` means the server has accepted the session, but it may choose to not process & discard some events, metrics, traces and attachments depending on various conditions.
Expand Down

0 comments on commit fb1b4cf

Please sign in to comment.