UsersApi Resource

POST /users

For a trusted user, this method allows that user to create another user within our system and also creates an apiKey(auto-generated random) for this user

Request Body
media type data type description
application/json;charset="UTF-8" (custom) The details of the user to be created. Note: All fields are compulsory
Response Body
media type data type description
application/json;charset="UTF-8" (custom) A json representing the created user

Example

Request
POST /users
Content-Type: application/json;charset="UTF-8"
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json;charset="UTF-8"

                
...
                
              

GET /users/apiKey

This method has been deprecated.

For a trusted user, this method allows gets the API key the authenticated user.

Response Body
media type data type description
application/json;charset="UTF-8" (custom) A structure containing the User and his api key.

Example

Request
GET /users/apiKey
Content-Type: */*
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset="UTF-8"

                
...
                
              

GET /users/bookmarks

For an authenticated user, this method returns all bookmarked Observers and Sectors.

Response Body
media type data type description
application/json;charset="UTF-8" (custom) A json structure containing information about the bookmarks made by the user.

Example

Request
GET /users/bookmarks
Content-Type: */*
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset="UTF-8"

                
...
                
              

GET /users/copyrequests

For an authenticated user, this method returns all CopyRequests for Observers and Sectors.

Response Body
media type data type description
application/json;charset="UTF-8" (custom) A json structure containing information about the copy request available from the user.

Example

Request
GET /users/copyrequests
Content-Type: */*
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset="UTF-8"

                
...
                
              

GET /users/roles

For a trusted user, this method returns that user's roles.

Response Body
media type data type description
application/json;charset="UTF-8" (custom) A structure containing information about the roles of the user.

Example

Request
GET /users/roles
Content-Type: */*
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset="UTF-8"

                
...
                
              

GET /users/usagestatistics

For an authenticated user, this method returns the usage statistics of all observers currently and previously owned by the user

Request Parameters
name type description constraints
timestampBegin query Specifies the start of the date range for which statistics are required. Note: Will be rounded to the nearest month required
timestampEnd query Specifies the end of the date range for which statistics are required Note: Will be rounded to the nearest month required
Response Body
media type data type description
application/json;charset="UTF-8" (custom) A JSON output representing the usage statistics of the user

Example

Request
GET /users/usagestatistics
Content-Type: */*
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset="UTF-8"

                
...
                
              

PUT /users/{userId}

For a trusted user, this method allows that user to modify the details of another user within our system. Note: The userId and emailId of the user cannot be modified and any change in the password in this call will not be reflected

Request Parameters
name type description
userId path
Request Body
media type data type description
application/json;charset="UTF-8" (custom) The details of the user to be modified. Note: All fields are compulsory
Response Body
media type data type description
application/json;charset="UTF-8" (custom) A json representing the modified user

Example

Request
PUT /users/{userId}
Content-Type: application/json;charset="UTF-8"
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json;charset="UTF-8"

                
...
                
              

GET /users/confirm/credentials

This method has been deprecated. Use the method GET UsersApi instead.

For a trusted user, this method confirms that the user credentials are correct, returning an empty HTTP 200 OK reply or a HTTP 401 reply on bad user credentials.

NOTE: You are not required to do this call, the user credentials are confirmed on each individual api call. This method only exist if you would like to explicitly confirm the user credentials for some reason.

Response Body
media type data type description
application/json;charset="UTF-8" (custom)

Example

Request
GET /users/confirm/credentials
Content-Type: */*
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset="UTF-8"

                
...
                
              

DELETE /users/copyobserverrequests/{copyRequestId}

For an authenticated user, this method allows that user to decline any copyrequest sent to the user

Request Parameters
name type description constraints
copyRequestId path The copyRequestId of the request to be activated min: 1
Response Body
media type data type description
application/json;charset="UTF-8" (custom) A JSON representing the removed sectorCopyRequest.

Example

Request
DELETE /users/copyobserverrequests/{copyRequestId}
Content-Type: */*
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json;charset="UTF-8"

                
...
                
              

DELETE /users/copysectorrequests/{copyRequestId}

For an authenticated user, this method allows that user to decline any copyrequest sent to the user

Request Parameters
name type description constraints
copyRequestId path The copyRequestId of the request to be activated min: 1
Response Body
media type data type description
application/json;charset="UTF-8" (custom) A JSON representing the removed sectorCopyRequest.

Example

Request
DELETE /users/copysectorrequests/{copyRequestId}
Content-Type: */*
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json;charset="UTF-8"

                
...
                
              

POST /users/{userId}/activate

For a trusted user, this method allows that user to activate any new user that has been created Note: From the method POST UsersApi documentation, the confirmation link clicked by the user will also contain a parameter uuId. This parameter needs to be retrieved and passed into this method for activation to work

Request Parameters
name type description constraints
userId path The userId of the user to be activated required
uuId query The uuId received from the confirmation link required
Response Body
media type data type description
application/json;charset="UTF-8" (custom) A boolean representing whether the operation was successful

Example

Request
POST /users/{userId}/activate
Content-Type: */*
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json;charset="UTF-8"

                
...
                
              

GET /users/{userId}/apiKey

For a trusted user, this method allows gets the API key of a specified (other) user.

Request Parameters
name type description
userId path The user id of the user whose api key is being requested.
Response Body
media type data type description
application/json;charset="UTF-8" (custom) A structure containing the User and his api key.

Example

Request
GET /users/{userId}/apiKey
Content-Type: */*
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset="UTF-8"

                
...
                
              

PUT /users/{userId}/email

For a trusted user, this method allows that user to modify the email of another user within our system. After the call is made, a request to change the email is saved on our system, and the email is changed once the request is confirmed from the users' email account.

Refer to POST UsersApi for instructions on sending the confirmation to the user

Please note that after 1 month, if the request is not confirmed, it is deleted

Request Parameters
name type description constraints
userId path The userId of the user whose email is to be modified  
email query The new email for the user required

Example

Request
PUT /users/{userId}/email
Content-Type: */*

                
...
                
              
Response
HTTP/1.1 204 No Content

              

PUT /users/{userId}/password

For a trusted user, this method allows that user to modify the password of another user within our system.

Request Parameters
name type description constraints
userId path The userId of the user whose password is to be modified  
password query The new password for the user required

Example

Request
PUT /users/{userId}/password
Content-Type: */*

                
...
                
              
Response
HTTP/1.1 204 No Content

              

POST /users/{userId}/sendConfirmationEmail

For a trusted user, this method allows that user to send a confirmation link to a user, to either activate his account or change the email id associated with his account. Please Note: For security reasons, we require that you provide us with the confirmation link that you would like the user to redirect to when he receives the email. In the body of the email, you would also be required to replace all occurrences of the confirmation link with the following string: {<%URL_PlaceHolder%>}. We require this as we will be appending a parameter to this link and the name of this parameter is uuId. When the user clicks this link, we require you to retrieve this uuId parameter and pass it as a parameter to the POST UsersApi or POST UsersApi call. Also, if you would like the email to be send from your email server, you may do that, but your email server must be registered with us.

Request Parameters
name type description default constraints
userId path The userId of the new user (to be activated)    
confirmationLink query The confirmation link for a user to confirm his email id (preferably on your server). We will append a parameter to this.   required
confirmationType query The type of confirmation email it is, user-activation, or email-change USER_ACTIVATION required
Request Body
media type data type description
application/json;charset="UTF-8" (custom) The details of the email to be sent to the new user. In the body of the email, all occurrences of the confirmationLink link must be replace with <%URL_PlaceHolder%>, else the user will not be activated
Response Body
media type data type description
application/json;charset="UTF-8" (custom) A boolean representing whether the operation was successful

Example

Request
POST /users/{userId}/sendConfirmationEmail
Content-Type: application/json;charset="UTF-8"
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json;charset="UTF-8"

                
...
                
              

PUT /users/copyobserverrequests/{copyRequestId}/activate

For an authenticated user, this method allows that user to activate any copyrequest sent to the user

Request Parameters
name type description constraints
copyRequestId path The copyRequestId of the request to be activated min: 1
Response Body
media type data type description
application/json;charset="UTF-8" (custom) A JSON representing the created customerObserver from the copyRequest.

Example

Request
PUT /users/copyobserverrequests/{copyRequestId}/activate
Content-Type: */*
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json;charset="UTF-8"

                
...
                
              

PUT /users/copysectorrequests/{copyRequestId}/activate

For an authenticated user, this method allows that user to activate any copyrequest sent to the user

Request Parameters
name type description constraints
copyRequestId path The copyRequestId of the request to be activated min: 1
Response Body
media type data type description
application/json;charset="UTF-8" (custom) A JSON representing the created customerObserver from the copyRequest.

Example

Request
PUT /users/copysectorrequests/{copyRequestId}/activate
Content-Type: */*
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json;charset="UTF-8"

                
...
                
              

POST /users/{userId}/email/confirm

For a trusted user, this method allows that user to confirm that the email associated with any other user should be changed. Note: From the method POST UsersApi documentation, the confirmation link clicked by the user will also contain a parameter uuId. This parameter needs to be retrieved and passed into this method for activation to work

Request Parameters
name type description constraints
userId path The userId of the user whose password is to be changed  
uuId query The uuId received from the confirmation link required
Response Body
media type data type description
application/json;charset="UTF-8" (custom) A boolean representing whether the operation was successful

Example

Request
POST /users/{userId}/email/confirm
Content-Type: */*
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json;charset="UTF-8"

                
...