> ## Documentation index
>
> Fetch the complete documentation index at: https://andesine.app/docs/llms.txt
> Use it to find all pages before you explore further.

# Get an entry

`GET https://api.andesine.app/entries/get`

Returns current entry details, fragments, properties, and recorded schema metadata. Validates content without changing it. expectedSchemaHash must match the recorded schema; schema-less content cannot match it. Use content.get to read published content.

Required API key permissions: read:entries. Write permissions also grant read access for the same resource.

## Authentication

Use one of:

- `apiKey` (http, bearer, Andesine API key)
- `oauth` (http, bearer, Andesine OAuth access token)

## Parameters

### Query

- `id` (string, optional)
- `path` (string, optional): Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.
- `slugPath` (string, optional): Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.
- `expectedSchemaHash` (string, optional): Hash of the effective schema definition.
- `contentFormat` (string, optional): Content format of the response; mdx also returns the content as MDX in mdx, and blocks returns the blocks that edit operations address in blocks. One of: `"json"`, `"mdx"`, `"blocks"`. Default: `"json"`.

### Header

- `x-workspace-id` (string, optional): Required for OAuth: ID of the workspace to access. API keys use their own workspace.

## Responses

### 200

OK

Content type: `application/json`

- `id` (string, required): ID of the entry.
- `name` (string, required): Name of the entry.
- `order` (string, required): LexoRank order of the entry.
- `collectionID` (string, optional): ID of the collection this entry belongs to.
- `path` (string, required)
- `slugPath` (string, required)
- `schema` (any of, required)
  - Any of: `ContentSchemaMetadata`
    - `revisionID` (string, required): Recorded effective schema revision.
    - `hash` (string, required): Hash of the effective schema definition.
  - Any of: Option 2 (null)
- `updatedAt` (string, required): Time when the entry content was last updated.
- `hash` (string, required): Hash of the current content, comparable to version hashes.
- `content` (`ContentNode`, required)
  - `type` (string, required)
  - `attrs` (object, optional)
    - `{key}` (any, optional)
  - `content` (array of `ContentNode`, optional)
  - `marks` (array of `ContentMark`, optional)
    - `type` (string, required)
    - `attrs` (object, optional)
      - `{key}` (any, optional)
  - `text` (string, optional)
- `fragments` (object, required)
  - `{key}` (`EntryFragment`, optional)
    - `name` (string, required): Source fragment name.
    - `content` (`ContentNode`, required)
- `properties` (object, required)
  - `{key}` (`EntryProperty`, optional)
    - `name` (string, required): Source property name.
    - `type` (string, required): Property type. One of: `"text"`, `"number"`, `"checkbox"`, `"date"`, `"url"`, `"select"`, `"multi-select"`.
    - `value` (`EntryPropertyValue`, required)
      - Any of: Option 1 (string)
      - Any of: Option 2 (number)
      - Any of: Option 3 (boolean)
      - Any of: Option 4 (array of string)
      - Any of: Option 5 (null)
- `mdx` (string, optional): Content as MDX: the title as H1, properties as <Property name value /> elements in place, fragments as <Fragment name> elements, and images as asset:<assetID>; frontmatter properties are also read, and entries.update and versions.create import image URLs.
- `blocks` (array of object, optional)
  - `id` (string, required): Block ID for replaceBlock, insertBlocks, and deleteBlocks.
  - `type` (string, required): Node type of the block.
  - `fragment` (string, optional): Key of the fragment that contains the block.
  - `mdx` (string, required): Content as MDX: the title as H1, properties as <Property name value /> elements in place, fragments as <Fragment name> elements, and images as asset:<assetID>; frontmatter properties are also read, and entries.update and versions.create import image URLs.
- `references` (object, required): Entries linked with entry: links in the content, by entry ID.
  - `{key}` (any of, optional): Linked entry; deleted and unreadable entries are unavailable.
    - Any of: Option 1 (object)
      - `id` (string, required)
      - `available` (constant, required): Value: `true`.
      - `path` (string, required)
      - `slugPath` (string, required)
      - `title` (string, required)
      - `collectionID` (any of, required)
        - Any of: Option 1 (string)
        - Any of: Option 2 (null)
    - Any of: Option 2 (object)
      - `id` (string, required)
      - `available` (constant, required): Value: `false`.

### 400

400

Content type: `application/json`

Type: one of.

- One of: Option 1 (object)
  - `defined` (constant, required): Value: `true`.
  - `code` (constant, required): Value: `"BAD_REQUEST"`.
  - `status` (constant, required): Value: `400`.
  - `message` (string, required): Default: `"Bad Request"`.
  - `data` (`ValidationErrorData`, optional)
    - `hints` (array of string, optional): Suggested next steps. Wording can change; use error codes and structured data for program logic.
    - `issues` (array of `ValidationIssue`, optional)
      - `message` (string, required)
      - `code` (string, optional)
      - `path` (array of any of, optional)
        - Any of: Option 1 (string)
        - Any of: Option 2 (number)
        - Any of: Option 3 (object)
          - `key` (any of, required)
            - Any of: Option 1 (string)
            - Any of: Option 2 (number)
- One of: Option 2 (object)
  - `defined` (constant, required): Value: `false`.
  - `code` (string, required)
  - `status` (number, required)
  - `message` (string, required)
  - `data` (any, optional)

### 401

401

Content type: `application/json`

Type: one of.

- One of: Option 1 (object)
  - `defined` (constant, required): Value: `true`.
  - `code` (constant, required): Value: `"UNAUTHORIZED"`.
  - `status` (constant, required): Value: `401`.
  - `message` (string, required): Default: `"Unauthorized"`.
  - `data` (`ErrorData`, optional)
    - `hints` (array of string, optional): Suggested next steps. Wording can change; use error codes and structured data for program logic.
- One of: Option 2 (object)
  - `defined` (constant, required): Value: `false`.
  - `code` (string, required)
  - `status` (number, required)
  - `message` (string, required)
  - `data` (any, optional)

### 403

403

Content type: `application/json`

Type: one of.

- One of: Option 1 (object)
  - `defined` (constant, required): Value: `true`.
  - `code` (constant, required): Value: `"FORBIDDEN"`.
  - `status` (constant, required): Value: `403`.
  - `message` (string, required): Default: `"Forbidden"`.
  - `data` (`ForbiddenErrorData`, optional)
    - `hints` (array of string, optional): Suggested next steps. Wording can change; use error codes and structured data for program logic.
    - `missingPermissions` (array of string, optional)
    - `requiredPlan` (constant, optional): Value: `"pro"`.
    - `action` (string, optional): The requested action that was denied.
- One of: Option 2 (object)
  - `defined` (constant, required): Value: `false`.
  - `code` (string, required)
  - `status` (number, required)
  - `message` (string, required)
  - `data` (any, optional)

### 404

404

Content type: `application/json`

Type: one of.

- One of: Option 1 (object)
  - `defined` (constant, required): Value: `true`.
  - `code` (constant, required): Value: `"NOT_FOUND"`.
  - `status` (constant, required): Value: `404`.
  - `message` (string, required): Default: `"Not Found"`.
  - `data` (`ErrorData`, optional)
- One of: Option 2 (object)
  - `defined` (constant, required): Value: `false`.
  - `code` (string, required)
  - `status` (number, required)
  - `message` (string, required)
  - `data` (any, optional)

### 409

409

Content type: `application/json`

Type: one of.

- One of: Option 1 (object)
  - `defined` (constant, required): Value: `true`.
  - `code` (constant, required): Value: `"CONFLICT"`.
  - `status` (constant, required): Value: `409`.
  - `message` (string, required): Default: `"Conflict"`.
  - `data` (`ErrorData`, optional)
- One of: Option 2 (object)
  - `defined` (constant, required): Value: `true`.
  - `code` (constant, required): Value: `"CONTENT_SCHEMA_MISMATCH"`.
  - `status` (constant, required): Value: `409`.
  - `message` (string, required): Default: `"CONTENT_SCHEMA_MISMATCH"`.
  - `data` (`ContentSchemaMismatchErrorData`, required)
    - `hints` (array of string, optional): Suggested next steps. Wording can change; use error codes and structured data for program logic.
    - `expectedHash` (string, required): Hash of the effective schema definition.
    - `actualSchema` (any of, required)
      - Any of: `ContentSchemaMetadata`
      - Any of: Option 2 (null)
- One of: Option 3 (object)
  - `defined` (constant, required): Value: `false`.
  - `code` (string, required)
  - `status` (number, required)
  - `message` (string, required)
  - `data` (any, optional)

### 429

429

Content type: `application/json`

Type: one of.

- One of: Option 1 (object)
  - `defined` (constant, required): Value: `true`.
  - `code` (constant, required): Value: `"TOO_MANY_REQUESTS"`.
  - `status` (constant, required): Value: `429`.
  - `message` (string, required): Default: `"Too Many Requests"`.
  - `data` (`RateLimitErrorData`, optional)
    - `hints` (array of string, optional): Suggested next steps. Wording can change; use error codes and structured data for program logic.
    - `limit` (string, optional): The limit that was reached: a short-term rate limit, or a monthly API call, AI credit, or spending limit. One of: `"rate"`, `"api-calls"`, `"ai-credits"`, `"spending"`.
    - `retryAfterSeconds` (number, optional): Minimum delay before another attempt, in seconds. Also sent in Retry-After.
- One of: Option 2 (object)
  - `defined` (constant, required): Value: `false`.
  - `code` (string, required)
  - `status` (number, required)
  - `message` (string, required)
  - `data` (any, optional)

### 500

500

Content type: `application/json`

Type: one of.

- One of: Option 1 (object)
  - `defined` (constant, required): Value: `true`.
  - `code` (constant, required): Value: `"INTERNAL_SERVER_ERROR"`.
  - `status` (constant, required): Value: `500`.
  - `message` (string, required): Default: `"Internal Server Error"`.
  - `data` (`ErrorData`, optional)
- One of: Option 2 (object)
  - `defined` (constant, required): Value: `true`.
  - `code` (constant, required): Value: `"CONTENT_SCHEMA_INVALID"`.
  - `status` (constant, required): Value: `500`.
  - `message` (string, required): Default: `"CONTENT_SCHEMA_INVALID"`.
  - `data` (`ContentSchemaInvalidErrorData`, required)
    - `hints` (array of string, optional): Suggested next steps. Wording can change; use error codes and structured data for program logic.
    - `entryID` (string, optional)
    - `versionID` (string, optional)
    - `revisionID` (any of, required)
      - Any of: Option 1 (string)
      - Any of: Option 2 (null)
    - `issues` (array of `ContentSchemaIssue`, required)
      - `code` (string, required): One of: `"invalid_schema"`, `"invalid_structure"`, `"missing_field"`, `"unknown_field"`, `"duplicate_field"`, `"field_kind_mismatch"`, `"field_key_mismatch"`, `"property_type_mismatch"`, `"invalid_property_value"`, `"invalid_field_options"`, `"invalid_allowed_blocks"`, `"invalid_fragment_content"`.
      - `message` (string, required)
      - `path` (array of any of, required)
        - Any of: Option 1 (string)
        - Any of: Option 2 (number)
      - `fieldID` (string, optional)
- One of: Option 3 (object)
  - `defined` (constant, required): Value: `false`.
  - `code` (string, required)
  - `status` (number, required)
  - `message` (string, required)
  - `data` (any, optional)

### 503

503

Content type: `application/json`

Type: one of.

- One of: Option 1 (object)
  - `defined` (constant, required): Value: `true`.
  - `code` (constant, required): Value: `"SERVICE_UNAVAILABLE"`.
  - `status` (constant, required): Value: `503`.
  - `message` (string, required): Default: `"Service Unavailable"`.
  - `data` (`ErrorData`, optional)
- One of: Option 2 (object)
  - `defined` (constant, required): Value: `false`.
  - `code` (string, required)
  - `status` (number, required)
  - `message` (string, required)
  - `data` (any, optional)
