Scan¶
- POST v1/data/{project_id}/tables/{table_name}/scan¶
Request Syntax¶
{
"attributes_to_get": [
"string"
],
"exclusive_start_key": {
"string": {
"B": "blob",
"BS": [
"blob"
],
"N": "string",
"NS": [
"string"
],
"S": "string",
"SS": [
"string"
]
}
},
"limit": "number",
"scan_filter": {
"string": {
"attribute_value_list": [
{
"B": "blob",
"BS": [
"blob"
],
"N": "string",
"NS": [
"string"
],
"S": "string",
"SS": [
"string"
]
}
],
"comparison_operator": "string"
}
},
"segment": "number",
"select": "string",
"total_segments": "number"
}
Request Parameters¶
- attributes_to_get
Type: array of StringsRequired: No- exclusive_start_key
The primary key of the first item that this operation will evaluate.Type: String to object mapRequired: No- limit
Type: NumberRequired: No- scan_filter
Scan conditions.Type: String to Condition object mapRequired: No- segment
Segment for parallel scan.Type: NumberRequired: No- select
The attributes to be returned in the result.Type: StringValid values: ALL_ATTRIBUTES | ALL_PROJECTED_ATTRIBUTES | SPECIFIC_ATTRIBUTES | COUNTRequired: No- total_segments
Number of segments for parallel scan.Type: NumberRequired: No
Response Syntax¶
{
"count": "number",
"items": [
{
"string": {
"B": "blob",
"BS": [
"blob"
],
"N": "string",
"NS": [
"string"
],
"S": "string",
"SS": [
"string"
]
}
}
],
"last_evaluated_key": {
"string": {
"B": "blob",
"BS": [
"blob"
],
"N": "string",
"NS": [
"string"
],
"S": "string",
"SS": [
"string"
]
}
},
"scanned_count": "number"
}
Response Elements¶
- count
The number of items in the response.Type: Number- items
An array of items.Type: array of items- last_evaluated_key
The primary key of the item where the operation stopped.Type: String to AttributeValue object map- scanned_count
Type: Number
Errors¶
BackendInteractionExceptionClusterIsNotConnectedExceptionValidationError
Sample Request¶
{
"attributes_to_get": [
"ForumName", "LastPostDateTime", "Posts"
],
"exclusive_start_key": {
"ForumName": {
"S": "Another forum"
}
},
"limit": 2,
"scan_filter": {
"LastPostDateTime": {
"attribute_value_list": [
{
"S": "3/10/14"
}
],
"comparison_operator": "GT"
}
},
"segment": 0,
"select": "SPECIFIC_ATTRIBUTES",
"total_segments": 1
}
Sample Response¶
{
"count": 2,
"items": [
{
"ForumName": {
"S": "Gerrit workflow"
},
"LastPostDateTime": {
"S": "3/19/14"
},
"Posts": {
"SS": ["Hello", "Hi"]
}
},
{
"ForumName": {
"S": "Testing OS API"
},
"LastPostDateTime": {
"S": "3/18/14"
},
"Posts": {
"SS": ["Opening post"]
}
}
],
"last_evaluated_key": {
"ForumName": {
"S": "Testing OS API"
},
"Subject": {
"S": "Some subject"
}
},
"scanned_count": 10
}