Teams

This chapter focuses on services for the teams.

Get a team

A GET to /teams/{id} returns the team with the given id.

Path parameters

Table 1. /api/rest/latest/teams/{id}
Parameter Description

id

the id of the team

HTTP request

GET /api/rest/latest/teams/567 HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 370

{
  "_type" : "team",
  "id" : 567,
  "name" : "Team A",
  "description" : "<p>black panther</p>",
  "members" : [ ],
  "created_by" : "admin",
  "created_on" : "2017-07-04T10:00:00Z",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-07-05T10:00:00Z",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/teams/567"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

id

Number

the id of the team

name

String

the name of the team

description

String

the description of the team

members

Array

the members of this team

created_by

String

the user who created this team

created_on

String

the date of this team account was created

last_modified_by

String

the user who last modified this team

last_modified_on

String

the date of this team was last modified

_links

Object

related links

Relation Description

self

link to this user

Create a new team

A POST to /teams creates a new team.

HTTP request

POST /api/rest/latest/teams HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 85

{
  "_type" : "team",
  "name" : "Team A",
  "description" : "<p>black panther</p>"
}

Request fields

Path Type Description

_type

String

the type of the entity

name

String

the name of the team

description

String

the description of the team

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

HTTP response

HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 370

{
  "_type" : "team",
  "id" : 332,
  "name" : "Team A",
  "description" : "<p>black panther</p>",
  "members" : [ ],
  "created_by" : "admin",
  "created_on" : "2017-07-04T10:00:00Z",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-07-05T10:00:00Z",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/teams/332"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the team

members

Array

the members of this team

created_by

String

the user who created this team

created_on

String

the date of this team account was created

last_modified_by

String

the user who last modified this team

last_modified_on

String

the date of this team was last modified

_links

Object

related links

Relation Description

self

link to this user

Delete a team

A DELETE to /teams/{ids} deletes a or several team(s) with the given id(s).

Path parameters

Table 1. /api/rest/latest/teams/{ids}
Parameter Description

ids

the list of ids of the teams

HTTP request

DELETE /api/rest/latest/teams/169 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080