Overview
Vacation Manager's REST API provides team API which allows you to obtain:
Methods:
GET
...
GET
Get teams list
Get list of all teams
...
Path
...
.
...
Permissions:
...
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/team |
Responses:
...
Expand |
---|
|
Path Code Block |
---|
| | GET {jira_baseurl}/rest/vacation-manager/1.0/team
Request |
...
Expand |
---|
|
Get information about existing team members. Path Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/team/{teamId} | Permissions Code Block | title |
---|
| 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:
Path paramsName | Type | Description |
---|
teamId | int | Team ID |
Responses Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/team/{teamId} |
Responses:
...
Path params
Name | Type | Description |
---|
teamId | int | Team ID |
...
Expand |
---|
titlePath Code Block |
---|
title | Path |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/team/1 |
Response Code Block | title |
---|
| Response | {
"id": 1,
"name": "teamName",
"description": "description",
"users": [
{
"id": 1,
"name": "user 1",
"displayName": "User 1",
"active": true
},
{
"id": 2,
"name": "user 2",
"displayName": "User 2",
"active": true
},
{
"id": 3,
"name": "user 3",
"displayName": "User 3",
"active": true
}
],
"supervisors": [
{
"id": 4,
"name": "supervisor 1",
"displayName": "Supervisor 1",
"active": true
}
]
}
|
...
Get team members
Get information about existing
...
Path
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/team/{teamId}/member |
...
team.
Permissions:
Path paramsName | Type | Description |
---|
teamId | int | Team ID |
Responses Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/team/{teamId}/member |
Responses:
...
...
Path params
Name | Type | Description |
---|
teamId | int | Team ID |
Expand |
---|
|
Path Code Block |
---|
title | Path |
---|
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",
"teamId": 1
},
{
"id": 6,
"userId": 60,
"role": "SUPERVISOR",
"teamId": 1
}
],
"groups": [
{
"id": 8,
"groupName": "supervisors",
"role": "SUPERVISOR",
"teamId": 1
}
]
}
}
|
POST
...
Creates new team.
Path
Code Block |
---|
POST {jira_baseurl}/rest/vacation-manager/1.0/team |
...
POST
Create team
Creates new team.
Permissions:
JSON body fields
Name | Type | Description |
---|
name | String | Team name, must be unique for each team |
description | String (Optional) | Team description |
Responses Code Block |
---|
POST {jira_baseurl}/rest/vacation-manager/1.0/team |
Responses:
...
JSON body fields
Name | Type | Description |
---|
name | String | Team name, must be unique for each team |
description | String (Optional) | Team description |
...
Expand |
---|
titlePath Code Block |
---|
title | Path |
---|
POST {jira_baseurl}/rest/vacation-manager/1.0/team |
Body Code Block |
---|
title | Body |
---|
{
"name": "Team name",
"description": "Team Description"
} |
Response Code Block |
---|
title | Response |
---|
{
"id":
"name": "Team name",
"description": "Team Description"
} |
|
...
Add member to team
Add member to team.
...
Permissions:
Code Block |
---|
POST {jira_baseurl}/rest/vacation-manager/1.0/team/{teamId}/member Permissions |
Responses:
...
...
...
...
...
...
...
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 |
...
MemberType
...
Name
...
Type
...
Description
...
USER
...
Enum
...
User type
...
GROUP
...
Enum
...
Group type
MemberRole
...
Name
...
Type
...
Description
...
USER
...
Enum
...
...
SUPERVISOR
...
Enum
...
Supervisor role for member
Responses
...
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 |
...
|
---|
POST {jira_baseurl}/rest/vacation-manager/1.0/team/1/member |
Add user to teamBody |
...
...
{
"type":"USER",
"name":"user 1",
"role":"USER"
} |
|
...
...
...
Code Block |
---|
{
"id": 1,
"userId": 10000,
"role": "USER",
"teamId": 1
} |
Add group to teamBody |
...
|
---|
{
"type":"GROUP",
"name":"users",
"role":"USER"
} |
Response |
...
...
{
"id": 6,
"groupName": "users",
"role": "USER",
"teamId": 1
} |
|
...
PATCH
...
Update existing team.
Path
Update team
Update existing team.
Permissions:
Code Block |
---|
PATCH {jira_baseurl}/rest/vacation-manager/1.0/team/{teamId} Permissions |
Responses:
...
...
...
...
...
...
...
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 |
Responses
Example
...
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. |
Expand |
---|
|
Path Code Block |
---|
PATCH {jira_baseurl}/rest/vacation-manager/1.0/team/1 |
Body |
...
...
|
---|
{
"name": "new team name"
} |
Request Code Block |
---|
{
"id": 1,
"name": "new team name" |
|
...
...
...
...
...
allowUsersViewStatistics": |
|
...
...
...
DELETE
...
Delete existing team.
...
...
DELETE
Delete team
Delete existing team.
Permissions:
Code Block |
---|
DELETE {jira_baseurl}/rest/vacation-manager/1.0/team/{teamId} Permissions |
Responses:
...
...
...
...
...
Path params
Name | Type | Description |
---|
teamId | int | Team ID |
Expand |
---|
| Responses |
statusRequest |
|
Code Block |
---|
DELETE {jira_baseurl}/rest/vacation-manager/1.0/team/1 |
Remove member from team
Remove member from team.
Permissions:
...
...
...
...
...
...
...
...
DELETE {jira_baseurl}/rest/vacation-manager/1.0/team/1
...
title | Remove member from team |
---|
Remove member from team.
...
Code Block |
---|
DELETE {jira_baseurl}/rest/vacation-manager/1.0/team/{teamId}/member Permissions |
Responses:
...
...
...
...
...
...
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 |
Responses
Example
Expand |
---|
|
Code Block |
---|
|
Expand |
---|
|
Path Code Block |
---|
DELETE {jira_baseurl}/rest/vacation-manager/1.0/team/1/member |
Body Code Block |
---|
title | Body |
---|
{
"type":"GROUP",
"name":"users",
"role":"USER"
} |
|