From 4710b921e59d715f1d5f4f811de582d9d2eb991e Mon Sep 17 00:00:00 2001 From: Filip Johansson Date: Mon, 4 Jan 2021 16:47:06 +0100 Subject: [PATCH] Added curl for creating account --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0615dda..34e7124 100644 --- a/README.md +++ b/README.md @@ -25,4 +25,5 @@ The account field "role" is a bit special, in that if it contains "admin" as one ## Some useful cURLs Obtain an admin GWT: `curl -d '"api-key-goes-here"' -H "Content-Type: application/json" -i http://localhost:4000/auth/api-key` -Use a bearer token to make a call: `curl -H "Content-Type: application/json" -H "Authorization: bearer your-JWT-token-goes-here" -i http://localhost:4000/account/{accountID}` \ No newline at end of file +Use a bearer token to make a call: `curl -H "Content-Type: application/json" -H "Authorization: bearer your-JWT-token-goes-here" -i http://localhost:4000/account/{accountID}` +Create account: `curl -d '{"name": "Bosse", "password":"Hemligt", "fields": [{ "name":"role", "values":["user"]}]}' -H "Content-Type: application/json" -H "Authorization: bearer your-JWT-token-goes-here" -i http://localhost:4000/account`