Description:

Create or modify a single realm of a Qeo administrator
URL Structure: https://my.qeo.org/rest/v1/realms
HTTP Method: POST
Parameters:

HTTP Authorization

For a Create:
     Body: Must contain the realm name 
              {"name":"..."}

               Parameter:
                 "name" : UTF-8 string representing the name of the user in the realm
                               Leading and trailing spaces are removed from the name.
                               The provided name cannot be empty. 

Create example
{
   "name":"Main Office Realm"
}

 

For a Modify:
     Body: Must contain the realm name and the realm id
              {"id":...,"name":"..."}

              Parameters:
                 "id"       : value of type long, representing the user identifier
                 "name" : UTF-8 string representing the name of the user in the realm
                               Leading and trailing spaces are removed from the name.
                               The provided name cannot be empty.
 

Modify example
{
   "id":123,
   "name":"Main Office Realm"
}
Response:

For a Create:
HTTP 201 Created
Content-Type: application/json

For a Modify:
HTTP 200 OK
Content-Type: application/json

Body: Contains the created/modified realm in JSON format as it is stored in the database:
          {"id":...,"name":"...","type":"realm"}

          The returned realm contains 3 fields: 
              "id"       : value of type long, representing the realm identifier
              "name" : UTF-8 string representing the realm name
              "type"   : type of object returned (always "realm")

Example response
{
   "id":123,
   "name":"Main Office Realm"
   "type":"realm"
}