Get the Pectra leaderboard.
curl --request GET \
--url https://api.example.com/api/v0/repositories/pectra/leaderboardimport requests
url = "https://api.example.com/api/v0/repositories/pectra/leaderboard"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v0/repositories/pectra/leaderboard', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v0/repositories/pectra/leaderboard",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v0/repositories/pectra/leaderboard"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v0/repositories/pectra/leaderboard")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v0/repositories/pectra/leaderboard")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"ranking": [
{
"position": 123,
"team": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"members": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"username": "<string>",
"avatar": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"name": "<string>",
"handle": "<string>",
"badges": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"image": "<string>",
"description": "<string>"
}
]
},
"criticalFindings": 123,
"highFindings": 123,
"mediumFindings": 123,
"lowFindings": 123,
"informationalFindings": 123,
"gasOptimizationFindings": 123,
"reward": "<string>"
}
]
}{
"msg": "<string>"
}{
"msg": "<string>"
}{
"msg": "<string>"
}{
"msg": "<string>"
}Repositories
Get the Pectra leaderboard.
Access control rules
- Publicly accessible.
GET
/
api
/
v0
/
repositories
/
pectra
/
leaderboard
Get the Pectra leaderboard.
curl --request GET \
--url https://api.example.com/api/v0/repositories/pectra/leaderboardimport requests
url = "https://api.example.com/api/v0/repositories/pectra/leaderboard"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v0/repositories/pectra/leaderboard', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v0/repositories/pectra/leaderboard",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v0/repositories/pectra/leaderboard"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v0/repositories/pectra/leaderboard")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v0/repositories/pectra/leaderboard")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"ranking": [
{
"position": 123,
"team": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"members": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"username": "<string>",
"avatar": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"name": "<string>",
"handle": "<string>",
"badges": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"image": "<string>",
"description": "<string>"
}
]
},
"criticalFindings": 123,
"highFindings": 123,
"mediumFindings": 123,
"lowFindings": 123,
"informationalFindings": 123,
"gasOptimizationFindings": 123,
"reward": "<string>"
}
]
}{
"msg": "<string>"
}{
"msg": "<string>"
}{
"msg": "<string>"
}{
"msg": "<string>"
}Response
Pectra leaderboard
Competition specific leaderboard.
Ranking of each team, ordered by reward, then findings found.
Show child attributes
Show child attributes
Delete a reaction from a comment on a finding in a repository.Get the leaderboard for the competition (per team)
⌘I