Users Resource

GET /users

Returns the list of all the users associated to the account of the currently connected user.

Response Body
media type data type description
application/json UsersResult (JSON) The list of requested User objects.
application/xml usersResult (XML)

Example

Request
GET /users
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "user" : [ {
    "id" : 12345,
    "accountId" : 12345,
    "username" : "...",
    "createdOn" : 12345,
    "createdBy" : 12345,
    "modifiedOn" : 12345,
    "modifiedBy" : 12345,
    "status" : "SUSPENDED",
    "password" : "...",
    "displayName" : "...",
    "email" : "...",
    "phoneNumber" : "...",
    "loginOn" : 12345,
    "loginAttempts" : 12345,
    "lockedOn" : 12345,
    "optlock" : 12345,
    "loginAttemptsResetOn" : 12345,
    "unlockOn" : 12345,
    "trust_date" : 12345
  }, {
    "id" : 12345,
    "accountId" : 12345,
    "username" : "...",
    "createdOn" : 12345,
    "createdBy" : 12345,
    "modifiedOn" : 12345,
    "modifiedBy" : 12345,
    "status" : "SUSPENDED",
    "password" : "...",
    "displayName" : "...",
    "email" : "...",
    "phoneNumber" : "...",
    "loginOn" : 12345,
    "loginAttempts" : 12345,
    "lockedOn" : 12345,
    "optlock" : 12345,
    "loginAttemptsResetOn" : 12345,
    "unlockOn" : 12345,
    "trust_date" : 12345
  } ]
}
                
              

POST /users

Creates a new User based on the information provided in UserCreator parameter.

Request Body
media type data type description
application/xml userCreator (XML) Provides the information for the new User to be created.
Response Body
media type data type description
application/xml user (XML) The newly created User object.

Example

Request
POST /users
Content-Type: application/xml
Accept: application/xml

                
<userCreator xmlns="http://eurotech.com/edc/2.0">
  <accountId>...</accountId>
  <username>...</username>
  <password>...</password>
  <displayName>...</displayName>
  <email>...</email>
  <phoneNumber>...</phoneNumber>
</userCreator>

                
              
Response
HTTP/1.1 201 Created
Content-Type: application/xml

                
<user xmlns="http://eurotech.com/edc/2.0">
  <id>...</id>
  <accountId>...</accountId>
  <username>...</username>
  <createdOn>...</createdOn>
  <createdBy>...</createdBy>
  <modifiedOn>...</modifiedOn>
  <modifiedBy>...</modifiedBy>
  <status>...</status>
  <password>...</password>
  <displayName>...</displayName>
  <email>...</email>
  <phoneNumber>...</phoneNumber>
  <loginOn>...</loginOn>
  <loginAttempts>...</loginAttempts>
  <lockedOn>...</lockedOn>
  <optlock>...</optlock>
  <loginAttemptsResetOn>...</loginAttemptsResetOn>
  <unlockOn>...</unlockOn>
  <trust_date>...</trust_date>
</user>

                
              

GET /users/findByName

Returns the User specified by the "username" query parameter.

Request Parameters
name type description
username query The username of the User requested.
Response Body
media type data type description
application/json User (JSON) The requested User object.
application/xml user (XML)

Example

Request
GET /users/findByName
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "id" : 12345,
  "accountId" : 12345,
  "username" : "...",
  "createdOn" : 12345,
  "createdBy" : 12345,
  "modifiedOn" : 12345,
  "modifiedBy" : 12345,
  "status" : "DISABLED",
  "password" : "...",
  "displayName" : "...",
  "email" : "...",
  "phoneNumber" : "...",
  "loginOn" : 12345,
  "loginAttempts" : 12345,
  "lockedOn" : 12345,
  "optlock" : 12345,
  "loginAttemptsResetOn" : 12345,
  "unlockOn" : 12345,
  "trust_date" : 12345
}
                
              

DELETE /users/{userId}

Deletes the User specified by the "id" path parameter.

Request Parameters
name type description constraints
userId path The id of the User to be deleted. required

Example

Request
DELETE /users/{userId}
Content-Type: */*

                
...
                
              
Response
HTTP/1.1 204 No Content

              

GET /users/{userId}

Returns the User specified by the "id" path parameter.

Request Parameters
name type description constraints
userId path The id of the User requested. required
Response Body
media type data type description
application/json User (JSON) The requested User object.
application/xml user (XML)

Example

Request
GET /users/{userId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "id" : 12345,
  "accountId" : 12345,
  "username" : "...",
  "createdOn" : 12345,
  "createdBy" : 12345,
  "modifiedOn" : 12345,
  "modifiedBy" : 12345,
  "status" : "SUSPENDED",
  "password" : "...",
  "displayName" : "...",
  "email" : "...",
  "phoneNumber" : "...",
  "loginOn" : 12345,
  "loginAttempts" : 12345,
  "lockedOn" : 12345,
  "optlock" : 12345,
  "loginAttemptsResetOn" : 12345,
  "unlockOn" : 12345,
  "trust_date" : 12345
}
                
              

PUT /users/{userId}

Updates the User specified by the "id" path parameter based on the information provided in the User parameter.

Request Parameters
name type description
userId path The id of the User to be updated.
Request Body
media type data type
application/xml user (XML)
Response Body
media type data type description
application/xml user (XML) The updated user.

Example

Request
PUT /users/{userId}
Content-Type: application/xml
Accept: application/xml

                
<user xmlns="http://eurotech.com/edc/2.0">
  <id>...</id>
  <accountId>...</accountId>
  <username>...</username>
  <createdOn>...</createdOn>
  <createdBy>...</createdBy>
  <modifiedOn>...</modifiedOn>
  <modifiedBy>...</modifiedBy>
  <status>...</status>
  <password>...</password>
  <displayName>...</displayName>
  <email>...</email>
  <phoneNumber>...</phoneNumber>
  <loginOn>...</loginOn>
  <loginAttempts>...</loginAttempts>
  <lockedOn>...</lockedOn>
  <optlock>...</optlock>
  <loginAttemptsResetOn>...</loginAttemptsResetOn>
  <unlockOn>...</unlockOn>
  <trust_date>...</trust_date>
</user>

                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/xml

                
<user xmlns="http://eurotech.com/edc/2.0">
  <id>...</id>
  <accountId>...</accountId>
  <username>...</username>
  <createdOn>...</createdOn>
  <createdBy>...</createdBy>
  <modifiedOn>...</modifiedOn>
  <modifiedBy>...</modifiedBy>
  <status>...</status>
  <password>...</password>
  <displayName>...</displayName>
  <email>...</email>
  <phoneNumber>...</phoneNumber>
  <loginOn>...</loginOn>
  <loginAttempts>...</loginAttempts>
  <lockedOn>...</lockedOn>
  <optlock>...</optlock>
  <loginAttemptsResetOn>...</loginAttemptsResetOn>
  <unlockOn>...</unlockOn>
  <trust_date>...</trust_date>
</user>

                
              

POST /users/{userId}/unlock

Unlock a User based on the userId provided in the path request.

Request Parameters
name type description constraints
userId path The userId that refer to the user to unlock. required
Response Body
media type data type description
application/json User (JSON) The user unlocked.
application/xml user (XML)

Example

Request
POST /users/{userId}/unlock
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "id" : 12345,
  "accountId" : 12345,
  "username" : "...",
  "createdOn" : 12345,
  "createdBy" : 12345,
  "modifiedOn" : 12345,
  "modifiedBy" : 12345,
  "status" : "SUSPENDED",
  "password" : "...",
  "displayName" : "...",
  "email" : "...",
  "phoneNumber" : "...",
  "loginOn" : 12345,
  "loginAttempts" : 12345,
  "lockedOn" : 12345,
  "optlock" : 12345,
  "loginAttemptsResetOn" : 12345,
  "unlockOn" : 12345,
  "trust_date" : 12345
}