Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 17 Current »



GET /com.easesolutions.jira.plugins.absent/1.0/absent/outofoffices


Retrieve absences. Either all, for users of a project or a specific user




PARAMETERS

page*

projectKey

userKey

filter

The page of absences you want to retrieve. They are provided in chunks of 25.

The project key of a projec to only retrieve absences for this project's users

A user key of a user to only retrieve absences for this user

A string of a JSON object representing the filter. See below for more information

FILTER OBJECT

{
	"userKey": '',
    "startDate": 'YYYY-MM-DD',
    "endDate": 'YYYY-MM-DD',
	"substituteKey": ''
}




EXAMPLE RESPONSE

Status CodeResponse
200

The JSON body, see belows example response

400An error occured. You either gave an invalid project/user or don't have the neccesary permissions to view those absences. See the reponse body for additonial information


{
	"results": [
		{
			"id": 182,
			"userKey": "admin",
			"user": {
				"key": "admin",
				"url": "http://localhost:2990/jira/secure/ViewProfile.jspa?name=admin",
				"icon": "",
				"username": "admin",
				"displayname": "admin (abwesend bis 11/Okt/19)"
			},
			"startDate": 1570572000000,
			"startDateFormatted": "09/Oct/19",
			"endDate": 1570831199999,
			"endDateFormatted": "11/Oct/19",
			"comment": ""
		},
		{
			"id": 177,
			"userKey": "user1",
			"user": {
				"key": "user1",
				"url": "http://localhost:2990/jira/secure/ViewProfile.jspa?name=user1",
				"icon": "",
				"username": "user1",
				"displayname": "Max Mustermann"
			},
			"startDate": 1577055600000,
			"startDateFormatted": "23/Dez/19",
			"endDate": 1578005999999,
			"endDateFormatted": "02/Jan/20",
			"comment": "Test 1234",
			"substituteKey": "user2",
			"substitute": {
				"key": "user2",
				"url": "http://zink-ws:2990/jira/secure/ViewProfile.jspa?name=user2",
				"icon": "",
				"username": "user2",
				"displayname": "Frau B."
			}
		}
	],
	"currentPage": 1,
	"totalPages": 1
}


GET /com.easesolutions.jira.plugins.absent/1.0/absent/outofoffice/{id}


Retrieve an absence by its id



PARAMETERS

id*

projectKey

The id of the absence you want to retrieve

The project key of a project for permission checks




EXAMPLE RESPONSE

Status CodeResponse
200

The JSON body, see belows example response

400An error occured. You either gave an invalid project or don't have the neccesary permissions to view those absences. See the reponse body for additonial information
{
	"id": 182,
	"userKey": "admin",
	"user": {
		"key": "admin",
		"url": "http://localhost:2990/jira/secure/ViewProfile.jspa?name=admin",
		"icon": "",
		"username": "admin",
		"displayname": "admin (abwesend bis 11/Okt/19)"
	},
	"startDate": 1570572000000,
	"startDateFormatted": "09/Oct/19",
	"endDate": 1570831199999,
	"endDateFormatted": "11/Oct/19",
	"comment": ""
}


POST /com.easesolutions.jira.plugins.absent/1.0/absent/outofoffice


Create or update an absence




PARAMETERS

page*

projectKey

userKey

filter

The page of absences you want to retrieve. They are provided in chunks of 25.

The project key of a projec to only retrieve absences for this project's users

A user key of a user to only retrieve absences for this user

A string of a JSON object representing the filter. See below for more information

FILTER OBJECT

{
	"userKey": '',
    "startDate": 'YYYY-MM-DD',
    "endDate": 'YYYY-MM-DD',
	"substituteKey": ''
}




EXAMPLE RESPONSE

{
	"results": [
		{
			"id": 182,
			"userKey": "admin",
			"user": {
				"key": "admin",
				"url": "http://localhost:2990/jira/secure/ViewProfile.jspa?name=admin",
				"icon": "",
				"username": "admin",
				"displayname": "admin (abwesend bis 11/Okt/19)"
			},
			"startDate": 1570572000000,
			"startDateFormatted": "09/Oct/19",
			"endDate": 1570831199999,
			"endDateFormatted": "11/Oct/19",
			"comment": ""
		},
		{
			"id": 177,
			"userKey": "user1",
			"user": {
				"key": "user1",
				"url": "http://localhost:2990/jira/secure/ViewProfile.jspa?name=user1",
				"icon": "",
				"username": "user1",
				"displayname": "Max Mustermann"
			},
			"startDate": 1577055600000,
			"startDateFormatted": "23/Dez/19",
			"endDate": 1578005999999,
			"endDateFormatted": "02/Jan/20",
			"comment": "Test 1234",
			"substituteKey": "user2",
			"substitute": {
				"key": "user2",
				"url": "http://zink-ws:2990/jira/secure/ViewProfile.jspa?name=user2",
				"icon": "",
				"username": "user2",
				"displayname": "Frau B."
			}
		}
	],
	"currentPage": 1,
	"totalPages": 1
}

  • No labels