The "List All Protocol Configs" API endpoint provided by Krypcore allows users to retrieve information about all protocol configurations under a specific instance.
List All Protocol Config under the given instance.
200: OK SUCCESS 401: Unauthorized Failure in authentication
Copy {
"data" : {
"data" : [] ,
"limit" : 5 ,
"page" : 1 ,
"total" : 0
} ,
"message" : "Protocol configuration details fetched successfully" ,
"status" : true
}
Copy {
"message": "Invalid API key in request"
}
Take a look at how you might call this method using our official libraries, or via curl
curl Node.js (Fetch) Python Golang
Copy curl --location 'https://api.krypcore.com/api/v0/gasless/listAllProtocolConfig' \
--header 'Authorization: 81d4a427-xxxx-xxxx-xxxx-f8482816e872' \
--header 'Content-Type: application/json' \
--data '{
"page": 1,
"limit": 5,
"searchValue": "",
"searchIn": [],
"filterValue": "",
"filterIn": [],
"userId":"DEV_GSTE_75_xxxxxx"
}'
Copy var myHeaders = new Headers ();
myHeaders .append ( "Authorization" , "81d4a427-xxxx-xxxx-xxxx-f8482816e872" );
myHeaders .append ( "Content-Type" , "application/json" );
var raw = JSON .stringify ({
"page" : 1 ,
"limit" : 5 ,
"searchValue" : "" ,
"searchIn" : [] ,
"filterValue" : "" ,
"filterIn" : [] ,
"userId" : "DEV_GSTE_75_xxxxxx"
});
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://api.krypcore.com/api/v0/gasless/listAllProtocolConfig" , requestOptions)
.then (response => response .text ())
.then (result => console .log (result))
.catch (error => console .log ( 'error' , error));
Copy import requests
import json
url = "https://api.krypcore.com/api/v0/gasless/listAllProtocolConfig"
payload = json . dumps ({
"page" : 1 ,
"limit" : 5 ,
"searchValue" : "" ,
"searchIn" : [],
"filterValue" : "" ,
"filterIn" : [],
"userId" : "DEV_GSTE_75_xxxxxx"
})
headers = {
'Authorization' : '81d4a427-xxxx-xxxx-xxxx-f8482816e872' ,
'Content-Type' : 'application/json'
}
response = requests . request ( "POST" , url, headers = headers, data = payload)
print (response.text)
Copy package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main () {
url := "https://api.krypcore.com/api/v0/gasless/listAllProtocolConfig"
method := "POST"
payload := strings. NewReader ( `{` + "
" + `
"page": 1,` + "
" + `
"limit": 5,` + "
" + `
"searchValue": "",` + "
" + `
"searchIn": [],` + "
" + `
"filterValue": "",` + "
" + `
"filterIn": [],` + "
" + `
"userId":"DEV_GSTE_75_xxxxxx"` + "
" + `
}` )
client := & http.Client {
}
req, err := http. NewRequest (method, url, payload)
if err != nil {
fmt. Println (err)
return
}
req.Header. Add ( "Authorization" , "81d4a427-xxxx-xxxx-xxxx-f8482816e872" )
req.Header. Add ( "Content-Type" , "application/json" )
res, err := client. Do (req)
if err != nil {
fmt. Println (err)
return
}
defer res.Body. Close ()
body, err := ioutil. ReadAll (res.Body)
if err != nil {
fmt. Println (err)
return
}
fmt. Println ( string (body))
}