Users and Folders (Projects) REST API

Users and Folders (Projects) REST API

Overview

The Users and Folders (Projects) REST services allows you to query and update User and Folder information for your company.

Base URL  
https://fieldconnect.field2base.com/v2/api

Header (required)
Authorization: Basic {CompanyID}:{Username}:{Password}:{API Sync Key}
Content-Type: application/json
Note: Authorization Header above is the same as all other Mobile Forms REST API calls. 
Note: API Developers can use OAuth 2.0 Authentication instead of the Basic Authentication. The OAuth 2.0 Authentication uses the Client Credentials Grant Type and requires the Company have a Client ID and a Client Secret generated in the Mobile Forms Portal to make web service calls to the REST API Endpoints. You can contact the Professional Services team at f2bps@field2base.com to implement OAuth 2.0 Authentication.


Supported Operations

Users

  1. GET users/
    1. Retrieve a list of all Users
  2. GET users/lookup/folder/{folderID}
    1. Retrieve a list of Users with access to the specified Folder
  3. GET users/lookup/group/{groupID}
    1. Retrieve a list of Users in the specified Group
  4. GET users/lookup/type/{userType}
    1. Retrieve a list of Users by the specified type
    2. User types are: UsersOnly, UsersAssignedToTablets and RecipientsOnly
  5. GET users/{userKey}
    1. Retrieve User information with User Key
  6. GET users/search/username/{username}/
    1. Retrieve User information with username
  7. GET users/search/email/{emailAddress}/
    1. Retrieve User information with email address
  8. GET users/search/personnelid/{personnelID}
    1. Retrieve User information with Personnel ID
  9. POST users/create
    1. Create a new User
  10. PUT users/update/{userKey}
    1. Update a User with key {user key}
NOTE:  You will need to add "/" at the end of the call if there is a period in the Username or Group Name.

Folders (previously named Projects)

  1. GET projects/
    1. Retrieve a list of Folders
  2. GET projects/{projectKey}
    1. Retrieve Folder information with key (projKey)
  3. GET projects/{projectKey}/users
    1. Retrieve a list of Users with access to a Folder with key (projKey)


API Samples

Get All Users

Request : GET
  1. https://fieldconnect.field2base.com/v2/api/users
Response:  200 OK
  1. [
  2.   {
  3.     "UserKey": "5f6d0589-dad0-4fe1-8acc-7669bcxxxxxx",
  4.     "UserName": null,
  5.     "EnableWebAccess": true,
  6.     "Password": null,
  7.     "PasswordNeverExpires": null,
  8.     "ForcePasswordChangeOnLogin": null,
  9.     "PIN": 123ABC,
  10.     "FirstName": "Test",
  11.     "MiddleName": null,
  12.     "LastName": "User",
  13.     "PhoneCode": null,
  14.     "Phone": null,
  15.     "Email": " test@test.com ",
  16.     "Projects": [
  17.          "1be2fd67-9c0b-40ba-a440-xxxxxxxxxxxx",
  18.          "ed02146a-2ca7-4ce7-980f-xxxxxxxxxxxx",
  19.          "3fec86e5-7069-41e4-966e-xxxxxxxxxxxx"
  20.     ],
  21.     "Groups": [
  22.         "Basic Workflow Approval Group",
  23.         "Basic Workflow Recipient Group",
  24.     ],
  25.     "OptionalRecipient": null,
  26.     "Roles": [
  27.          "Mobile Forms Administrator",
  28.          "Web App User"
  29.     ],
  30.     "PersonnelID": null,
  31.     "PersonnelType": null,
  32.     "JobTitle": null,
  33.     "DefaultLocation": "",
  34.     "DefaultGroup": null,
  35.     "ActivationLimit": null,
  36.     "SendPasswordEmail": null,
  37.     "AllowForgotPasswordToolToResets": true,
  38.     "UserType": "User",
  39.     "LastLogin": "2022-11-23T17:24:21.837",
  40.     "CreationDate": "2021-11-23T17:24:21.837",
  41.    "RequireAlwaysSSO": null
  42.   },
  43.   {
  44.   "UserKey": "6195b3e5-2ef8-4df5-8da4-d66ff6xxxxxx",
  45.   "UserName": null,
  46.   "EnableWebAccess": false,
  47.   "Password": null,
  48.   "PasswordNeverExpires": null,
  49.   "ForcePasswordChangeOnLogin": null,
  50.    "PIN": null,
  51.   "FirstName": null,
  52.   "MiddleName": null,
  53.   "LastName": null,
  54.   "PhoneCode": "33,
  55.   "Phone": "123-456-7890",
  56.   "Email": " hi@gmail.com ",
  57.   "Projects": [
  58.       "84261aea-4aa2-4357-9ab2-xxxxxxxxxxxxx"
  59.   ],
  60.   "Groups": [
  61.       "Test Group"
  62.   ],
  63.   "OptionalRecipient": null
  64.   "Roles": [
  65.       "Workflow Reporter"
  66.   ],
  67.   "PersonnelID": null,
  68.   "PersonnelType": null,
  69.   "JobTitle": null,
  70.   "DefaultLocation": "",
  71.   "DefaultGroup": null,
  72.   "ActivationLimit": null,
  73.   "SendPasswordEmail": null,
  74.   "AllowForgotPasswordToolToResets": true,
  75.   "UserType": "User",
  76.   "LastLogin": "2022-11-23T17:24:21.837",
  77.   "CreationDate": "2021-11-23T17:24:21.837",
  78.    "RequireAlwaysSSO": false,
  79.    "MultiFactorAuthenticationEnabled": false
  80. }
 

Get User by User Key

Request : GET
  1. https://fieldconnect.field2base.com/v2/api/users/5f6d0589-dad0-4fe1-8acc-7669bcxxxxxx

Response:  200 OK
  1. {
  2. "UserKey": "5f6d0589-dad0-4fe1-8acc- 7669bcxxxxxx ",
  3. "UserName": null,
  4. "EnableWebAccess": false,
  5. "Password": null,
  6. "PasswordNeverExpires": false,
  7. "ForcePasswordChangeOnLogin": null,
  8.  "PIN": 123ABC,
  9. "FirstName": null,
  10. "MiddleName": null,
  11. "LastName": null,
  12. "PhoneCode": null,
  13. "Phone": null,
  14. "Email": " tester@field2base.com ",
  15. "Projects": [],
  16. "Groups": [],
  17. "OptionalRecipient": true,
  18. "Roles": [],
  19. "PersonnelID": null,
  20. "PersonnelType": null,
  21. "JobTitle": null,
  22. "DefaultLocation": "",
  23. "DefaultGroup": null,
  24. "ActivationLimit": null,
  25. "SendPasswordEmail": null,
  26. "AllowForgotPasswordToolToResets": true,
  27.  "UserType": "User",
  28.  "LastLogin": "2021-11-23T17:24:21.837",
  29.  "CreationDate": "2021-11-23T17:24:21.837",
  30.   "RequireAlwaysSSO": false,
  31.   "MultiFactorAuthenticationEnabled": false
  32. }
   
Body
  1. {
  2. UserName: "tester",
  3. EnableWebAccess: true,
  4. Password: "12345",
  5. PasswordNeverExpires: false,
  6. ForcePasswordChangeOnLogin: false,
  7. FirstName: "tester",
  8. MiddleName: "",
  9. LastName: "Chen",
  10. Email: " tester@f2b.com ",
  11. Projects: ["56f88fb1-c3c7-4f9e-8a80-3bda4c906127"],
  12. Groups: [],
  13. }

Response:  201 Created

  1. {
  2. "UserKey": "519e0efe-fec8-4546-99e5-9c0a4bb32688",
  3. "UserName": "tester",
  4. "EnableWebAccess": true,
  5. "Password": "12345",
  6. "PasswordNeverExpires": false,
  7. "PIN": "123ABC",
  8. "ForcePasswordChangeOnLogin": false,
  9. "FirstName": "tester",
  10. "MiddleName": "",
  11. "LastName": "McTester",
  12. "PhoneCode": null,
  13. "Phone": null,
  14. "Email": " tester@f2b.com ",
  15. "Projects": [
  16. "56f88fb1-c3c7-4f9e-8a80-3bda4c906127"
  17. ],
  18. "Groups": [],
  19. "OptionalRecipient": null,
  20. "Roles": [],
  21. "PersonnelID": null,
  22. "PersonnelType": null,
  23. "JobTitle": null,
  24. "DefaultLocation": "",
  25. "DefaultGroup": null,
  26. "ActivationLimit": null,
  27. "SendPasswordEmail": null,
  28. "AllowForgotPasswordToolToResets": true,
  29.  "UserType": "User",
  30.  "LastLogin": "2021-11-23T17:24:21.837",
  31.  "CreationDate": "2021-11-23T17:24:21.837",
  32.   "RequireAlwaysSSO": false,
  33.   "MultiFactorAuthenticationEnabled": false

Get All Folders (Projects)

Request: GET
  1. https://fieldconnect.field2base.com/v2/api/projects
Response:  200 OK
  1.     {
  2.       "ProjKey": "56f88fb1-c3c7-4f9e-8a80-3bda4c906127",
  3.       "Name": "temp",
  4.       "Description": null,
  5.       "StartDate": "2018-05-03T00:00:00"
  6.     },
  7.     {
  8.       "ProjKey": "1be2fd67-9c0b-40ba-a440-40a9c6fe0589",
  9.       "Name": "Form Library",
  10.       "Description": null,
  11.       "StartDate": "2018-04-20T00:00:00"
  12.        OptionalRecipient": true
  13.     }