Set network status
PATCH/v1/admin/network/:network_id
Set network status
This endpoint allows an admin to update the status of a network by either blocking or unblocking it. It requires the network ID as a parameter and the new status in the request body. Admin privileges are required to access this functionality. The endpoint responds with a success message upon successful status change, or returns errors for unauthorized access, non-existent networks, unchanged statuses, or unexpected server issues.
Request
Path Parameters
network_id int32required
Network id
- application/json
Body
required
network_status booleanrequired
Responses
- 200
- 400
- 403
- 500
Network status changed
- text/plain
- Schema
Schema
string
Network is already in this status
- text/plain
- Schema
Schema
string
User is not admin
- text/plain
- Schema
Schema
string
Unexpected error
- text/plain
- Schema
Schema
string
Loading...