List scans
curl --request GET \
--url https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans \
--header 'Authorization: Bearer <token>'import requests
url = "https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans', 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://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans",
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://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans"
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://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans")
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{
"data": [
{
"id": "c056d03d-3f7a-4232-ace0-45403fe28340",
"createdAt": "2023-05-05T11:06:19.859Z",
"updatedAt": "2023-05-05T11:06:19.859Z",
"organizationId": "ec17a309-6b0a-4911-8d1d-8a5aa0ac4742",
"tenantId": "7934cf6d-fb34-4bda-adde-173a1fa30d9c",
"summary": {
"startedAt": 1683284776221,
"stoppedAt": 1683284779523,
"totalFileSize": 15187,
"totalFindings": 232,
"totalResources": 65,
"totalParsingErrors": 0,
"totalFailedFindings": 131,
"totalPassedFindings": 101,
"totalSkippedFindings": 0,
"totalVulnerabilities": 123
},
"artifactName": "artifact.zip",
"status": "SUCCESS",
"types": [
"terraform",
"dockerfile"
]
},
{
"id": "702de801-5f54-4bab-a504-0990f7b56830",
"createdAt": "2023-05-05T11:06:19.500Z",
"updatedAt": "2023-05-05T11:06:19.500Z",
"organizationId": "ec17a309-6b0a-4911-8d1d-8a5aa0ac4742",
"tenantId": "7934cf6d-fb34-4bda-adde-173a1fa30d9c",
"summary": {
"startedAt": 1683284775925,
"stoppedAt": 1683284779187,
"totalFileSize": 15187,
"totalFindings": 232,
"totalResources": 65,
"totalParsingErrors": 0,
"totalFailedFindings": 131,
"totalPassedFindings": 101,
"totalSkippedFindings": 0
},
"artifactName": "artifact.zip",
"status": "SUCCESS",
"types": [
"terraform",
"dockerfile"
]
}
],
"meta": {
"page": 1,
"perPage": 10,
"total": 74964,
"hasNextPage": true,
"hasPreviousPage": false
}
}List IaC Scans in a tenant
Retrieve all the scans for the tenant.
GET
/
v1
/
tenant
/
shiftleft
/
iac
/
scans
List scans
curl --request GET \
--url https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans \
--header 'Authorization: Bearer <token>'import requests
url = "https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans', 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://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans",
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://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans"
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://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans")
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{
"data": [
{
"id": "c056d03d-3f7a-4232-ace0-45403fe28340",
"createdAt": "2023-05-05T11:06:19.859Z",
"updatedAt": "2023-05-05T11:06:19.859Z",
"organizationId": "ec17a309-6b0a-4911-8d1d-8a5aa0ac4742",
"tenantId": "7934cf6d-fb34-4bda-adde-173a1fa30d9c",
"summary": {
"startedAt": 1683284776221,
"stoppedAt": 1683284779523,
"totalFileSize": 15187,
"totalFindings": 232,
"totalResources": 65,
"totalParsingErrors": 0,
"totalFailedFindings": 131,
"totalPassedFindings": 101,
"totalSkippedFindings": 0,
"totalVulnerabilities": 123
},
"artifactName": "artifact.zip",
"status": "SUCCESS",
"types": [
"terraform",
"dockerfile"
]
},
{
"id": "702de801-5f54-4bab-a504-0990f7b56830",
"createdAt": "2023-05-05T11:06:19.500Z",
"updatedAt": "2023-05-05T11:06:19.500Z",
"organizationId": "ec17a309-6b0a-4911-8d1d-8a5aa0ac4742",
"tenantId": "7934cf6d-fb34-4bda-adde-173a1fa30d9c",
"summary": {
"startedAt": 1683284775925,
"stoppedAt": 1683284779187,
"totalFileSize": 15187,
"totalFindings": 232,
"totalResources": 65,
"totalParsingErrors": 0,
"totalFailedFindings": 131,
"totalPassedFindings": 101,
"totalSkippedFindings": 0
},
"artifactName": "artifact.zip",
"status": "SUCCESS",
"types": [
"terraform",
"dockerfile"
]
}
],
"meta": {
"page": 1,
"perPage": 10,
"total": 74964,
"hasNextPage": true,
"hasPreviousPage": false
}
}Authorizations
Bearer API Key. For example, "Bearer {Tenant API Key}"
Headers
Bearer API Key. For example, "Bearer {Tenant API Key}"
application/json
Query Parameters
Filter scans based on ids. Accepts a comma-separated list of ids.
Example:
["uuid1,uuid2,uuid3"]
Filter scans based on artifact name. Accepts a comma-separated list of artifact names.
Example:
"my-iac.zip,my-iac2.zip"
Filter scans based on status. Accepts a comma-separated list of statuses.
Available options:
SUCCESS, FAILURE Example:
"SUCCESS"
Sort results by the specified field.
Available options:
id, createdAt, updatedAt, artifactName, status Example:
"createdAt"
Sort order for the results.
Available options:
asc, desc Example:
"asc"
Page number for the results. Accepts a positive integer.
Example:
1
Number of results per page. Accepts a positive integer.
Example:
10
Was this page helpful?
⌘I