curl --request GET \
--url https://{region}.api.plerion.com/v1/tenant/assets \
--header 'Authorization: Bearer <token>'import requests
url = "https://{region}.api.plerion.com/v1/tenant/assets"
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/assets', 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/assets",
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/assets"
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/assets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/assets")
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": [
{
"schemaVersion": "2022-06-09",
"id": "prn:assets:00000000-0000-4000-8000-000000000000:aws:ec2:instance:ap-southeast-2:i-085a328dba59f229b",
"organizationId": "dc16d897-7f52-4b73-be57-96c7c9a853da",
"tenantId": "42749bc1-c99b-4c2c-a081-a6cda9370081",
"integrationId": "458511a1-9bc2-4fce-97a0-0e3139588e6e",
"ownerTeamId": "3f0c2a7e-1b8d-4c55-9a61-0d2f7e9b4c11",
"ownerPersonId": "8a1d4b2c-77e0-4f3a-b9c5-2e6d1f0a9b33",
"executionId": 1675576960384,
"provider": "AWS",
"type": "AWS::EC2::Instance",
"name": "i-085a328dba59f229b",
"createdAt": "2023-02-04T06:07:09.092Z",
"firstObservedAt": "2023-02-04T06:02:40.594Z",
"lastObservedAt": "2023-02-05T06:02:40.384Z",
"updatedAt": "2023-02-05T06:07:02.959Z",
"tags": [
{
"Key": "Department",
"Value": "Finance"
}
],
"isPubliclyExposed": false,
"grantsExternalAccess": false,
"isVulnerable": false,
"numberOfLowVulnerabilities": 85,
"numberOfMediumVulnerabilities": 60,
"numberOfHighVulnerabilities": 15,
"numberOfCriticalVulnerabilities": 5,
"vulnerabilityScore": 9,
"hasKev": false,
"hasExploit": false,
"isExploitable": false,
"isInVpc": false,
"lastScanId": 1679594910265,
"lastScannedAt": "2023-03-23T18:17:20.003Z",
"imageId": "<string>",
"platform": "<string>",
"hasAdminPrivileges": false,
"hasOverlyPermissivePrivileges": false,
"isInactiveIdentity": false,
"hasLongLivedCredentials": false,
"hasWeakAuthentication": false,
"isEndOfLife": false,
"hasAuthorizer": false,
"hasTracingEnabled": false,
"policy": {},
"numberOfLowSecrets": 3,
"numberOfMediumSecrets": 1,
"numberOfHighSecrets": 0,
"numberOfCriticalSecrets": 2,
"lowSecrets": [
{}
],
"mediumSecrets": [
{}
],
"highSecrets": [
{}
],
"criticalSecrets": [
{}
],
"operatingSystem": [
{
"architecture": "x86_64",
"name": "Ubuntu",
"platform": "Linux/UNIX",
"version": "24.04.2 LTS (Noble Numbat)",
"versionId": 24.04,
"activeKernel": "4.14.246-197.484.amzn2.x86_64",
"buildNumber": "20348.fe_release.210507-1500",
"lcuVersion": "10.0.20348.2762"
}
],
"riskScore": 9.36,
"operationalState": "active",
"region": "us-east-1",
"service": "AWS::EC2",
"resourceId": "i-085a328dba59f229b",
"resourceName": "test-instance",
"resourceTags": [
{
"Key": "Public",
"Value": true
}
],
"resourceType": "AWS::EC2::Instance",
"fullResourceName": "arn:aws:iam::1111222233334444:policy/test-policy",
"providerAccountId": 123456789012,
"resourceURL": "https://us-east-1.console.aws.amazon.com/iam/home#/policies/arn:aws:iam::1111222233334444:policy/test-policy"
}
],
"meta": {
"page": 1,
"perPage": 100,
"total": 200,
"hasNextPage": true,
"hasPreviousPage": false
}
}List assets
Use the list assets API to filter assets across the tenant with many options from Provider, Service, Severity, Integration, etc. By default all assets are returned.
curl --request GET \
--url https://{region}.api.plerion.com/v1/tenant/assets \
--header 'Authorization: Bearer <token>'import requests
url = "https://{region}.api.plerion.com/v1/tenant/assets"
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/assets', 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/assets",
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/assets"
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/assets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/assets")
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": [
{
"schemaVersion": "2022-06-09",
"id": "prn:assets:00000000-0000-4000-8000-000000000000:aws:ec2:instance:ap-southeast-2:i-085a328dba59f229b",
"organizationId": "dc16d897-7f52-4b73-be57-96c7c9a853da",
"tenantId": "42749bc1-c99b-4c2c-a081-a6cda9370081",
"integrationId": "458511a1-9bc2-4fce-97a0-0e3139588e6e",
"ownerTeamId": "3f0c2a7e-1b8d-4c55-9a61-0d2f7e9b4c11",
"ownerPersonId": "8a1d4b2c-77e0-4f3a-b9c5-2e6d1f0a9b33",
"executionId": 1675576960384,
"provider": "AWS",
"type": "AWS::EC2::Instance",
"name": "i-085a328dba59f229b",
"createdAt": "2023-02-04T06:07:09.092Z",
"firstObservedAt": "2023-02-04T06:02:40.594Z",
"lastObservedAt": "2023-02-05T06:02:40.384Z",
"updatedAt": "2023-02-05T06:07:02.959Z",
"tags": [
{
"Key": "Department",
"Value": "Finance"
}
],
"isPubliclyExposed": false,
"grantsExternalAccess": false,
"isVulnerable": false,
"numberOfLowVulnerabilities": 85,
"numberOfMediumVulnerabilities": 60,
"numberOfHighVulnerabilities": 15,
"numberOfCriticalVulnerabilities": 5,
"vulnerabilityScore": 9,
"hasKev": false,
"hasExploit": false,
"isExploitable": false,
"isInVpc": false,
"lastScanId": 1679594910265,
"lastScannedAt": "2023-03-23T18:17:20.003Z",
"imageId": "<string>",
"platform": "<string>",
"hasAdminPrivileges": false,
"hasOverlyPermissivePrivileges": false,
"isInactiveIdentity": false,
"hasLongLivedCredentials": false,
"hasWeakAuthentication": false,
"isEndOfLife": false,
"hasAuthorizer": false,
"hasTracingEnabled": false,
"policy": {},
"numberOfLowSecrets": 3,
"numberOfMediumSecrets": 1,
"numberOfHighSecrets": 0,
"numberOfCriticalSecrets": 2,
"lowSecrets": [
{}
],
"mediumSecrets": [
{}
],
"highSecrets": [
{}
],
"criticalSecrets": [
{}
],
"operatingSystem": [
{
"architecture": "x86_64",
"name": "Ubuntu",
"platform": "Linux/UNIX",
"version": "24.04.2 LTS (Noble Numbat)",
"versionId": 24.04,
"activeKernel": "4.14.246-197.484.amzn2.x86_64",
"buildNumber": "20348.fe_release.210507-1500",
"lcuVersion": "10.0.20348.2762"
}
],
"riskScore": 9.36,
"operationalState": "active",
"region": "us-east-1",
"service": "AWS::EC2",
"resourceId": "i-085a328dba59f229b",
"resourceName": "test-instance",
"resourceTags": [
{
"Key": "Public",
"Value": true
}
],
"resourceType": "AWS::EC2::Instance",
"fullResourceName": "arn:aws:iam::1111222233334444:policy/test-policy",
"providerAccountId": 123456789012,
"resourceURL": "https://us-east-1.console.aws.amazon.com/iam/home#/policies/arn:aws:iam::1111222233334444:policy/test-policy"
}
],
"meta": {
"page": 1,
"perPage": 100,
"total": 200,
"hasNextPage": true,
"hasPreviousPage": false
}
}Authorizations
Headers
Query Parameters
Filter assets whose team or person owner is one of these owner IDs. Accepts a comma-separated list. For assets with any owner or with none, use noOwner. See Ownership.
"3f0c2a7e-1b8d-4c55-9a61-0d2f7e9b4c11,8a1d4b2c-77e0-4f3a-b9c5-2e6d1f0a9b33"
Filter assets based on environment IDs. This parameter accepts both environment IDs (UUIDs) and environment names.
Supported environment names:
production- Production environmentnon-production- Non-production environment
You can provide either environment IDs, environment names, or a combination of both.
"production,550e8400-e29b-41d4-a716-446655440000"
Filter assets based on cloud provider services. Accepts a comma-separated list of service names. Each service can be specified either by its name alone (e.g., S3, Lambda, EC2) or prefixed with its provider in the format Provider::Service (e.g., AWS::S3, GCP::Compute, Azure::VirtualMachine).
"AWS::S3,GCP::Compute,Azure::VirtualMachine"
Start of the date range for filtering assets based on the first observed time.
Specify the start of the range using a valid ISO 8601 date-time string.
If firstObservedAtStart is provided and firstObservedAtEnd is omitted,
results will include assets from this date to the present.
Supported formats include:
yyyy-MM-ddTHH:mm:ssZ(e.g.,2020-12-18T08:00:00Z)yyyy-MM-ddTHH:mm:ss.SSSZ(e.g.,2020-12-18T08:00:00.000Z)
"2023-02-01T18:09:07Z"
End of the date range for filtering assets based on the first observed time.
Specify the end of the range using a valid ISO 8601 date-time string.
If firstObservedAtEnd is provided and firstObservedAtStart is omitted,
results will include assets up to this date.
Supported formats include:
yyyy-MM-ddTHH:mm:ssZ(e.g.,2020-12-18T08:00:00Z)yyyy-MM-ddTHH:mm:ss.SSSZ(e.g.,2020-12-18T08:00:00.000Z)
"2023-02-01T18:09:07Z"
Filter assets based on whether the asset is an inactive identity, such as a user or service account with no recent activity, a user with a password or access key left unused, or a service account key left unused. How long counts as inactive depends on the detection, and some let you configure it. The supported values are true or false
true
Filter assets based on whether the asset grants access to a principal outside your AWS organization, whether or not you've trusted that principal. The supported values are true or false. false returns every other asset, including assets Plerion doesn't check for external access.
true
Filter assets based on their operational state. Accepts a comma-separated list of operational states.
Supported values:
active— running workloadsinactive— not running workloads
Supported resource types:
- AWS EC2 Instance —
activeindicates the instance is in arunningstate;inactiveindicates it isstoppedorterminated.
When this filter is applied, only assets belonging to resource types that support operational state are returned.
active, inactive "active"
Order the list by supported field
id, executionId, integrationId, resourceType, service, region, name, provider, firstObservedAt, lastObservedAt, riskScore, vulnerabilityScore, numberOfLowVulnerabilities, numberOfMediumVulnerabilities, numberOfHighVulnerabilities, numberOfCriticalVulnerabilities "executionId"
Was this page helpful?