# Passing inputs to RPCs via REST

**URL:** <https://dmap-community.ductus.global/t/passing-inputs-to-rpcs-via-rest/4376>\
**Category:** Other Northbound Interfaces\
**Created:** [March 16, 2023, 9:01pm UTC](https://dmap-community.ductus.global/t/passing-inputs-to-rpcs-via-rest/4376 "2023-03-16T21:01:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mghosh](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@mghosh](https://dmap-community.ductus.global/u/mghosh)\
**Post date:** [March 16, 2023, 9:01pm UTC](https://dmap-community.ductus.global/t/passing-inputs-to-rpcs-via-rest/4376/1 "2023-03-16T21:01:11Z")

</div>

I have a rpc which can take certain inputs. How to pass the inputs in REST? I tried curl form data to pass the inputs, but did not work.

```auto
curl -X POST -iksu admin:admin -H 'Accept: application/vnd.yang.operation+json' http://localhost/api/operations/common-rpc:file-transfer -d 'operation=upload'

...

{"errors": {"error": [{"error-message": "Unsupported media type: application/x-www-form-urlencoded ; Should be one of: application/vnd.yang.operation+json, application/vnd.yang.operation+xml.", "error-tag": "malformed-message"}]}}

```

Am I missing something?

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [March 18, 2023, 2:59pm UTC](https://dmap-community.ductus.global/t/passing-inputs-to-rpcs-via-rest/4376/2 "2023-03-18T14:59:28Z")

</div>

See the examples.confd/restconf examples for guidance. The examples uses the curl tool.  
Also, I suggest reading [RFC 8040: RESTCONF Protocol](https://www.rfc-editor.org/rfc/rfc8040)
