You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

/api/users/create

Creates new user.

This resource is available only for Global admin or Domain admin.

Resource Information

Request Parameters

ParameterDetailExample
data

Form contents to submit in following JSON format:

NameDescription
domain_idDomain identifier
usernameUsername
emailUser email address
firstNameUser first name
lastNameUser last name
infoUser detail information
timeZoneUser time zone
localeUser locale - code of supported language
roles

Array containing all user roles where each role has following structure:

NameDescription
roleRole name - please see list of supported values
groups

Array containing all user groups where user belongs. Each group has following structure:

NameDescription
idUser group identifier
nameUser group name


{
  "domain_id": 123,
  "username": "myusername",
  "email": "myusername@example.com",
  "firstName": "John",
  "lastName": "Doe",
  "info": "I'm pretty cool",
  "timeZone": "Europe/Prague",
  "locale": "cs",
  "roles": [
    {
      "role": "DATASET_ADMIN"
    },
    {
      "role": "REPORT_ADMIN"
    }
  ],
  "groups": [
    {
      "id": "56",
      "name": "My User Group nr.1"
    }
  ]
}

Sample Request / Response

Using curl:

curl -H "Authorization: OAuth realm=\"https://service.belladati.com/\", oauth_consumer_key=\"myConsumer\", oauth_token=\"mh7an9dkrg59\", oauth_timestamp=\"135131231\", oauth_nonce=\"randomString\""  -d "data={\"domain_id\":123,\"username\":\"myusername\",\"email\":\"myusername@example.com\",\"firstName\":\"John\",\"lastName\":\"Doe\"}" https://service.belladati.com/api/users/create

When the form has been submitted successfully, the server replies with an HTTP status code of 200 and an empty body.

 

  • No labels