As a Data Creator (DC), following steps are needed in order to import data, replicate it and create offer on the ODN.

Precondition:

  • working ot-node
  • ip whitelisted (there is a separate article on this same page on how to whitelist your NODE_IP) 
  • make sure your node has joined network (this can be verified if you see in node log line like : "Initial sync with other peers done")

Steps:

docker exec -it otnode bash

      then using curl to import (let's assume you are running node on your local machine):

curl -X POST http://127.0.0.1:8900/api/import -F importtype=GS1 \
 -F importfile=@/ot-node/importers/xml_examples/Retail/01_Green_to_pink_shipment.xml
  • On success, previous step returns value for import_id, needed for next API call      
{
  "import_id": "0x5cc3ea5940a40cc4938ac04acb1186ae0bca4620a9db7dfa7a3c6a211d4d6877"
}

      having this said, and continuing on the example from above:

curl -X POST \
http://127.0.0.1:8900/api/replication/ \
-F import_id=0x5cc3ea5940a40cc4938ac04acb1186ae0bca4620a9db7dfa7a3c6a211d4d6877

After performing above steps, your node will create an offer onto ODN, so from that moment on, other nodes can compete and bid for this specific offer.

Did this answer your question?