Home

Batch get objects

POST
https://sui-grpc.nownodes.io/sui.rpc.v2.LedgerService/BatchGetObjects

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Returns multiple objects in one request.

Each request may select an independent historical version or checkpoint. Invalid selector combinations and node-wide capability/readiness errors fail the whole batch; ordinary lookup errors are returned per item. A read resolving to deletion or wrapping may return NOT_FOUND with OBJECT_REMOVED details (version, kind and transaction digest if known).

gRPC method: sui.rpc.v2.LedgerService.BatchGetObjects (unary).

This is a gRPC method (HTTP/2, Protocol Buffers), not a REST endpoint. The request and response bodies below are shown in the proto3 JSON form that tools such as grpcurl and Postman accept and print. Pass your NOWNodes API key as the api-key gRPC metadata header. Proto files: sui/rpc/v2/ledger_service.proto.

Example grpcurl request:

Copied!
grpcurl \
  -insecure \
  -H 'api-key: YOUR_API_KEY' \
  -emit-defaults \
  -proto './sui-apis-grpc/proto/sui/rpc/v2/ledger_service.proto' \
  -import-path './sui-apis-grpc/proto' \
  -d '{"requests": [{"objectId": "0xOBJECT_ID_1"}, {"objectId": "0xOBJECT_ID_2"}]}' \
  'sui-grpc.nownodes.io' \
  sui.rpc.v2.LedgerService.BatchGetObjects

Body

application/json
requestsArray<GetObjectRequest>

Each item may specify its own version, maxVersion or atCheckpoint. Invalid selector combinations and node readiness/capability refusals fail the entire batch; other individual lookup errors appear per item.

Show child attributes
objectIdstring

Required. The ObjectId of the requested object.

versionstring<uint64>

Exact object version; mutually exclusive with maxVersion. When neither version, maxVersion nor atCheckpoint is supplied, returns the latest live version. A version beyond the latest is NOT_FOUND; a pruned version can return OUT_OF_RANGE.

readMaskstring

Comma-separated protobuf FieldMask in lowerCamelCase, e.g. objectId,version,digest. Nested paths use dots. Mask specifying which fields to read. If no mask is specified, defaults to object_id,version,digest.

atCheckpointstring<uint64>

Object state at the end of this checkpoint. With version or maxVersion, the selected version must have been written by this checkpoint; otherwise NOT_FOUND without fallback. Requires retained indexed history.

maxVersionstring<uint64>

Newest object version at or below this bound. Mutually exclusive with version; setting both returns INVALID_ARGUMENT.

readMaskstring

Comma-separated protobuf FieldMask in lowerCamelCase, e.g. objectId,version,digest. Nested paths use dots. Mask specifying which fields to read. If no mask is specified, defaults to object_id,version,digest.

Response

200OK

Successful response.

default

gRPC error. The status code (e.g. UNAUTHENTICATED, INVALID_ARGUMENT, NOT_FOUND) is returned in the grpc-status trailer, details in grpc-message. A node that does not support the requested operation returns UNIMPLEMENTED (NOT_SERVED_HERE); a node not ready to serve it returns UNAVAILABLE (NOT_READY). Historical data outside the retained range can return OUT_OF_RANGE (BELOW_EARLIEST_AVAILABLE); requests beyond the indexed tip can return OUT_OF_RANGE (ABOVE_LATEST_AVAILABLE) where applicable. A read resolving to deletion or wrapping may return NOT_FOUND with OBJECT_REMOVED details (version, kind and transaction digest if known). Compactor nodes may return OUT_OF_RANGE (VERSION_NOT_RETAINED).