# JSON-RPC : interagir avec l’application

L'API JSON-RPC est utilisée pour executer des actions sur le serveur.

Les appels à l'API RPC se font toujours en tant que requête POST (à l'exception du «service discovery» qui est en GET ).

La commande est à envoyer sous forme d'un objet JSON, contenant au moins l'attribut `method` et l'attribut `id`. La valeur de l'attribut id est retourné à l'identique dans la réponse.

Si des paramètres sont nécessaires, ils sont à envoyer dans un attribut `params`.

Le serveur retourne toujours un objet JSON.

### Endpoints <a href="#rest-urlapi" id="rest-urlapi"></a>

<table><thead><tr><th width="169">Environnement</th><th>Endpoint</th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>Production</strong></mark></td><td><a href="https://api.mon-butin.fr/rpc">https://api.mon-butin.fr/rpc</a></td></tr><tr><td>Edge</td><td><a href="https://api.mon-butin.fr/rpc">https://api-edge.mon-butin.fr/rpc</a></td></tr><tr><td>Test</td><td><a href="https://api.mon-butin.fr/rpc">https://api-test.mon-butin.fr/rpc</a></td></tr></tbody></table>

### Service discovery <a href="#rpc-general" id="rpc-general"></a>

## Service discovery

<mark style="color:blue;">`GET`</mark> `/`

Retourne la liste des commandes disponibles


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mon-butin.fr/api/json-rpc-interagir-avec-lapplication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
