[REST 1.1] Teams

GET

Get teams list

Get list of all teams.

Permissions: ADMIN USER SUPERVISOR HR

GET {jira_baseurl}/rest/vacation-manager/1.0/team

Responses: 200 500

Path

GET {jira_baseurl}/rest/vacation-manager/1.0/team
Request
[ { "id": 1, "name": "team 1", "description": "description 1" }, { "id": 2, "name": "team 2", "description": "description 2" }, { "id": 3, "name": "team 3", "description": "description 3" } ]

Get single team

Get information about existing team members.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 200 404 500

Path params

Name

Type

Description

Name

Type

Description

teamId

int

Team ID

Path

Response

Get team members

Get information about existing team.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 200 400 500

Path params

Name

Type

Description

Name

Type

Description

teamId

int

Team ID

Path
Response

POST

Create team

Creates new team.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 201 400 500

JSON body fields

Name

Type

Description

Name

Type

Description

name

String

Team name, must be unique for each team

description

String (Optional)

Team description

Path

Body

Response

Add member to team

Add member to team.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 201 400 404 500

Path params

Name

Type

Description

Name

Type

Description

teamId

int

Team id


JSON body fields

Name

Type

Description

Name

Type

Description

type

MemberType

Type of member

name

String

Name of the member you want to add to the team

role

MemberRole

Role for member

MemberType

Name

Type

Description

Name

Type

Description

USER

Enum

User type

GROUP

Enum

Group type

MemberRole

Name

Type

Description

Name

Type

Description

USER

Enum

User role for member

SUPERVISOR

Enum

Supervisor role for member

 

Path

Add user to team

Body
Response

Add group to team

Body
Response

PATCH

Update team

Update existing team.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 200 400 404 500

Path params

Name

Type

Description

Name

Type

Description

teamId

int

Team ID


JSON body fields

Name

Type

Description

Name

Type

Description

name

String

Team name, must be unique

description

String (Optional)

Team description

allowUsersViewStatistics

bool

(Optional)

as name says, it’s boolean value that can be either true or false,

defaultSupervisorId

int

(Optional)

ID (number value - not user name!) of a user that will be set as default supervisor, -1 means that this value will be cleared and default supervisor will be removed from team.

 


DELETE

Delete team

Delete existing team.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 204 404 500

Path params

Name

Type

Description

Name

Type

Description

teamId

int

Team ID

Remove member from team

Remove member from team.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 204 404 500

Path params

Name

Type

Description

Name

Type

Description

teamId

int

Team ID

JSON body fields

Name

Type

Description

Name

Type

Description

type

String

Type of member to remove

  • USER

  • GROUP

name

String

Name of the member you want to remove from the team

role

String

Role for member to remove

  • USER

  • SUPERVISOR

Feel free to tell us what topic should be covered: vacationmanager@psc-software.atlassian.net