Add users
You can add users to studies or to sites through an API call.
Step 1: Create the Request Payload File
The request body of this API call needs to include the ID of the visit that you want to add the form to.
Create a new JSON file called <username>.json (where <username> is the name of the user) and copy the following:
{
"schemas":[
"urn:ietf:params:scim:schemas:core:2.0:User",
"urn:umt:extension:schema:user"
],
"username": "SampleUserName",
"name" : {
"familyName": "Doe",
"givenName": "Jane",
"middleName": "Julia",
"honorificPrefix": "Mrs"
},
"displayName": "Jane Doe",
"profileUrl": "https://HOST_NAME:PORT/jdoe",
"userType": "Site",
"preferredLanguage": "English (United States)",
"locale": "English (United States)",
"phoneNumbers": [
{
"value": "+1 555-555-5555",
"type": "primary"
},
{
"value": "+1 555-555-5555",
"type": "alternate"
},
{
"value": "+1 555-555-5555",
"type": "pager"
},
{
"value": "+1 555-555-4444",
"type": "fax"
}
],
"emails":
[
{
"value": "jdoe@example.com",
"type": "work"
}
],
"addresses":
{ "streetAddress": "2300 Oracle Way",
"formatted": "Suite 101",
"locality": "Austin",
"region": "Texas",
"postalCode": "78741",
"country": "USA"
},
"groups":
[
{
"value": "SamplequeryGrp",
"type": "query"
},
{
"value": "Samplesignature",
"type": "signature"
},
{
"value": "Samplemanageruser",
"type": "manageruser"
},
{
"value": "Samplereportgroup",
"type": "reportgroup"
}
],
"roles": "SampleRightsGroup",
"urn:umt:extension:schema:user":
{
"SiteMnemonic":
[
"123",
"456"
],
"DateFormat": "Month / Day / Year",
"TrainingStatus": "Trained",
"DoTechnicalAssessment": true
}
}
Step 2: Run the cURL call
Run the following cURL call to add the user to your study using the request payload file.
curl -H "Authorization: Bearer %token%" -H "Accept: application/json" -X POST "https://hs-umt-scim.oracleindustry.com/scim/<trialname>/1.0/users -d "@<username>.json"