Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Responses:

Status
colourGreen
title200
 
Status
colourRed
title500

Expand
titleExample

Path

Code Block
titlePath
GET {jira_baseurl}/rest/vacation-manager/1.0/team
Request
title
Code Block
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"
    }
]

...

Name

Type

Description

teamId

int

Team ID

Expand
titleExample
Path
Path
Code Block
title
GET {jira_baseurl}/rest/vacation-manager/1.0/team/1

Response

Code Block
titleResponse
{
  "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
    }
  ]
}

...

Name

Type

Description

teamId

int

Team ID

Expand
titleExample
Path
title
Code Block
Path
GET {jira_baseurl}/rest/vacation-manager/1.0/team/1/member
Response
Response
Code Block
title
{
    "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
            }
		]
    }
}

...

Name

Type

Description

name

String

Team name, must be unique for each team

description

String (Optional)

Team description

Expand
titleExample
Path
Code Block
POST {jira_baseurl}/rest/vacation-manager/1.0/team

Body

Code Block
{
    "name": "Team name",
    "description": "Team Description"
}

Response

Code Block
{
	"id": 
    "name": "Team name",
    "description": "Team Description"
}

...

Name

Type

Description

USER

Enum

User role for member

SUPERVISOR

Enum

Supervisor role for member

Expand
titleExample
Path
Code Block
POST {jira_baseurl}/rest/vacation-manager/1.0/team/1/member

Add user to team

Body
Code Block
{
	"type":"USER",
	"name":"user 1",
	"role":"USER"
}
Response
Code Block
{
    "id": 1,
    "userId": 10000,
    "role": "USER",
    "teamId": 1
}

Add group to team

Body
Code Block
{
	"type":"GROUP",
	"name":"users",
	"role":"USER"
}
Response
Code Block
{
    "id": 6,
    "groupName": "users",
    "role": "USER",
    "teamId": 1
}

...

Name

Type

Description

name

String

Team name, must be unique

description

String (Optional)

Team description

Expand
titleExample
Path
Code Block
PATCH {jira_baseurl}/rest/vacation-manager/1.0/team/1
Body
Code Block
{
    "name": "new team name"
}
Request
Code Block
{
    "id": 1,
    "name": "new team name",
    "description": "Team Description"
}

...

Name

Type

Description

teamId

int

Team ID

Expand
titleExample
Request
Code Block
DELETE {jira_baseurl}/rest/vacation-manager/1.0/team/1

...

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

Expand
titleExample
Path
Code Block
DELETE {jira_baseurl}/rest/vacation-manager/1.0/team/1/member
Body
Code Block
{
	"type":"GROUP",
	"name":"users",
	"role":"USER"
}