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
| Parameter | Description |
|---|---|
|
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 |
|---|---|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the team |
|
|
the name of the team |
|
|
the description of the team |
|
|
the members of this team |
|
|
the user who created this team |
|
|
the date of this team account was created |
|
|
the user who last modified this team |
|
|
the date of this team was last modified |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the name of the team |
|
|
the description of the team |
Request parameters
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the id of the team |
|
|
the members of this team |
|
|
the user who created this team |
|
|
the date of this team account was created |
|
|
the user who last modified this team |
|
|
the date of this team was last modified |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
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
| Parameter | Description |
|---|---|
|
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