0
Answered

how to use api to create user

rho 6 months ago updated by Vlad R 6 months ago 6

To create user using api, how do I include the parameter to the call? Is it supposed to be a json string in the request body?

Tried to incl {"name":"john","username":"john"} in the request body but filerun didn't like it saying empty data.

The doc mentioned that data[name] and data[username] are required. How do I specify data[name] and data[username] parameters.


Thanks

I am not sure how the data[name], data[username] and data[password] are passed as parameters. Tried something like:


URL/?data[name]=john&data[username]=john&data[password]=1234


and it didn't like it, tried:


URL/?data%5Bname%5D=john& ....


and it didn't like it.


Tried put the parameters as json in the request body and it said there's no data.

Can you provide an example?


Thanks.


What technology/app are you using for creating the HTTP request?

(Variables/data appended to a URL are sent via HTTP GET method, not POST)

I was using curl to test the api.

If things go well, we'll probably use .net or vbs to do something.

Please see this page on how to POST data with cURL: https://ec.haxx.se/http/http-post