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