<p>The following substitution works</p>
<pre><code>...
-d '{&quot;getTxId&quot; : &quot;c42669c4818e04d732e77b9ed3efb22697ba4b1cd7540d2bab8c44f9a5e4fbb6&quot;}'
...
</code></pre>

CC BY-SA 4.0
2022-03-25T13:07:50.160Z
2022-03-25T13:07:50.160Z
waalge
<p>The following curl is constructed via swagger that says it just needs the string, but this fails.
What am I doing wrong?</p>
<pre><code>$curl -X 'POST' \
&gt;   'http://localhost:9083/tx' \
&gt;   -H 'accept: application/json;charset=utf-8' \
&gt;   -H 'Content-Type: application/json;charset=utf-8' \
&gt;   -d '&quot;c42669c4818e04d732e77b9ed3efb22697ba4b1cd7540d2bab8c44f9a5e4fbb6&quot;'
Error in $: parsing Plutus.V1.Ledger.TxId.TxId(TxId) failed, expected Object, but encountered String
</code></pre>
<p>I can pull out the tx data in sqlite3 so I think I've ruled out it being a bad id</p>

<plutus-pab><pab>
how to query the chain index tx endpoint?
# how to query the chain index tx endpoint?

(Asked by: username_0 on 2022-03-24)

The following curl is constructed via swagger that says it just needs the string, but this fails.
What am I doing wrong?
$curl -X 'POST' \
>   'http://localhost:9083/tx' \
>   -H 'accept: application/json;charset=utf-8' \
>   -H 'Content-Type: application/json;charset=utf-8' \
>   -d '"c42669c4818e04d732e77b9ed3efb22697ba4b1cd7540d2bab8c44f9a5e4fbb6"'
Error in $: parsing Plutus.V1.Ledger.TxId.TxId(TxId) failed, expected Object, but encountered String

I can pull out the tx data in sqlite3 so I think I've ruled out it being a bad id

**Tags:** plutus-pab, pab

---

## 1 answers

### Answer by username_0 on 2022-03-25. Score: 0 | Accepted answer

The following substitution works
...
-d '{"getTxId" : "c42669c4818e04d732e77b9ed3efb22697ba4b1cd7540d2bab8c44f9a5e4fbb6"}'
...


---

