Get Secret Details
curl --request GET \
--url https://example.com/api/secrets/{secret_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://example.com/api/secrets/{secret_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://example.com/api/secrets/{secret_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://example.com/api/secrets/{secret_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://example.com/api/secrets/{secret_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://example.com/api/secrets/{secret_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://example.com/api/secrets/{secret_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 123,
"secret": "<string>",
"description": "<string>",
"file": "<string>",
"line": "<string>",
"start_line": 123,
"end_line": 123,
"start_column": 123,
"end_column": 123,
"match": "<string>",
"rule": "<string>",
"commit": "<string>",
"author": "<string>",
"email": "<string>",
"date": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"repository_id": 123,
"message": "<string>",
"fingerprint": "<string>",
"entropy": 123,
"severity": "critical",
"scan_type": "repo_scan",
"whitelisted": true,
"whitelist_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"pr_id": 123,
"pr_scan_id": 123,
"commit_id": 123,
"live_commit_id": 123,
"live_commit_scan_id": 123,
"repository": {
"id": 123,
"name": "<string>",
"repoUrl": "<string>",
"author": "<string>",
"lastScanDate": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Secrets
Get Secret Details
GET
/
secrets
/
{secret_id}
Get Secret Details
curl --request GET \
--url https://example.com/api/secrets/{secret_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://example.com/api/secrets/{secret_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://example.com/api/secrets/{secret_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://example.com/api/secrets/{secret_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://example.com/api/secrets/{secret_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://example.com/api/secrets/{secret_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://example.com/api/secrets/{secret_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 123,
"secret": "<string>",
"description": "<string>",
"file": "<string>",
"line": "<string>",
"start_line": 123,
"end_line": 123,
"start_column": 123,
"end_column": 123,
"match": "<string>",
"rule": "<string>",
"commit": "<string>",
"author": "<string>",
"email": "<string>",
"date": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"repository_id": 123,
"message": "<string>",
"fingerprint": "<string>",
"entropy": 123,
"severity": "critical",
"scan_type": "repo_scan",
"whitelisted": true,
"whitelist_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"pr_id": 123,
"pr_scan_id": 123,
"commit_id": 123,
"live_commit_id": 123,
"live_commit_scan_id": 123,
"repository": {
"id": 123,
"name": "<string>",
"repoUrl": "<string>",
"author": "<string>",
"lastScanDate": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
Available options:
critical, high, medium, low, informational, unknown Available options:
repo_scan, pr_scan, live_commit Show child attributes
Show child attributes