Groups are used to define grouping of users and user's data or your company hierarchy. The groups may be Countries, Offices, Teams etc.
Group items are added to a group and can then be assigned to a user. The group items are then used as part of user access rights and to determine how the user's KPI entries are grouped for analytics and reporting purposes.
The object has the following properties:
Name | Type | Is Read Only | Is Mandatory | Max Length | Notes |
---|---|---|---|---|---|
id | integer | yes | no | Automatically assigned when creating a group | |
name | string | no | yes | 50 | The name of the group |
{ "id": 1, "name": "City" }
<group xmlns="http://schemas.datacontract.org/2004/07/Waytobi.App.Api.Models" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <id>1</id> <name>City</name> </group>
GET /api/groups
curl https://app.waytobi.com/api/groups -v -u {token}
Status: 200 OK [ { "id": 1, "name": "City" }, { "id": 2, "name": "Country" } ]
GET /api/groups/{id}
curl https://app.waytobi.com/api/groups/{id}
-v -u {token}
Status: 200 OK { "id":1, "name":"City", "sort_order":1 }
POST /api/groups
curl https://app.waytobi.com/api/groups -H "Content-Type: application/json" -d '{"name": "My Group Name"}' -v -u {token} -X POST
Status: 201 Created Location: https://app.waytobi.com/api/groups/{id} { "id":3, "name":"My Group Name" }
PUT /api/groups/{id}
curl https://app.waytobi.com/api/groups/{id} -H "Content-Type: application/json" -d '{"name": "My Group Name"}' -v -u {token} -X PUT
Status: 200 OK { "id":3, "name":"My Group Name" }
DELETE /api/groups/{id}
curl https://app.waytobi.com/api/groups/{id} -v -u {token}
Status: 200 OK
Looking for anything specific article which resides in general queries? Just browse the various relevant folders and categories and then you will find the desired article.
Contact Us