mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 13:01:56 +00:00
docs(api): use mintlify for API specs
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: "List Latest Resources"
|
||||
api: "GET /api/v1/resources/latest"
|
||||
description: "Retrieve resources from the latest scans for each provider."
|
||||
---
|
||||
|
||||
Retrieve cloud resources from the most recent scan for each provider. This endpoint automatically filters to only include data from the latest scans.
|
||||
|
||||
## Query Parameters
|
||||
|
||||
### Filtering Options
|
||||
|
||||
**By Provider:**
|
||||
- `filter[provider]`, `filter[provider__in]` - Filter by provider UUID(s)
|
||||
- `filter[provider_type]`, `filter[provider_type__in]` - Filter by provider type
|
||||
|
||||
**By Resource:**
|
||||
- `filter[resource_type]`, `filter[resource_type__icontains]` - Filter by resource type
|
||||
- `filter[resource_name]`, `filter[resource_name__icontains]` - Filter by resource name
|
||||
- `filter[region]`, `filter[region__in]` - Filter by region
|
||||
- `filter[service]` - Filter by cloud service
|
||||
|
||||
### Pagination & Sorting
|
||||
|
||||
- `page[number]`, `page[size]` - Pagination controls
|
||||
- `sort` - Field to sort by
|
||||
|
||||
## Example Request
|
||||
|
||||
```bash
|
||||
curl -X GET "https://api.prowler.com/api/v1/resources/latest?filter[provider_type]=aws&filter[service]=s3" \
|
||||
-H "Authorization: Bearer YOUR_API_KEY" \
|
||||
-H "Content-Type: application/vnd.api+json"
|
||||
```
|
||||
|
||||
## Response
|
||||
|
||||
Returns resources from the latest scans only.
|
||||
|
||||
<Note>
|
||||
This endpoint is optimized for dashboard views showing current infrastructure state.
|
||||
</Note>
|
||||
@@ -0,0 +1,43 @@
|
||||
---
|
||||
title: "List Resources"
|
||||
api: "GET /api/v1/resources"
|
||||
description: "Retrieve a list of all cloud resources discovered during scans."
|
||||
---
|
||||
|
||||
Retrieve all cloud resources (EC2 instances, S3 buckets, IAM roles, etc.) discovered across your providers.
|
||||
|
||||
## Query Parameters
|
||||
|
||||
### Required Filters
|
||||
- `filter[inserted_at]` - At least one variation of this filter is required
|
||||
- `filter[inserted_at__gte]`, `filter[inserted_at__lte]` - Filter by date range (maximum 7 days)
|
||||
|
||||
### Filtering Options
|
||||
|
||||
**By Provider:**
|
||||
- `filter[provider]`, `filter[provider__in]` - Filter by provider UUID(s)
|
||||
- `filter[provider_type]`, `filter[provider_type__in]` - Filter by provider type
|
||||
|
||||
**By Resource:**
|
||||
- `filter[resource_type]`, `filter[resource_type__icontains]` - Filter by resource type
|
||||
- `filter[resource_name]`, `filter[resource_name__icontains]` - Filter by resource name
|
||||
- `filter[resource_uid]`, `filter[resource_uid__icontains]` - Filter by resource UID
|
||||
- `filter[region]`, `filter[region__in]` - Filter by region
|
||||
- `filter[service]`, `filter[service__icontains]` - Filter by cloud service
|
||||
|
||||
### Pagination & Sorting
|
||||
|
||||
- `page[number]`, `page[size]` - Pagination controls
|
||||
- `sort` - Field to sort by
|
||||
|
||||
## Example Request
|
||||
|
||||
```bash
|
||||
curl -X GET "https://api.prowler.com/api/v1/resources?filter[inserted_at__gte]=2024-01-01&filter[resource_type]=aws_s3_bucket" \
|
||||
-H "Authorization: Bearer YOUR_API_KEY" \
|
||||
-H "Content-Type: application/vnd.api+json"
|
||||
```
|
||||
|
||||
## Response
|
||||
|
||||
Returns a paginated list of cloud resources with their metadata.
|
||||
@@ -0,0 +1,29 @@
|
||||
---
|
||||
title: "Retrieve Latest Resources Metadata"
|
||||
api: "GET /api/v1/resources/metadata/latest"
|
||||
description: "Fetch unique metadata values from latest scan resources."
|
||||
---
|
||||
|
||||
Retrieve metadata values from resources in the most recent scans for each provider.
|
||||
|
||||
## Query Parameters
|
||||
|
||||
### Filtering Options
|
||||
|
||||
Filter by provider, resource type, region, service, etc.
|
||||
|
||||
### Field Selection
|
||||
|
||||
- `fields[resources-metadata]` - Specify which fields to return
|
||||
|
||||
## Example Request
|
||||
|
||||
```bash
|
||||
curl -X GET "https://api.prowler.com/api/v1/resources/metadata/latest?filter[provider_type]=azure" \
|
||||
-H "Authorization: Bearer YOUR_API_KEY" \
|
||||
-H "Content-Type: application/vnd.api+json"
|
||||
```
|
||||
|
||||
## Response
|
||||
|
||||
Returns unique metadata values from latest scan resources.
|
||||
@@ -0,0 +1,32 @@
|
||||
---
|
||||
title: "Retrieve Resources Metadata"
|
||||
api: "GET /api/v1/resources/metadata"
|
||||
description: "Fetch unique metadata values from resources for dynamic filtering."
|
||||
---
|
||||
|
||||
Retrieve unique metadata values (services, regions, resource types) from your resources. Useful for building dynamic filters.
|
||||
|
||||
## Query Parameters
|
||||
|
||||
### Required Filters
|
||||
- `filter[inserted_at]` - At least one variation required (maximum 7 days range)
|
||||
|
||||
### Filtering Options
|
||||
|
||||
Similar to the list resources endpoint - filter by provider, resource type, region, etc.
|
||||
|
||||
### Field Selection
|
||||
|
||||
- `fields[resources-metadata]` - Specify which fields to return
|
||||
|
||||
## Example Request
|
||||
|
||||
```bash
|
||||
curl -X GET "https://api.prowler.com/api/v1/resources/metadata?filter[inserted_at__gte]=2024-01-01&filter[provider_type]=aws" \
|
||||
-H "Authorization: Bearer YOUR_API_KEY" \
|
||||
-H "Content-Type: application/vnd.api+json"
|
||||
```
|
||||
|
||||
## Response
|
||||
|
||||
Returns unique metadata values from your resources.
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
title: "Retrieve Resource"
|
||||
api: "GET /api/v1/resources/{id}"
|
||||
description: "Fetch detailed information about a specific cloud resource."
|
||||
---
|
||||
|
||||
Retrieve detailed information about a specific cloud resource including its configuration and associated findings.
|
||||
|
||||
## Path Parameters
|
||||
|
||||
- `id` (required) - UUID of the resource
|
||||
|
||||
## Example Request
|
||||
|
||||
```bash
|
||||
curl -X GET "https://api.prowler.com/api/v1/resources/{id}" \
|
||||
-H "Authorization: Bearer YOUR_API_KEY" \
|
||||
-H "Content-Type: application/vnd.api+json"
|
||||
```
|
||||
|
||||
## Response
|
||||
|
||||
Returns detailed resource information including metadata and configuration.
|
||||
Reference in New Issue
Block a user