Skip to main content
The resources endpoints give you access to InfraAudit’s cloud resource inventory. Resources are discovered automatically during provider syncs. You can filter by provider, resource type, region, and status, and drill into per-resource configuration snapshots, drifts, vulnerabilities, recommendations, and cost history. Base path: /api/v1/resources

GET /resources — list resources

Returns a paginated list of cloud resources across all connected providers.
GET /api/v1/resources
Authorization: Bearer <token>

Query parameters

provider_id
integer
Filter by provider ID.
type
string
Filter by resource type, for example ec2_instance, s3_bucket, or rds_instance.
region
string
Filter by cloud region, for example us-east-1.
status
string
Filter by status: active, stopped, or deleted.
page
integer
default:"1"
Page number.
per_page
integer
default:"20"
Results per page. Maximum is 100.

Response

{
  "data": [
    {
      "id": 1,
      "external_id": "i-0abc123def456",
      "name": "web-server-01",
      "resource_type": "ec2_instance",
      "provider_id": 1,
      "region": "us-east-1",
      "status": "active",
      "tags": { "env": "production" },
      "last_seen_at": "2024-01-15T06:00:00Z"
    }
  ],
  "meta": {
    "total": 247,
    "page": 1,
    "per_page": 20
  }
}
data
array
Array of resource objects.
data[].id
integer
Internal resource ID.
data[].external_id
string
The resource’s identifier in the cloud provider, for example an EC2 instance ID or S3 bucket name.
data[].resource_type
string
The resource type string, for example ec2_instance.
data[].status
string
Current status: active, stopped, or deleted.
data[].tags
object
Cloud tags as key-value pairs.

GET /resources/ — get resource

Returns the full resource record including the current configuration snapshot.
GET /api/v1/resources/{id}
Authorization: Bearer <token>

GET /resources//config — get configuration snapshot

Returns the raw configuration snapshot JSON for the resource.
GET /api/v1/resources/{id}/config
Authorization: Bearer <token>

Additional per-resource endpoints

EndpointDescription
GET /api/v1/resources/{id}/driftsList drift findings for this resource
GET /api/v1/resources/{id}/vulnerabilitiesList vulnerability findings for this resource
GET /api/v1/resources/{id}/recommendationsList AI-generated recommendations for this resource
GET /api/v1/resources/{id}/costGet cost history for this resource (query param: months, default 6)