Group API
Go Up to API Reference
This part of the Team Server API lets you work with groups.
Contents
GET v1/groups
Obtains a list of groups.
GET v1/groups/<id>
Obtains information about the group with the specified ID.
POST v1/groups
Creates a group. Your request must provide the following fields:
- name (required)
- parentId(optional)
- Note: You only need to specify the ID of the datasource group you want to be the parent.
- membersType (required): "datasource".
If successful, the response from the server provides all the details about your new group.
POST v1/groups/<group_id>/members/<member_id>
Move the data source with <datasource_id> to the data source group with <datasourcegroup_id> even if the data source already belongs to another data source group. If the user is not allowed to perfom this procedure, a forbidden message will be shown.
PUT v1/groups/<id>
Updates the information of a data source group. Your request can provide any combination of the group fields. Just Id is required.
If successful, the response from the server provides all the details about your modified data source group.
DELETE v1/groups/<id>
Deletes the group with the specified ID. When deleting a group, all its children will be deleted too.
If successful, the response is {"message":"OK","status":"200"}
.
DELETE v1/groups/<group_id>/members/<member_id>
Remove data source with <datasource_id> from data source group with <datasourcegroup_id>. If the user is not allowed to perfom this procedure, a forbidden message will be shown.
Group Fields
Data source Group resources in Data Source Group API requests and responses may include any combination of the following fields:
Item | Example | Description |
---|---|---|
|
|
An integer that uniquely identifies the group. |
|
|
A string that defines the status of the group using nomenclature you decide upon. |
|
|
A description of the group. |
|
|
The date when the group was created, in Unix time (seconds since 1970). |
|
|
Path relative to the Team Server root URL that points to the page of the group. |
|
|
The name of the group. |
|
|
Additional information about the group. |
|
|
The type of the resource. Its value is always "group" for group resources. |
|
|
A list of aliases and synonyms of the group. |
|
|
A list of abbreviations of the group. |
|
|
The date when the group was modified, in Unix time (seconds since 1970). |
|
|
Path relative to the Team Server root API URL that points to the entry of the group resource. |
|
|
An integer that uniquely identifies the parent of the group. |
|
|
following/unfollowing |
|
|
Contained elements type. |
Example Response
This is from a GET v1/groups/<id> call:
{
"group" : {
"id" : 123,
"name" : "Group Name",
"type" : "Group",
"url" : "http://api.connect.example.com/v1/groups/123",
"link" : "http://connect.example.com/groups/view.spg?key=123",
"createdAt" : 1320296464,
"modifiedAt" : 1320296466,
"description" : "Database information.",
"abbreviations" : "gg",
"aliases" : "Earnings",
"userData" : "some text",
"status" : "Online",
"isCurrentUserFollowing" : true,
"membersType" : "datasource"
"parentId" : 456,
"stewards" :
[
{ <person resources> }
]
}
}