---
title: "Entry"
description: "Entry"
url: "https://www.contentstack.com/docs/developers/sdks/content-delivery-sdk/ruby/reference/entry"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-09-22"
---

# Entry

## Entry

An initializer is responsible for creating Entry object.

## get

Get value for field uid

```
require "contentstack";

@stack = Contentstack::Client.new("api_key", "delivery_token", "environment");
@entry = @stack.content_type("content_type_uid").entry("entry_uid")
	.include_reference('category')
	.fetch;
@entry.get("field_uid");
```

Field uid for which value to be get.

## only

Specifies an array of 'only' keys in BASE object that would be 'included' in the response.

```
require "contentstack";

@stack = Contentstack::Client.new("api_key", "delivery_token", "environment");
@entry = @stack.content_type("content_type_uid").entry("entry_uid")
	.only(['title', 'description'])
	.fetch;
```

Array of the 'only' reference keys to be included in response.

```
require "contentstack";

@stack = Contentstack::Client.new("api_key", "delivery_token", "environment");
@entry = @stack.content_type("content_type_uid").entry("entry_uid")	
	.only('category', ['title', 'description'])
	.fetch;
```

Reference field uid for which fields to be included

Array of the 'only' reference keys to be included in response.

## except

Specifies list of field uids that would be 'excluded' from the response.

```
require "contentstack";

@stack = Contentstack::Client.new("api_key", "delivery_token", "environment");
@entry = @stack.content_type("content_type_uid").entry("entry_uid")
	.except(['title', 'description'])
	.fetch;
```

Array of the 'only' reference keys to be excluded in response.

```
require "contentstack";

@stack = Contentstack::Client.new("api_key", "delivery_token", "environment");
@entry = @stack.content_type("content_type_uid").entry("entry_uid")
	.except('category', ['title', 'description'])
	.fetch;
```

Reference field uid for which fields to be excluded

Array of the 'only' reference keys to be excluded in response.

## include_content_type

Include object's content\_type in response

```
require "contentstack";

@stack = Contentstack::Client.new("api_key", "delivery_token", "environment");
@entry = @stack.content_type("content_type_uid").entry("entry_uid")
	.include_content_type
	.fetch;
```

## include_reference

Add a constraint that requires a particular reference key details.

```
require "contentstack";

@stack = Contentstack::Client.new("api_key", "delivery_token", "environment");
@entry = @stack.content_type("content_type_uid").entry("entry_uid")
	.include_reference('category')
	.fetch;
```

Pass reference field that must be included in the response

```
require "contentstack";

@stack = Contentstack::Client.new("api_key", "delivery_token", "environment");
@entry = @stack.content_type("content_type_uid").entry("entry_uid")
	.include_reference(['category', 'review'])
	.fetch;
```

Pass array of reference fields that must be included in the response

## include_fallback

Include the fallback locale publish content, if specified locale content is not publish.

```
require "contentstack";

@stack = Contentstack::Client.new("api_key", "delivery_token", "environment");
@entry = @stack.content_type("content_type_uid").entry("entry_uid")
	.include_fallback
	.fetch;
```

## include_branch

Include the branch for publish content.

```
require "contentstack";

@stack = Contentstack::Client.new("api_key", "delivery_token", "environment");
@entry = @stack.content_type("content_type_uid").entry("entry_uid")
	.include_branch
	.fetch;
```

## include_embedded_items

Include Embedded Objects (Entries and Assets) along with entry/entries details.

```
require "contentstack";

@stack = Contentstack::Client.new("api_key", "delivery_token", "environment");
@entry = @stack.content_type("content_type_uid").entry("entry_uid")
	.include_embedded_items
	.fetch;
```

## fetch

Fetches the latest version of the entries from Contentstack.io content stack

```
require "contentstack";

@stack = Contentstack::Client.new("api_key", "delivery_token", "environment");
@entry = @stack.content_type("content_type_uid").entry("entry_uid").fetch;
```

## Entry

Returns the value of attribute uid.

Returns the value of attribute content\_type.

Returns the value of attribute fields.

Returns the value of attribute query.

Returns the value of attribute uid.

Returns the value of attribute content\_type.

Returns the value of attribute fields.

Returns the value of attribute query.

## Entry | Ruby Delivery SDK | Contentstack

The Entry class in the Ruby Delivery SDK creates and represents a content entry, letting you fetch and read a single entry from your Contentstack stack.