I try to create a user in rest-API with JSON. That is success.
My question:
1) I need to receive a POST request from a webform containing the user information?
2) Add an APIkey and insert the variables.
3) Generate the JSON to send to the page:
rest.domain.com/api/v1/UserCreate
POST REQUEST FROM MY WEBFORM (example)
{
"UserID":"11",
"GroupID":"22",
"MemberID":"97865454534231",
"UserFullName":"Mr Test",
"UserEmail":"mail@mail.com",
"UserRegistrationNumber":"9999999",
}
JSON CALL TO API ( the working json )
POST /api/v1/UserCreate HTTP/1.1
Host: rest.domain.com
APIKey: XXXXXXXXXX-XXXXXXXXX-XXXXXXXXXXX
Content-Type: application/json
{
"APIKey":"XXXXXXXXXX-XXXXXXXXX-XXXXXXXXXXX",
"UserID":"11",
"GroupID":"22",
"UserEmail" : "mail@mail.com",
"UserRegistrationNumber" : "9999999",
"UserFullName" : "Mr Test",
"MemberID" : "123456789",
}