Load S3 Agent (HTTP API)
The LCP data agent
About
load-s3-agent is a data agent built on top of HyperBEAM [email protected] temporal data storage device. This agent orchestrates the location of the data moving it from temporal to permanent (Arweave).
N.B: beta testing release, unstable and subject to breaking changes, use in testing enviroments only.
Agent API
GET
/: agent infoGET
/provenance/{id}: return the onchain provenance proof of an offchain ANS-104 dataitem (only for dataitems that enabled the onchain provenance flag at upload).GET
/:dataitem_id: generate a presigned get_object URL to access the ANS-104 DataItem data - DEPRECATED since v0.7.0 - usegateway.s3-node-1.load.network/resolve/$DATAITEM_IDinsteadPOST
/tags/query: query dataitems for a given tags KV pairs.POST
/query/dataitem: fetch full metadata for a specificdataitem_id.POST
/upload: post data (or signed dataitem) to store a public offchain DataItem on[email protected]POST
/upload/private: post data (or signed dataitem) to store a private offchain DataItem on[email protected]POST
/post/:dataitem_id: post an[email protected]public DataItem to Arweave via Turbo (N.B: Turbo covers any dataitem cost with size <= 100KB).
Upload data and return an agent public signed DataItem
echo -n "hello world" | curl -X POST https://load-s3-agent.load.network/upload \
-H "Authorization: Bearer $load_acc_api_key" \
-F "file=@-;type=text/plain" \
-F "content_type=text/plain"Or optionally add custom tags KVs that will be included in the ANS-104 DataItem construction
Optional: have the agent publish an offchain provenance record for the uploaded DataItem (the API returns the provenance transaction id in offchain_provenance_proof):
offchain provenance data protocol tags on Arweave (per provenance proof):
Storage-Provider: Load-S3Agent-Version: ${VERSION}Dataitem-Record: ${OFFCHAIN_LS3_DATAITEM_ID}Version:$PROVENANCE_PROTOCOL_VERSIONData-Protocol: Load-S3-Offchain-Provenance
Examples:
onchain provenance example: https://viewblock.io/arweave/tx/b6kTeJISHCmKTqaq_GK5g6hCGPWmMgfR7W4FcJwBwGU
offchain dataitem: https://gateway.s3-node-1.load.network/resolve/qvnTWVz4QqVAa7DsiiPER3HMArN88clg_SZc1BIS63s
Upload data and return an agent private signed DataItem
*** N.B: any private DataItem does not have the tags indexed nor is queryable ***
Upload signed dataitem to a private bucket (private dataitem)
Upload a signed DataItem and store it in Load S3
Tags are extracted from the ANS-104 DataItem, indexed and queryable
Post offchain DataItem to Arweave
example: for offchain dataitem = eoNAO-HlYasHJt3QFDuRrMVdLUxq5B8bXe4N_kboNWs
Querying DataItems by Tags
all dataitems pushed after agent's v0.6.0 release are queryable by the dataitem's tags KVs:
Pagination follows Arweave's GQL schema: optional
first(default 25, max 100) and a cursorafter.full_metadataflag (Optional<bool>) to return the full tags associated with a query's dataitemeach returned item includes
dataitem_size(bytes) when available (v0.9.1 and onwards)created_after/created_before(ISO-8601/RFC3339 strings) filter items by theircreated_attimestamp (inclusive bounds).
if page_info.has_next_page returns true, reuse the page_info.next_cursor string as the next after.
count reflects the number of items returned in the current page, while total_count includes every dataitem that matches the filters across all pages.
Querying a DataItem by ID
Retrieve the latest indexed metadata (content type, size, tags, timestamps) for a single dataitem:
Load S3 Agent library
Adding load-s3-agent library
Example
Last updated