Home

Get object

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Returns an object by object ID.

Select an exact version, the latest version at or below maxVersion, or the state at atCheckpoint. With a version selector and atCheckpoint, the checkpoint is a visibility bound. 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.GetObject (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 '{"objectId": "0xOBJECT_ID"}' \
  'sui-grpc.nownodes.io' \
  sui.rpc.v2.LedgerService.GetObject

Body

application/json
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.

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).