Overview
The Groups REST API allows you to manage Groups (create, edit, delete, assign) 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
Append to the Base URL: https://fieldconnect.field2base.com/v2/api
- GET groups/
- Retrieve a list of all Groups
- GET groups/{groupID}
- Get details for a single Group
- POST groups/create
- Create a new Group
- PUT groups/update/{groupID}
- Update a Group
- PUT groups/adduser/{groupID}/{username}
- Add a User to a Group
- DELETE groups/removeuser/{groupID}/{username}
- Remove a User from a Group
- DELETE groups/delete/{groupID}
- Delete an existing Group
Note: You will need to add "/" at the end of the call if there is a period in the Username or Group Name.
API Samples
Get List of Groups
Request: GET
- https://fieldconnect.field2base.com/v2/api/groups
Get details of one Group
Request: GET
- https://fieldconnect.field2base.com/v2/api/groups/{group id}
Create a Group
Request: POST
- https://fieldconnect.field2base.com/v2/api/groups/create
Body
- {
- "Name": "TEST GROUP",
- "Users": ["00000000-0000-0000-0000-000000000000"]
- }
Update a Group (change group name and/or list of users)
Request: PUT
- https://fieldconnect.field2base.com/v2/api/groups/update/100
Body
- {
- "GroupId": 100,
- "Name": "TEST GROUP",
- "Users": ["00000000-0000-0000-0000-000000000000",
- "00000000-0000-0000-0000-000000000001"]
- }
Add a User to a Group
Request: PUT
- https://fieldconnect.field2base.com/v2/api/groups/adduser/123/{username}/
Remove a User from a Group
Request: DELETE
- https://fieldconnect.field2base.com/v2/api/groups/removeuser/123/{username}/
Delete a Group
Request: DELETE
- https://fieldconnect.field2base.com/v2/api/groups/delete/{group id}