/addCollectorForSwagger
1 min
POST
http://1.1.1.1/addCollectorForSwagger
Query Parameters
- account_id_to_collector_address_and_network_limits_and_currency_limitsobjectrequiredDescriptionDefault{ "please_insert_your_object_data_inside_the_requestBody": "your_object_here" }
- typestring[]requiredDescription
- creator_user_idstringrequiredExampleDescriptionDefault
- collector_idstringrequiredExampleDescriptionDefault1234
- collector_namestringrequiredExampleDescriptionDefaultmyCollector
- creation_time_in_secondsstringrequiredExampleDescriptionDefault1690976021
Body Parameters
- bodyaddCollectorForSwaggerRequest
- account_id_to_collector_addressobjectExample
{ "1": "0xF1722F2c8Bab975C321321E2942E0dCb951B9C4F" } - network_symbol_to_network_limitsobjectExample
{ "ETH": { "symbol": "ETH", "limits": [ { "max_total_fee": 10000000000000000000, "max_priority_fee": 1000000000000 } ] } } - currency_symbol_to_currency_limitsobjectExample
{ "ETH": { "symbol": "ETH", "limits": [ { "fee_ratio": 1, "fee_cap": 132000000854001 } ] } }
Responses
200
- addCollectorForSwaggerResponse
- FunctionDataobjectExample
{ "StatusCode": 0, "Meta": { "$ref": "#/components/schemas/MetaResponse" } }- StatusCodeintegerDescriptionDefault0
curl
curl --request POST \
--url 'http://1.1.1.1/addCollectorForSwagger?account_id_to_collector_address_and_network_limits_and_currency_limits=%22{%5Cn%20%20%5C%22please_insert_your_object_data_inside_the_requestBody%5C%22%3A%20%5C%22your_object_here%5C%22%5Cn}%20%5Cn%22&type=array&creator_user_id=chris%40gk8.io&collector_id=1234&collector_name=myCollector&creation_time_in_seconds=1690976021' \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("http://1.1.1.1/addCollectorForSwagger?account_id_to_collector_address_and_network_limits_and_currency_limits=\"{\\n \\\"please_insert_your_object_data_inside_the_requestBody\\\": \\\"your_object_here\\\"\\n} \\n\"&type=array&[email protected]&collector_id=1234&collector_name=myCollector&creation_time_in_seconds=1690976021", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("http://1.1.1.1/addCollectorForSwagger?account_id_to_collector_address_and_network_limits_and_currency_limits=\"{\n \\"please_insert_your_object_data_inside_the_requestBody\\": \\"your_object_here\\"\n} \n\"&type=array&[email protected]&collector_id=1234&collector_name=myCollector&creation_time_in_seconds=1690976021")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "http://1.1.1.1/addCollectorForSwagger?account_id_to_collector_address_and_network_limits_and_currency_limits=\"{\\n \\\"please_insert_your_object_data_inside_the_requestBody\\\": \\\"your_object_here\\\"\\n} \\n\"&type=array&[email protected]&collector_id=1234&collector_name=myCollector&creation_time_in_seconds=1690976021"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// success
{
"FunctionData": {
"StatusCode": 0
}
}Calling this request can be used for adding a new collector to MPC
- return - json with results and status code