Before you start coding in your respective language, be sure to understand the steps to work with Logware. The logic flow when working with the Logware API has three basic steps. The steps are the same for committing your payload to Logware, regardless of it being a ‘hash’ value or ‘data’ value.
First, you will authenticate with the API. You only need to do this for writing your payload to Logware. Reading from Logware does not require authentication, but it is throttled to prevent abuse.
Second, to write your payload to Logware, you would:
- Write the payload to the chain, get back a temporary Task Id.
- Using your temporary Task Id, read the chain and get back a permanent Transaction Id.
- Store your Transaction Id, you will need it in the future. It is your receipt and marker. Do not store or reuse the Task Id.
Third, in the future, you might want to read your payload from the chain. To do so, you need to the Transaction Id:
- Using your permanent Transaction Id, ask for a temporary Task Id.
- Using your temporary TaskId, read the chain to get the payload you are looking for.
Each action is a pair of POST/GET events. POST your request, get back a temporary Task Id. Then use the Task Id to GET the resulting Transaction Id or payload.