Skip to main content

GET /resources

Returns a list of all resources with pagination support. Only returns resources that have not been soft-deleted.

Authentication

This endpoint requires authentication.

Query Parameters

skip
integer
default:"0"
Number of resources to skip for pagination. Must be >= 0.
limit
integer
default:"10"
Maximum number of resources to return. Must be between 1 and 50.

Response

Returns an array of resource objects.
id
string
required
Unique identifier for the resource (MongoDB ObjectId)
wrapper_id
string
required
ID of the wrapper associated with this resource
name
string
required
Name of the resource
type
string
required
Type of the resource
startPeriod
datetime
Start period timestamp for the resource
endPeriod
datetime
End period timestamp for the resource

Example Request

curl -X GET "https://api.example.com/resources?skip=0&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

[
  {
    "id": "507f1f77bcf86cd799439011",
    "wrapper_id": "wrapper_123",
    "name": "Production Database",
    "type": "database",
    "startPeriod": "2024-01-15T10:30:00Z",
    "endPeriod": null
  },
  {
    "id": "507f1f77bcf86cd799439012",
    "wrapper_id": "wrapper_456",
    "name": "API Gateway",
    "type": "gateway",
    "startPeriod": "2024-02-20T14:45:00Z",
    "endPeriod": null
  }
]

Error Responses

422
Validation Error
Invalid query parameters (e.g., limit > 50 or skip < 0)
{
  "detail": [
    {
      "loc": ["query", "limit"],
      "msg": "ensure this value is less than or equal to 50",
      "type": "value_error.number.not_le"
    }
  ]
}
500
Internal Server Error
Database operation failed
{
  "detail": "Internal server error"
}

Build docs developers (and LLMs) love