Skip to main content

GET /resources/

Returns details for a specific resource by its ID. Only returns resources that have not been soft-deleted.

Authentication

This endpoint requires authentication.

Path Parameters

resource_id
string
required
The unique identifier of the resource (MongoDB ObjectId format)

Response

Returns a single resource object.
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/507f1f77bcf86cd799439011" \
  -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
}

Error Responses

400
Bad Request
Invalid resource ID format
{
  "detail": "Invalid resource ID"
}
404
Not Found
Resource not found
{
  "detail": "Resource not found"
}
500
Internal Server Error
Database operation failed
{
  "detail": "Internal server error"
}

Build docs developers (and LLMs) love