Group API

From TeamServer ER/Studio
Jump to: navigation, search

Go Up to API Reference

This part of the Team Server API lets you work with groups.

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

"id"

16

An integer that uniquely identifies the group.

"status"

"In progress"

A string that defines the status of the group using nomenclature you decide upon.

"description"

"Purpose"

A description of the group.

"createdAt"

1372150068

The date when the group was created, in Unix time (seconds since 1970).

"link"

"/group/view.spg?groupKey=16"

Path relative to the Team Server root URL that points to the page of the group.

"name"

"Important data source"

The name of the group.

"userData"

"You can write anything here."

Additional information about the group.

"type"

"Group"

The type of the resource. Its value is always "group" for group resources.

"aliases"

"alias"

A list of aliases and synonyms of the group.

"abbreviations"

"IA"

A list of abbreviations of the group.

"modifiedAt"

1372150068

The date when the group was modified, in Unix time (seconds since 1970).

"url"

"/v1/logincredentials/16"

Path relative to the Team Server root API URL that points to the entry of the group resource.

"parentId"

16

An integer that uniquely identifies the parent of the group.

"isCurrentUserFollowing"

true

following/unfollowing

"membersType"

"datasource"

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> }

        ]

    }

}

See Also

Personal tools
Product Videos