Get Single Entity
Endpoint
URL: /:projectId/entities/:entityId
Method: GET
Authentication Required: No
Description
Fetches a single entity by its ID. Publicly accessible.
Request
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
entityId | string | Yes | ID of the entity to retrieve. |
Example Request
GET /proj1234/entities/entity_abc
Response
Success Response (200 OK)
{
"id": "entity_abc",
"userId": "user_123",
"title": "Interesting Thought",
"content": "Here's something I've been thinking about...",
"keywords": ["thinking"],
"createdAt": "2024-01-01T00:00:00.000Z",
...
}
Error Responses
Invalid Entity ID (400 Bad Request)
{
"error": "Missing a valid entityId in request query.",
"code": "entity/invalid-resource-id"
}
Not Found (404 Not Found)
{
"error": "Entity not found",
"code": "entity/not-found"
}
Server Error (500 Internal Server Error)
{
"error": "Internal server error.",
"code": "entity/server-error",
"details": "<Error message>"
}
Notes
- No authentication is required.
- Entity score may be updated asynchronously after response is sent.
- Returned entity includes metadata, vote counts, and replies count if available.