Update a single repository.
curl --request PATCH \
--url https://api.example.com/api/v0/repositories/{repo_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"engagementId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timeframe": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"currencyCode": "<string>",
"totalRewardPot": "<string>",
"primaryPot": "<string>",
"additionalPotSplit": [
{
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"isTip": true
}
],
"stakeAmount": "<string>",
"submissionFee": "<string>",
"assetGroups": [
{
"name": "<string>",
"description": "<string>",
"outOfScope": true,
"rewards": [
{
"minReward": "<string>",
"maxReward": "<string>"
}
],
"assets": [
{
"name": "<string>",
"description": "<string>",
"reference": "<string>"
}
],
"action": "create",
"subGroups": [
{
"name": "<string>",
"assets": [
{
"name": "<string>",
"description": "<string>",
"reference": "<string>"
}
],
"description": "<string>"
}
]
}
],
"safeHarbor": {
"description": "<string>",
"reward": "<string>",
"returnAddresses": [
{
"address": "<string>",
"action": "create"
}
],
"cap": "<string>",
"assets": [
{
"name": "<string>",
"description": "<string>",
"action": "create"
}
]
},
"instructions": "<string>",
"allowedSeverities": [],
"consideredSeverities": [],
"pointCalculation": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allowedLabels": [
{
"name": "<string>",
"reviewerRead": true,
"reviewerUse": true,
"action": "create",
"description": "<string>"
}
],
"showAllFindings": true,
"publicMetadata": true,
"kycRequired": true,
"requiredCtfAddress": "<string>"
}
'import requests
url = "https://api.example.com/api/v0/repositories/{repo_id}"
payload = {
"name": "<string>",
"engagementId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timeframe": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"currencyCode": "<string>",
"totalRewardPot": "<string>",
"primaryPot": "<string>",
"additionalPotSplit": [
{
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"isTip": True
}
],
"stakeAmount": "<string>",
"submissionFee": "<string>",
"assetGroups": [
{
"name": "<string>",
"description": "<string>",
"outOfScope": True,
"rewards": [
{
"minReward": "<string>",
"maxReward": "<string>"
}
],
"assets": [
{
"name": "<string>",
"description": "<string>",
"reference": "<string>"
}
],
"action": "create",
"subGroups": [
{
"name": "<string>",
"assets": [
{
"name": "<string>",
"description": "<string>",
"reference": "<string>"
}
],
"description": "<string>"
}
]
}
],
"safeHarbor": {
"description": "<string>",
"reward": "<string>",
"returnAddresses": [
{
"address": "<string>",
"action": "create"
}
],
"cap": "<string>",
"assets": [
{
"name": "<string>",
"description": "<string>",
"action": "create"
}
]
},
"instructions": "<string>",
"allowedSeverities": [],
"consideredSeverities": [],
"pointCalculation": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allowedLabels": [
{
"name": "<string>",
"reviewerRead": True,
"reviewerUse": True,
"action": "create",
"description": "<string>"
}
],
"showAllFindings": True,
"publicMetadata": True,
"kycRequired": True,
"requiredCtfAddress": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
engagementId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
timeframe: {start: '2023-11-07T05:31:56Z', end: '2023-11-07T05:31:56Z'},
currencyCode: '<string>',
totalRewardPot: '<string>',
primaryPot: '<string>',
additionalPotSplit: [
{
teamId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: '<string>',
isTip: true
}
],
stakeAmount: '<string>',
submissionFee: '<string>',
assetGroups: [
{
name: '<string>',
description: '<string>',
outOfScope: true,
rewards: [{minReward: '<string>', maxReward: '<string>'}],
assets: [{name: '<string>', description: '<string>', reference: '<string>'}],
action: 'create',
subGroups: [
{
name: '<string>',
assets: [{name: '<string>', description: '<string>', reference: '<string>'}],
description: '<string>'
}
]
}
],
safeHarbor: {
description: '<string>',
reward: '<string>',
returnAddresses: [{address: '<string>', action: 'create'}],
cap: '<string>',
assets: [{name: '<string>', description: '<string>', action: 'create'}]
},
instructions: '<string>',
allowedSeverities: [],
consideredSeverities: [],
pointCalculation: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
allowedLabels: [
{
name: '<string>',
reviewerRead: true,
reviewerUse: true,
action: 'create',
description: '<string>'
}
],
showAllFindings: true,
publicMetadata: true,
kycRequired: true,
requiredCtfAddress: '<string>'
})
};
fetch('https://api.example.com/api/v0/repositories/{repo_id}', 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/{repo_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'engagementId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'timeframe' => [
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z'
],
'currencyCode' => '<string>',
'totalRewardPot' => '<string>',
'primaryPot' => '<string>',
'additionalPotSplit' => [
[
'teamId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => '<string>',
'isTip' => true
]
],
'stakeAmount' => '<string>',
'submissionFee' => '<string>',
'assetGroups' => [
[
'name' => '<string>',
'description' => '<string>',
'outOfScope' => true,
'rewards' => [
[
'minReward' => '<string>',
'maxReward' => '<string>'
]
],
'assets' => [
[
'name' => '<string>',
'description' => '<string>',
'reference' => '<string>'
]
],
'action' => 'create',
'subGroups' => [
[
'name' => '<string>',
'assets' => [
[
'name' => '<string>',
'description' => '<string>',
'reference' => '<string>'
]
],
'description' => '<string>'
]
]
]
],
'safeHarbor' => [
'description' => '<string>',
'reward' => '<string>',
'returnAddresses' => [
[
'address' => '<string>',
'action' => 'create'
]
],
'cap' => '<string>',
'assets' => [
[
'name' => '<string>',
'description' => '<string>',
'action' => 'create'
]
]
],
'instructions' => '<string>',
'allowedSeverities' => [
],
'consideredSeverities' => [
],
'pointCalculation' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'allowedLabels' => [
[
'name' => '<string>',
'reviewerRead' => true,
'reviewerUse' => true,
'action' => 'create',
'description' => '<string>'
]
],
'showAllFindings' => true,
'publicMetadata' => true,
'kycRequired' => true,
'requiredCtfAddress' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v0/repositories/{repo_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"engagementId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"timeframe\": {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n },\n \"currencyCode\": \"<string>\",\n \"totalRewardPot\": \"<string>\",\n \"primaryPot\": \"<string>\",\n \"additionalPotSplit\": [\n {\n \"teamId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": \"<string>\",\n \"isTip\": true\n }\n ],\n \"stakeAmount\": \"<string>\",\n \"submissionFee\": \"<string>\",\n \"assetGroups\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"outOfScope\": true,\n \"rewards\": [\n {\n \"minReward\": \"<string>\",\n \"maxReward\": \"<string>\"\n }\n ],\n \"assets\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"reference\": \"<string>\"\n }\n ],\n \"action\": \"create\",\n \"subGroups\": [\n {\n \"name\": \"<string>\",\n \"assets\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"reference\": \"<string>\"\n }\n ],\n \"description\": \"<string>\"\n }\n ]\n }\n ],\n \"safeHarbor\": {\n \"description\": \"<string>\",\n \"reward\": \"<string>\",\n \"returnAddresses\": [\n {\n \"address\": \"<string>\",\n \"action\": \"create\"\n }\n ],\n \"cap\": \"<string>\",\n \"assets\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"action\": \"create\"\n }\n ]\n },\n \"instructions\": \"<string>\",\n \"allowedSeverities\": [],\n \"consideredSeverities\": [],\n \"pointCalculation\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"allowedLabels\": [\n {\n \"name\": \"<string>\",\n \"reviewerRead\": true,\n \"reviewerUse\": true,\n \"action\": \"create\",\n \"description\": \"<string>\"\n }\n ],\n \"showAllFindings\": true,\n \"publicMetadata\": true,\n \"kycRequired\": true,\n \"requiredCtfAddress\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/api/v0/repositories/{repo_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"engagementId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"timeframe\": {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n },\n \"currencyCode\": \"<string>\",\n \"totalRewardPot\": \"<string>\",\n \"primaryPot\": \"<string>\",\n \"additionalPotSplit\": [\n {\n \"teamId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": \"<string>\",\n \"isTip\": true\n }\n ],\n \"stakeAmount\": \"<string>\",\n \"submissionFee\": \"<string>\",\n \"assetGroups\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"outOfScope\": true,\n \"rewards\": [\n {\n \"minReward\": \"<string>\",\n \"maxReward\": \"<string>\"\n }\n ],\n \"assets\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"reference\": \"<string>\"\n }\n ],\n \"action\": \"create\",\n \"subGroups\": [\n {\n \"name\": \"<string>\",\n \"assets\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"reference\": \"<string>\"\n }\n ],\n \"description\": \"<string>\"\n }\n ]\n }\n ],\n \"safeHarbor\": {\n \"description\": \"<string>\",\n \"reward\": \"<string>\",\n \"returnAddresses\": [\n {\n \"address\": \"<string>\",\n \"action\": \"create\"\n }\n ],\n \"cap\": \"<string>\",\n \"assets\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"action\": \"create\"\n }\n ]\n },\n \"instructions\": \"<string>\",\n \"allowedSeverities\": [],\n \"consideredSeverities\": [],\n \"pointCalculation\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"allowedLabels\": [\n {\n \"name\": \"<string>\",\n \"reviewerRead\": true,\n \"reviewerUse\": true,\n \"action\": \"create\",\n \"description\": \"<string>\"\n }\n ],\n \"showAllFindings\": true,\n \"publicMetadata\": true,\n \"kycRequired\": true,\n \"requiredCtfAddress\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v0/repositories/{repo_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"engagementId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"timeframe\": {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n },\n \"currencyCode\": \"<string>\",\n \"totalRewardPot\": \"<string>\",\n \"primaryPot\": \"<string>\",\n \"additionalPotSplit\": [\n {\n \"teamId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": \"<string>\",\n \"isTip\": true\n }\n ],\n \"stakeAmount\": \"<string>\",\n \"submissionFee\": \"<string>\",\n \"assetGroups\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"outOfScope\": true,\n \"rewards\": [\n {\n \"minReward\": \"<string>\",\n \"maxReward\": \"<string>\"\n }\n ],\n \"assets\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"reference\": \"<string>\"\n }\n ],\n \"action\": \"create\",\n \"subGroups\": [\n {\n \"name\": \"<string>\",\n \"assets\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"reference\": \"<string>\"\n }\n ],\n \"description\": \"<string>\"\n }\n ]\n }\n ],\n \"safeHarbor\": {\n \"description\": \"<string>\",\n \"reward\": \"<string>\",\n \"returnAddresses\": [\n {\n \"address\": \"<string>\",\n \"action\": \"create\"\n }\n ],\n \"cap\": \"<string>\",\n \"assets\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"action\": \"create\"\n }\n ]\n },\n \"instructions\": \"<string>\",\n \"allowedSeverities\": [],\n \"consideredSeverities\": [],\n \"pointCalculation\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"allowedLabels\": [\n {\n \"name\": \"<string>\",\n \"reviewerRead\": true,\n \"reviewerUse\": true,\n \"action\": \"create\",\n \"description\": \"<string>\"\n }\n ],\n \"showAllFindings\": true,\n \"publicMetadata\": true,\n \"kycRequired\": true,\n \"requiredCtfAddress\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"msg": "<string>"
}{
"msg": "<string>"
}{
"msg": "<string>"
}{
"msg": "<string>"
}{
"msg": "<string>"
}Repositories
Update a single repository.
Access control rules
- The requester must be an repository admin or client.
PATCH
/
api
/
v0
/
repositories
/
{repo_id}
Update a single repository.
curl --request PATCH \
--url https://api.example.com/api/v0/repositories/{repo_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"engagementId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timeframe": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"currencyCode": "<string>",
"totalRewardPot": "<string>",
"primaryPot": "<string>",
"additionalPotSplit": [
{
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"isTip": true
}
],
"stakeAmount": "<string>",
"submissionFee": "<string>",
"assetGroups": [
{
"name": "<string>",
"description": "<string>",
"outOfScope": true,
"rewards": [
{
"minReward": "<string>",
"maxReward": "<string>"
}
],
"assets": [
{
"name": "<string>",
"description": "<string>",
"reference": "<string>"
}
],
"action": "create",
"subGroups": [
{
"name": "<string>",
"assets": [
{
"name": "<string>",
"description": "<string>",
"reference": "<string>"
}
],
"description": "<string>"
}
]
}
],
"safeHarbor": {
"description": "<string>",
"reward": "<string>",
"returnAddresses": [
{
"address": "<string>",
"action": "create"
}
],
"cap": "<string>",
"assets": [
{
"name": "<string>",
"description": "<string>",
"action": "create"
}
]
},
"instructions": "<string>",
"allowedSeverities": [],
"consideredSeverities": [],
"pointCalculation": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allowedLabels": [
{
"name": "<string>",
"reviewerRead": true,
"reviewerUse": true,
"action": "create",
"description": "<string>"
}
],
"showAllFindings": true,
"publicMetadata": true,
"kycRequired": true,
"requiredCtfAddress": "<string>"
}
'import requests
url = "https://api.example.com/api/v0/repositories/{repo_id}"
payload = {
"name": "<string>",
"engagementId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timeframe": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"currencyCode": "<string>",
"totalRewardPot": "<string>",
"primaryPot": "<string>",
"additionalPotSplit": [
{
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"isTip": True
}
],
"stakeAmount": "<string>",
"submissionFee": "<string>",
"assetGroups": [
{
"name": "<string>",
"description": "<string>",
"outOfScope": True,
"rewards": [
{
"minReward": "<string>",
"maxReward": "<string>"
}
],
"assets": [
{
"name": "<string>",
"description": "<string>",
"reference": "<string>"
}
],
"action": "create",
"subGroups": [
{
"name": "<string>",
"assets": [
{
"name": "<string>",
"description": "<string>",
"reference": "<string>"
}
],
"description": "<string>"
}
]
}
],
"safeHarbor": {
"description": "<string>",
"reward": "<string>",
"returnAddresses": [
{
"address": "<string>",
"action": "create"
}
],
"cap": "<string>",
"assets": [
{
"name": "<string>",
"description": "<string>",
"action": "create"
}
]
},
"instructions": "<string>",
"allowedSeverities": [],
"consideredSeverities": [],
"pointCalculation": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allowedLabels": [
{
"name": "<string>",
"reviewerRead": True,
"reviewerUse": True,
"action": "create",
"description": "<string>"
}
],
"showAllFindings": True,
"publicMetadata": True,
"kycRequired": True,
"requiredCtfAddress": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
engagementId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
timeframe: {start: '2023-11-07T05:31:56Z', end: '2023-11-07T05:31:56Z'},
currencyCode: '<string>',
totalRewardPot: '<string>',
primaryPot: '<string>',
additionalPotSplit: [
{
teamId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: '<string>',
isTip: true
}
],
stakeAmount: '<string>',
submissionFee: '<string>',
assetGroups: [
{
name: '<string>',
description: '<string>',
outOfScope: true,
rewards: [{minReward: '<string>', maxReward: '<string>'}],
assets: [{name: '<string>', description: '<string>', reference: '<string>'}],
action: 'create',
subGroups: [
{
name: '<string>',
assets: [{name: '<string>', description: '<string>', reference: '<string>'}],
description: '<string>'
}
]
}
],
safeHarbor: {
description: '<string>',
reward: '<string>',
returnAddresses: [{address: '<string>', action: 'create'}],
cap: '<string>',
assets: [{name: '<string>', description: '<string>', action: 'create'}]
},
instructions: '<string>',
allowedSeverities: [],
consideredSeverities: [],
pointCalculation: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
allowedLabels: [
{
name: '<string>',
reviewerRead: true,
reviewerUse: true,
action: 'create',
description: '<string>'
}
],
showAllFindings: true,
publicMetadata: true,
kycRequired: true,
requiredCtfAddress: '<string>'
})
};
fetch('https://api.example.com/api/v0/repositories/{repo_id}', 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/{repo_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'engagementId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'timeframe' => [
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z'
],
'currencyCode' => '<string>',
'totalRewardPot' => '<string>',
'primaryPot' => '<string>',
'additionalPotSplit' => [
[
'teamId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => '<string>',
'isTip' => true
]
],
'stakeAmount' => '<string>',
'submissionFee' => '<string>',
'assetGroups' => [
[
'name' => '<string>',
'description' => '<string>',
'outOfScope' => true,
'rewards' => [
[
'minReward' => '<string>',
'maxReward' => '<string>'
]
],
'assets' => [
[
'name' => '<string>',
'description' => '<string>',
'reference' => '<string>'
]
],
'action' => 'create',
'subGroups' => [
[
'name' => '<string>',
'assets' => [
[
'name' => '<string>',
'description' => '<string>',
'reference' => '<string>'
]
],
'description' => '<string>'
]
]
]
],
'safeHarbor' => [
'description' => '<string>',
'reward' => '<string>',
'returnAddresses' => [
[
'address' => '<string>',
'action' => 'create'
]
],
'cap' => '<string>',
'assets' => [
[
'name' => '<string>',
'description' => '<string>',
'action' => 'create'
]
]
],
'instructions' => '<string>',
'allowedSeverities' => [
],
'consideredSeverities' => [
],
'pointCalculation' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'allowedLabels' => [
[
'name' => '<string>',
'reviewerRead' => true,
'reviewerUse' => true,
'action' => 'create',
'description' => '<string>'
]
],
'showAllFindings' => true,
'publicMetadata' => true,
'kycRequired' => true,
'requiredCtfAddress' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v0/repositories/{repo_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"engagementId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"timeframe\": {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n },\n \"currencyCode\": \"<string>\",\n \"totalRewardPot\": \"<string>\",\n \"primaryPot\": \"<string>\",\n \"additionalPotSplit\": [\n {\n \"teamId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": \"<string>\",\n \"isTip\": true\n }\n ],\n \"stakeAmount\": \"<string>\",\n \"submissionFee\": \"<string>\",\n \"assetGroups\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"outOfScope\": true,\n \"rewards\": [\n {\n \"minReward\": \"<string>\",\n \"maxReward\": \"<string>\"\n }\n ],\n \"assets\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"reference\": \"<string>\"\n }\n ],\n \"action\": \"create\",\n \"subGroups\": [\n {\n \"name\": \"<string>\",\n \"assets\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"reference\": \"<string>\"\n }\n ],\n \"description\": \"<string>\"\n }\n ]\n }\n ],\n \"safeHarbor\": {\n \"description\": \"<string>\",\n \"reward\": \"<string>\",\n \"returnAddresses\": [\n {\n \"address\": \"<string>\",\n \"action\": \"create\"\n }\n ],\n \"cap\": \"<string>\",\n \"assets\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"action\": \"create\"\n }\n ]\n },\n \"instructions\": \"<string>\",\n \"allowedSeverities\": [],\n \"consideredSeverities\": [],\n \"pointCalculation\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"allowedLabels\": [\n {\n \"name\": \"<string>\",\n \"reviewerRead\": true,\n \"reviewerUse\": true,\n \"action\": \"create\",\n \"description\": \"<string>\"\n }\n ],\n \"showAllFindings\": true,\n \"publicMetadata\": true,\n \"kycRequired\": true,\n \"requiredCtfAddress\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/api/v0/repositories/{repo_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"engagementId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"timeframe\": {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n },\n \"currencyCode\": \"<string>\",\n \"totalRewardPot\": \"<string>\",\n \"primaryPot\": \"<string>\",\n \"additionalPotSplit\": [\n {\n \"teamId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": \"<string>\",\n \"isTip\": true\n }\n ],\n \"stakeAmount\": \"<string>\",\n \"submissionFee\": \"<string>\",\n \"assetGroups\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"outOfScope\": true,\n \"rewards\": [\n {\n \"minReward\": \"<string>\",\n \"maxReward\": \"<string>\"\n }\n ],\n \"assets\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"reference\": \"<string>\"\n }\n ],\n \"action\": \"create\",\n \"subGroups\": [\n {\n \"name\": \"<string>\",\n \"assets\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"reference\": \"<string>\"\n }\n ],\n \"description\": \"<string>\"\n }\n ]\n }\n ],\n \"safeHarbor\": {\n \"description\": \"<string>\",\n \"reward\": \"<string>\",\n \"returnAddresses\": [\n {\n \"address\": \"<string>\",\n \"action\": \"create\"\n }\n ],\n \"cap\": \"<string>\",\n \"assets\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"action\": \"create\"\n }\n ]\n },\n \"instructions\": \"<string>\",\n \"allowedSeverities\": [],\n \"consideredSeverities\": [],\n \"pointCalculation\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"allowedLabels\": [\n {\n \"name\": \"<string>\",\n \"reviewerRead\": true,\n \"reviewerUse\": true,\n \"action\": \"create\",\n \"description\": \"<string>\"\n }\n ],\n \"showAllFindings\": true,\n \"publicMetadata\": true,\n \"kycRequired\": true,\n \"requiredCtfAddress\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v0/repositories/{repo_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"engagementId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"timeframe\": {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n },\n \"currencyCode\": \"<string>\",\n \"totalRewardPot\": \"<string>\",\n \"primaryPot\": \"<string>\",\n \"additionalPotSplit\": [\n {\n \"teamId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": \"<string>\",\n \"isTip\": true\n }\n ],\n \"stakeAmount\": \"<string>\",\n \"submissionFee\": \"<string>\",\n \"assetGroups\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"outOfScope\": true,\n \"rewards\": [\n {\n \"minReward\": \"<string>\",\n \"maxReward\": \"<string>\"\n }\n ],\n \"assets\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"reference\": \"<string>\"\n }\n ],\n \"action\": \"create\",\n \"subGroups\": [\n {\n \"name\": \"<string>\",\n \"assets\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"reference\": \"<string>\"\n }\n ],\n \"description\": \"<string>\"\n }\n ]\n }\n ],\n \"safeHarbor\": {\n \"description\": \"<string>\",\n \"reward\": \"<string>\",\n \"returnAddresses\": [\n {\n \"address\": \"<string>\",\n \"action\": \"create\"\n }\n ],\n \"cap\": \"<string>\",\n \"assets\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"action\": \"create\"\n }\n ]\n },\n \"instructions\": \"<string>\",\n \"allowedSeverities\": [],\n \"consideredSeverities\": [],\n \"pointCalculation\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"allowedLabels\": [\n {\n \"name\": \"<string>\",\n \"reviewerRead\": true,\n \"reviewerUse\": true,\n \"action\": \"create\",\n \"description\": \"<string>\"\n }\n ],\n \"showAllFindings\": true,\n \"publicMetadata\": true,\n \"kycRequired\": true,\n \"requiredCtfAddress\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"msg": "<string>"
}{
"msg": "<string>"
}{
"msg": "<string>"
}{
"msg": "<string>"
}{
"msg": "<string>"
}Path Parameters
Body
application/json
Represent a range where the start is always set but the end is optional.
Show child attributes
Show child attributes
Available options:
scoping, collaborative_review, private_contest, public_contest, private_bounty, public_bounty Status of a repository.
Available options:
draft, upcoming, live, judging, escalations, escalations_ended, complete, published Show child attributes
Show child attributes
Update asset groups.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Severity of a [Finding].
Available options:
critical, high, medium, low, informational, gas_optimization Severity of a [Finding].
Available options:
critical, high, medium, low, informational, gas_optimization Delete or add labels to a repository.
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Show all findings to researchers during judging and escalations
Company user access level for a repository.
Available options:
open, restricted Response
Repository updated
⌘I