# Jsonrpc request giving error for parameter 'th'

**URL:** <https://dmap-community.ductus.global/t/jsonrpc-request-giving-error-for-parameter-th/4559>\
**Category:** Other Northbound Interfaces\
**Created:** [October 25, 2023, 6:50am UTC](https://dmap-community.ductus.global/t/jsonrpc-request-giving-error-for-parameter-th/4559 "2023-10-25T06:50:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankitrathore](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@ankitrathore](https://dmap-community.ductus.global/u/ankitrathore)\
**Post date:** [October 25, 2023, 6:50am UTC](https://dmap-community.ductus.global/t/jsonrpc-request-giving-error-for-parameter-th/4559/1 "2023-10-25T06:50:33Z")

</div>

could someone please help me understand what is the th parameter in json rpc and what should be the value for it?  
when I execute [http://localhost:30742/jsonrpc](http://localhost:30742/jsonrpc) with below payload

```json
{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "query",
    "params": {
        "path": "/data_container:data"
    }
} 

```

it gives

```json
{
    "jsonrpc": "2.0",
    "error": {
        "type": "rpc.method.missing_params",
        "code": -32000,
        message": "Missing parameters",
        "data": {
            "param": "th"
        },
        "internal": "webui_util249"
    },
    "id": 1
}. 

```

when I add the th parameter with below payload it says Invalid parameters.  
Request

```json
{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "query",
    "params": {
        "th": 33742,
        "path": "/data_container:data"
    }
}

```

Response:

```json
{
    "jsonrpc": "2.0",
    "error": {
        "type": "rpc.method.invalid_params",
        "code": -32602,
        "message": "Invalid parameters",
        "data": {
           "param": "th"
       },
        "internal": "webui_util680"
    },
    "id": 1
}

```

---

<div class="post-metadata">

**Author:** ![josephm](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@josephm](https://dmap-community.ductus.global/u/josephm)\
**Post date:** [October 25, 2023, 10:41am UTC](https://dmap-community.ductus.global/t/jsonrpc-request-giving-error-for-parameter-th/4559/2 "2023-10-25T10:41:24Z")

</div>

As the old saying goes - when everything else fails, try reading the manual… 😉  
You don’t mention what previous steps you take when issuing the request so i assume you may have missed a mandatory step… Please check ConfD user guide and corresponding section for JSON-RPC - “Common concepts”, quoting:

> The th param is a transaction handle identifier as returned from a call to new\_read\_trans or new\_write\_trans.

edit: i wanted to be “funny”, but it seems that some versions of ConfD guides may have error, and there’s a “new\_trans” method with read/write parameter rather than standalole new\_read\_trans/new\_write\_trans methods… sorry for that 🙂

---

<div class="post-metadata">

**Author:** ![ankitrathore](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@ankitrathore](https://dmap-community.ductus.global/u/ankitrathore)\
**Post date:** [October 25, 2023, 12:53pm UTC](https://dmap-community.ductus.global/t/jsonrpc-request-giving-error-for-parameter-th/4559/3 "2023-10-25T12:53:48Z")

</div>

thanks @josephm . I am able to proceed now.
