Update ReadMe.md

This commit is contained in:
omma 2024-08-22 10:59:40 +03:30
parent 7ef4bda603
commit 31d6c0e058

View file

@ -14,6 +14,29 @@ POST
"password": "<password>"
}
```
**How it works?**
### To optain the jwt Token for the first time from other services
```python
import requests
url = 'http://<well_service_url>/token/'
credentials = {
"username": "your_username",
"password": "your_password"
}
response = requests.post(url, data=credentials)
token = response.json().get('access')
```
Store this token to use in future requests like this:
```python
headers = {
'Authorization': f'Bearer {token}',
}
response = requests.post('http://<well_service_url>/<...>/', headers=headers, json=data_to_send)
```
## Well related end-points
### 1. create
**URL:**