Add network
POST/v1/admin/network
Add network
The post_network endpoint allows administrators to create a new network entry in the system. It requires a JSON payload with details such as network ID, name, RPC URL, token, and explorer URL. The endpoint checks if the user is an administrator and whether the network already exists before proceeding with the creation. Successful creation returns a 201 status code; errors return appropriate HTTP status codes indicating the type of failure.
Request
- application/json
Body
required
explorer_url stringrequired
id int32required
name stringrequired
rpc_url stringrequired
token stringrequired
Responses
- 201
- 400
- 403
- 500
Network created
- text/plain
- Schema
Schema
string
Network already exists
- text/plain
- Schema
Schema
string
User is not admin
- text/plain
- Schema
Schema
string
Unexpected error
- text/plain
- Schema
Schema
string
Loading...