Overview
Vacation Manager's REST API provides team API which allows you to obtain:
Methods:
GET
...
title | Get teams list |
---|
Get list of all teams.
Path
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/team |
Permissions
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Responses
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Example
Path
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/team |
Request
...
Table of Contents | ||||
---|---|---|---|---|
|
GET
Get teams list
Get list of all teams.
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/team |
Responses:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Expand | ||||
---|---|---|---|---|
| ||||
Path
Request
|
Get single team
Get information about existing team members.
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/team/{teamId} |
Responses:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Path params
Name | Type | Description |
---|---|---|
teamId | int | Team ID |
Expand | ||||
---|---|---|---|---|
| ||||
Path
Response
|
...
Expand | |
---|---|
|
Get
...
team members
Get information about existing team
...
.
Path
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/team/{teamId}/memberPermissions |
Responses:
Status | |||
---|---|---|---|
|
...
|
Status | |
---|---|
|
...
|
...
|
Status | |||
---|---|---|---|
|
...
Status | ||||
---|---|---|---|---|
|
|
Path params
Name | Type | Description |
---|---|---|
teamId | int | Team ID |
Status | colour | Green|||
---|---|---|---|---|
Expand | ||||
| 200
| |||
Path Status | | |||
|
Status | ||||
---|---|---|---|---|
|
Example
Path
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/team/1 |
Response
Code Block |
---|
Code Block |
GET {jira_baseurl}/rest/vacation-manager/1.0/team/1/member |
Response
Code Block |
---|
{ "id": 1, "name": "teamName", "description": "description", "user": { "users": [ { "id": 1, "userId": 10, "role": "USER", "teamId": 1 }, { "id": 2, "userId": 20, "role": "USER", "teamId": 1 }, { "id": 3, "userId": 30, "role": "USER", "teamId": 1 } ], "groups": [ { "id": 7, "groupName": "users", "role": "USER", "teamId": 1 } ] }, "supervisor": { "users": [ { "id": 4, "userId": 40, "role": "SUPERVISOR", "teamId": 1 }, { "id": 5, "userId": 50, "role": "SUPERVISOR", "id": 1,teamId": 1 }, { "nameid": "user 1",6, "displayName": "User 1", "activeuserId": true60, }, { "idrole": 2"SUPERVISOR", "name": "user 2", "displayName": "User 2",teamId": 1 } ], "activegroups": true[ { }, { "id": 38, "name": "user 3", "displayNamegroupName": "User 3supervisors", "active": true } ], "supervisorsrole": [ "SUPERVISOR", { "id": 4, "nameteamId": "supervisor 1",1 "displayName": "Supervisor 1", } ] "active": true } ] } |
...
POST
...
Expand | ||
---|---|---|
| ||
Creates new team. Path
|
...
POST
Create team
Creates new team.
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
POST {jira_baseurl}/rest/vacation-manager/1.0/team Permissions |
Responses:
Status | |||
---|---|---|---|
|
...
|
Status | |
---|---|
|
...
|
...
|
Status | |||
---|---|---|---|
|
...
Status | ||||
---|---|---|---|---|
|
|
JSON body fields
Name | Type | Description |
---|---|---|
name | String | Team name, must be unique |
...
description
...
String (Optional)
...
Team description
Responses
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
for each team | ||
description | String (Optional) | Team description |
Expand | ||||||
---|---|---|---|---|---|---|
| ||||||
Path
Body
Response
|
...
Expand | ||
---|---|---|
| ||
Add member to team. Path
|
Add member to team
Add member to team.
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
POST {jira_baseurl}/rest/vacation-manager/1.0/team/{teamId}/member Permissions |
Responses:
Status | |||
---|---|---|---|
|
...
|
Status | |
---|---|
|
...
|
...
|
Status | |
---|---|
|
...
|
...
|
Status | |
---|---|
|
...
|
...
|
Path params
Name | Type | Description |
---|---|---|
teamId | int | Team id |
JSON body fields
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 |
---|---|---|
USER | Enum |
...
User type
...
GROUP
...
Enum
...
Group type
MemberRole
...
Name
...
Type
...
Description
...
USER
...
Enum
...
User role for member
...
SUPERVISOR
...
Enum
...
Supervisor role for member
Responses
Status | ||||
---|---|---|---|---|
|
...
Status | ||||
---|---|---|---|---|
|
...
Status | ||||
---|---|---|---|---|
|
...
User type | ||
GROUP | Enum | Group type |
MemberRole
Name | Type | Description |
---|---|---|
USER | Enum | User role for member |
SUPERVISOR | Enum | Supervisor role for member |
Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
Path
Add user to teamBody
Response
Add group to teamBody
Response
|
...
PATCH
...
title | Update team |
---|
Update existing team.
...
|
...
PATCH
Update team
Update existing team.
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
PATCH {jira_baseurl}/rest/vacation-manager/1.0/team/{teamId} Permissions |
Responses:
Status | |||
---|---|---|---|
|
...
|
Status | |
---|---|
|
...
|
...
|
Status | |
---|---|
|
...
|
...
|
Status | |
---|---|
|
...
|
...
|
Path params
Name | Type | Description |
---|---|---|
teamId | int | Team ID |
JSON body fields
Name | Type | Description |
---|---|---|
name | String | Team name, must be unique |
description | String (Optional) | Team description |
...
allowUsersViewStatistics |
...
bool |
...
colour | Green |
---|---|
title | 200 |
...
Status | ||||
---|---|---|---|---|
|
...
Status | ||||
---|---|---|---|---|
|
...
(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. |
Expand | ||||||
---|---|---|---|---|---|---|
| ||||||
Path
Body
Request
|
...
DELETE
...
title | Delete team |
---|
Delete existing team.
...
|
...
DELETE
Delete team
Delete existing team.
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
DELETE {jira_baseurl}/rest/vacation-manager/1.0/team/{teamId} Permissions |
Responses:
Status | ||
---|---|---|
|
...
|
...
|
Status | |
---|---|
|
...
|
...
|
Status | |
---|---|
|
...
|
...
|
Path params
Name | Type | Description |
---|---|---|
teamId | int | Team ID |
Expand | ||
---|---|---|
| ||
Request
|
Remove member from team
Remove member from team.
Permissions:
Status | |||
---|---|---|---|
|
...
|
Status | |
---|---|
|
...
|
...
|
Status | |||
---|---|---|---|
|
...
|
...
...
title | Remove member from team |
---|
Remove member from team.
...
Status |
---|
Code Block |
---|
DELETE {jira_baseurl}/rest/vacation-manager/1.0/team/1 |
...
|
Code Block |
---|
DELETE {jira_baseurl}/rest/vacation-manager/1.0/team/{teamId}/member Permissions |
Responses:
Status | |||
---|---|---|---|
|
...
|
Status | |
---|---|
|
...
|
...
|
Status | |||
---|---|---|---|
|
...
Status | ||||
---|---|---|---|---|
|
|
Path params
Name | Type | Description |
---|---|---|
teamId | int | Team ID |
JSON body fields
Name | Type | Description |
---|---|---|
type | String | Type of member to remove
|
name | String | Name of the member you want to remove from the team |
role | String | Role for member to remove
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
title | Example |
---|
Path
Code Block |
---|
DELETE {jira_baseurl}/rest/vacation-manager/1.0/team/1/member |
Body
Code Block |
---|
{ "type":"GROUP", "name":"users", "role":"USER" } |