> For the complete documentation index, see [llms.txt](https://validators.spicenet.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://validators.spicenet.io/interacting-with-your-node/6.1-using-rest-api.md).

# 6.1 Using REST API

Spicenet provides a comprehensive REST API for interacting with your node. Here are some key endpoints and their usage:

1. Get events for a specific slot:

```bash
GET http://localhost:12346/ledger/events/{slot_number}
```

Example: `http://localhost:12346/ledger/events/17`

2. Get events for a specific transaction:

```
GET http://localhost:12346/ledger/txs/{tx_id}/events/{event_index}
```

Example: `http://localhost:12346/ledger/txs/50/events/0`

3. Get events with a specific key:

```
GET http://localhost:12346/ledger/batches/{batch_id}/txs/{tx_index}/events/{event_index}
```

Example: `http://localhost:12346/ledger/batches/10/txs/2/events/0`

To use these endpoints, you can use curl in your terminal or any HTTP client. For example:

```bash
curl -s http://localhost:12346/ledger/events/17 | jq
```

This will retrieve all events for slot 17 and format the JSON output for readability.
