GetItem

POST v1/data/{project_id}/tables/{table_name}/get_item

Request Syntax

{
    "attributes_to_get": [
        "string"
    ],
    "consistent_read": "boolean",
    "key": {
        "string": {
            "B": "blob",
            "BS": [
                "blob"
            ],
            "N": "string",
            "NS": [
                "string"
            ],
            "S": "string",
            "SS": [
                "string"
            ]
        }
    }
}

Request Parameters

key
The primary key of the item to retrieve.
Type: String to object map
Required: Yes
attributes_to_get
The names of one or more attributes to retrieve.
Type: array of Strings
Required: No
consistent_read
Use or not use strongly consistent read.
Type: Boolean
Required: No

Response Syntax

{
    "item": {
        "string": {
            "B": "blob",
            "BS": [
                "blob"
            ],
            "N": "string",
            "NS": [
                "string"
            ],
            "S": "string",
            "SS": [
                "string"
            ]
        }
    }
}

Response Elements

item
An itemi with attributes.
Type: String to object map

Errors

BackendInteractionException
ClusterIsNotConnectedException
ValidationError

Sample Request

{
    "key": {
        "ForumName": {
            "S": "MagnetoDB"
        },
        "Subject": {
            "S": "How do I update multiple items?"
        }
    },
    "attributes_to_get": ["LastPostDateTime", "Message", "Tags"],
    "consistent_read": true
}

Sample Response

{
    "Item": {
        "Tags": {
            "SS": ["Update", "Multiple Items", "HelpMe"]
        },
        "LastPostDateTime": {
            "S": "201303190436"
        },
        "Message": {
            "S": "I want to update multiple items in a single API call. What's the best way to do that?"
        }
    }
}