|
|
|
**(PUT)** Melakukan maintenance dengan mengupdate seluruh model yang digunakan
|
|
|
|
|
|
|
|
## URI
|
|
|
|
```
|
|
|
|
/maintenance
|
|
|
|
```
|
|
|
|
|
|
|
|
## Form Body
|
|
|
|
* `task_id` - `update`
|
|
|
|
|
|
|
|
## Contoh
|
|
|
|
### Request
|
|
|
|
```
|
|
|
|
import requests
|
|
|
|
|
|
|
|
url = "http://127.0.0.1:5000/maintenance"
|
|
|
|
|
|
|
|
payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"task_id\"\r\n\r\nupdate\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
|
|
|
|
headers = {'content-type': 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'}
|
|
|
|
|
|
|
|
response = requests.request("PUT", url, data=payload, headers=headers)
|
|
|
|
|
|
|
|
print(response.text)
|
|
|
|
```
|
|
|
|
### Hasil
|
|
|
|
```
|
|
|
|
{
|
|
|
|
"message": "sucessfully update all model"
|
|
|
|
}
|
|
|
|
``` |
|
|
|
\ No newline at end of file |