-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post API For creating new user at initial setup showing #7512
Comments
Hi @amanmalkar, for that endpoint you need to use nested maps
|
@camsaul I did it. Thanks for the help. For anyone struggling with the REST API Initial setup: If you're not integrating db at launch you can do: curl -X POST -H "Content-Type: application/json" -d '{ "token": "56dd2a37-8383-4d07-b634-10ce7afb4835", "user": {"first_name": "xyz", "last_name": "abc", "email": "xyabzc@gmail.com", "password": "xzy7030"},"prefs": {"allow_tracking": true, "site_name": "yyzz"}}' http://localhost:3000/api/setup |
@amanmalkar thanks! how do you get the token at initial setup? |
@manugarri Hi! This should help token=$(curl -s -X GET -H "Content-Type: application/json" http://localhost:3000/api/session/properties | python2.7 -c 'import sys, json; print json.load(sys.stdin)["setup_token"]' | tail -1) replace with your py version. Let me know :) |
awesome, thanks! |
You are a stone-cold legend |
curl -X POST -H "Content-Type: application/json" -d '{"email": "amanmalkar@gmail.com", "first_name": "aman", "site_name": "MetabasTest", "password": "xyz7030", "token": "56dd2a37-8383-4d07-b634-10ce7afb4835", "last_name": "malkar"}' http://localhost:3000/api/setup/
{"errors":{"site_name":"value must be a non-blank string."}}
The text was updated successfully, but these errors were encountered: