API EndpointsEntitiesFetch Entity by Short ID

Get Entity by Short ID

Endpoint

URL: /:projectId/entities/by-short-id

Method: GET

Authentication Required: No


Description

Retrieves a single entity using its shortId. Publicly accessible.


Request

Query Parameters

ParameterTypeRequiredDescription
shortIdstringYesThe short identifier of the entity.

Example Request

GET /proj1234/entities/by-short-id?shortId=3jh4sK

Response

Success Response (200 OK)

{
  "id": "entity_xyz",
  "shortId": "3jh4sK",
  "title": "Example Post",
  "content": "This is a sample entity.",
  "createdAt": "2024-01-01T00:00:00.000Z",
  ...
}

Error Responses

Missing Short ID (400 Bad Request)

{
  "error": "Missing shortId in request query.",
  "code": "entity/invalid-query-params"
}

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.
  • The shortId is typically used for easily shareable or user-friendly URLs.