Create or update one or more user.

post

/<irt_study>/api/users

Request

Supported Media Types
  • application/json
  • text/json
  • application/xml
  • text/xml
Body Parameter
List of sites.
Root Schema : /paths/~1api~1users/post/parameters/0/schema
Type: array
Nested Schema : UserDto
Type: object
Nested Schema : ErrorMessages
Type: array
The error details.
Nested Schema : ErrorDto
Type: object

Response

Supported Media Types
  • application/json
  • text/json
  • application/xml
  • text/xml
200 Response
The users have been created/updated successfully.
Body
The class process Users/Sites and creates response to send back
Root Schema : ResponseModel[UserDto]
Type: object
The class process Users/Sites and creates response to send back
Nested Schema : CommonExceptions
Type: array
Read Only: true
The list of errors that occurred while transforming the payload that fails the entire transaction.
Nested Schema : Records
Type: array
The total number of records processed in the request.
Nested Schema : ErrorDto
Type: object
Nested Schema : UserDto
Type: object
Nested Schema : ErrorMessages
Type: array
The error details.
201 Response
The users have been created successfully.
Body
The class process Users/Sites and creates response to send back
Root Schema : ResponseModel[UserDto]
Type: object
The class process Users/Sites and creates response to send back
Nested Schema : CommonExceptions
Type: array
Read Only: true
The list of errors that occurred while transforming the payload that fails the entire transaction.
Nested Schema : Records
Type: array
The total number of records processed in the request.
Nested Schema : ErrorDto
Type: object
Nested Schema : UserDto
Type: object
Nested Schema : ErrorMessages
Type: array
The error details.
204 Response
The response has no content.
Body
Root Schema : /paths/~1api~1users/post/responses/204/schema
Type: string
207 Response
The request ran successfully, but some records had errors.
Body
The class process Users/Sites and creates response to send back
Root Schema : ResponseModel[UserDto]
Type: object
The class process Users/Sites and creates response to send back
Nested Schema : CommonExceptions
Type: array
Read Only: true
The list of errors that occurred while transforming the payload that fails the entire transaction.
Nested Schema : Records
Type: array
The total number of records processed in the request.
Nested Schema : ErrorDto
Type: object
Nested Schema : UserDto
Type: object
Nested Schema : ErrorMessages
Type: array
The error details.
400 Response
The request could not be understood by the server due to malformed syntax.
Body
Root Schema : /paths/~1api~1users/post/responses/400/schema
Type: string
401 Response
User authentication or authorization failed.
Body
Root Schema : /paths/~1api~1users/post/responses/401/schema
Type: string
404 Response
The requested resource was not found.
Body
Root Schema : /paths/~1api~1users/post/responses/404/schema
Type: string
417 Response
The user creation/update failed because the records have errors.
Body
The class process Users/Sites and creates response to send back
Root Schema : ResponseModel[SiteDto]
Type: object
The class process Users/Sites and creates response to send back
Nested Schema : CommonExceptions
Type: array
Read Only: true
The list of errors that occurred while transforming the payload that fails the entire transaction.
Nested Schema : Records
Type: array
The total number of records processed in the request.
Nested Schema : ErrorDto
Type: object
Nested Schema : SiteDto
Type: object
Nested Schema : ErrorMessages
Type: array
Error list.
500 Response
The server encountered an unexpected error.
Body
Root Schema : /paths/~1api~1users/post/responses/500/schema
Type: string

Examples

The following example submits a POST request.

API URL

http://localhost:65385/IrtStudy/api/users/post

Example of Request Body

The following example shows the request sent in JSON format.

[
  {
    "Role": "study coordinator",
      "Site": null,
      "Depot": null,
      "ExternalUserId": "12345697",
      "FirstName": "Joe",
      "Initial": "I",
      "LastName": "Taylor",
      "Title": "Mr",
      "Company": "Oracle",
      "Email": "videe@yahoo.com",
      "Phone": "9856985623",
      "Fax": "9856985623",
      "Address": "New Address",
      "City": "Brooklyn",
      "State": "NY",
      "Zip": "500081",
      "Country": "USA",
      "DateFormat": "ddmmyyyy",
      "TimeZone": "(GMT) Coordinated Universal Time",
      "Language": "English",
      "SendUserId": "true",
      "InFormUserId": "700111"
  }
]

Example of Response Body

The following example shows the response returned in JSON format.

{
  "Transaction": "4704050216480092529",
  "Records": [
    {
      "Key": "c983a45a-165a-48ed-b01e-70193c5244f7",
      "ErrorCount": 1,
      "ErrorMessages": [
        {
          "Key": "58e114d9-34a7-48a0-a380-074a5bd798a6",
          "Code": "306",
          "Description": "The Site must be specified for the selected role.",
          "ExceptionField": 1,
          "SeverityLevel": 2
        }
      ],
      "IsSuccessful": false,
      "Role": "study coordinator",
      "Site": null,
      "Depot": null,
      "ExternalUserId": "12345697",
      "FirstName": "Joe",
      "Initial": "I",
      "LastName": "Taylor",
      "Title": "Mr",
      "Company": "Oracle",
      "Email": "videe@yahoo.com",
      "Phone": "9856985623",
      "Fax": "9856985623",
      "Address": "New Address",
      "City": "Brooklyn",
      "State": "NY",
      "Zip": "500081",
      "Country": "USA",
      "DateFormat": "ddmmyyyy",
      "TimeZone": "(GMT) Coordinated Universal Time",
      "Language": "English",
      "SendUserId": true,
      "InFormUserId": "",
      "KeyId": null
    }
  ],
  "CommonExceptions": [],
  "SuccessfulRecords": 0,
  "HasExceptions": true
}