Groups REST API

Groups REST API

Overview

The Groups REST API allow Customers the ability to get Group information and manage Groups (create, edit, delete, assign) in the Field2Base system.

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

Header (Required)
Authorization: Basic {CompanyID}:{Username}:{Password}:{API Sync Key}
Content-Type: application/json
Authorization Header above is the standard for all F2B REST API calls.



F2B API Prerequisites

To use the Groups REST API, you need to following:

  1. An API Sync Key is created for the Company
  2. A User Account with the ability to submit to the API (Mobile Forms Administrator Role) 


Supported Operations

The following operations are supported by the REST web service.
Append to the Base URL (https://fieldconnect.field2base.com/v2/api)

Groups

Endpoint
Method
Description
groups/
GET
Lists of all Groups
groups/{group id}
GET
Get Details of a single Group
groups/create
POST
Create a new Group using the Body of a post request as JSON
groups/update/{group id}
PUT
Updates a Group using the Group ID and the Body of a post request as JSON
groups/adduser/{group id}/{username}
PUT
Adds a User (by Username) to a Group using the Group ID
groups/removeuser/{group id}/{username}
DEL
Removes a User (by Username) from a Group using the Group
groups/delete/{group id}
DEL
Deletes an existing Group
 Note: Be sure to add "/" at the end of the call if there is a period in the Username or Group Name.



JSON Definition

  1. {
  2.     "GroupId": {int},
  3.     "Name": {string},
  4.     "Users": {array of guid},
  5.     "GroupUsers": {array of User objects, example included}
  6.    [
  7.         {
  8.             "UserKey": {guid},
  9.             "Username": {string}
  10.         }
  11.     ]
  12. }


API Samples

Get List of Groups

Request: GET
  1. https://fieldconnect.field2base.com/v2/api/groups

Get details of one Group

Request: GET
  1. https://fieldconnect.field2base.com/v2/api/groups/{group id}

Create a Group

Request: POST
  1. https://fieldconnect.field2base.com/v2/api/groups/create
Body
  1. {
  2.       "Name": "TEST GROUP",
  3.       "Users": ["00000000-0000-0000-0000-000000000000"]
  4. }


Update a Group (change group name and/or list of users)

Request: PUT
  1.  https://fieldconnect.field2base.com/v2/api/groups/update/100
Body
  1. {
  2.       "GroupId": 100,
  3.       "Name": "TEST GROUP",
  4.       "Users": ["00000000-0000-0000-0000-000000000000",
  5.       "00000000-0000-0000-0000-000000000001"]
  6. }


Add a User to a Group

Request: PUT
  1. https://fieldconnect.field2base.com/v2/api/groups/adduser/123/{username}/


Remove a User from a Group

Request: DEL
  1. https://fieldconnect.field2base.com/v2/api/groups/removeuser/123/{username}/


Delete a Group

Request: DEL
  1. https://fieldconnect.field2base.com/v2/api/groups/delete/{group id}

    • Popular Articles

    • Forms Designer Quick Start Guide

      Overview Field2Base Forms Designer is the proprietary software application that allows your existing Forms to be quickly converted to an active, online, smart Form available to your end users via our Mobile Device and Web-based Applications. This ...
    • Integration Service Configuration Guide

      How To Configure Integration Services To Allow Read/Write Access on a Network Path All of our Integration Products, including the DIM, DUU, and EDM have respective Windows Services responsible for communicating with our server. Occassionally, ...
    • Data Integration Module (DIM) Migration Guide

      Overview This article provides the information necessary to migrate the Field2Base Data Integration Module (DIM) over from one server to another. Please refer to the DIM Install Guide for the initial installation of the Field2Base DIM. Once that's ...
    • Mobile Forms iOS Enterprise App Upgrade to the Mobile Forms iOS App Store

      Overview This guide will review how to switch between two versions of the Mobile Forms app, uninstalling the Enterprise build and installing the App Store Build. The primary benefits of switching over are that updates to the App Store build are ...
    • How to Check the Version of Integration Products Running on a Windows 10 Machine

      Right-click on the Start menu button. Click on Apps & Features. In the Apps & Features search bar type in the Integration Product you are looking for, eg. F2B Data Integration Module, F2B Data Upload, or F2B Enterprise Dispatch Module. Click to ...