Document toolboxDocument toolbox

REST API - Configuring OOO Period

Introduction

It is possible to configure the OOO period for the users via REST API

Configuring OOO period.png

List of Attributes

Data Type

Attribute Name

Default Value

Remarks

Data Type

Attribute Name

Default Value

Remarks

String

periodMessage

 

Message to be added into comment should the user is OOO

This message will be pre-pend infront of the one-time message as comment

String

startDateString

 

String of the out of office start date, date format ("yyyy-MM-dd HH:mm")

String

endDateString

 

String of the out of office end date,  date format ("yyyy-MM-dd HH:mm")

int

periodId

0

The id of the period for update and delete of period

REST APIs

Method

GET

URL

/rest/ooo/1.0/period

Response

Return an array of Period object
See above inner class section on data transaction

[ { "periodMessage": "Out of Office", "startDateString": "2018-09-14 12:00", "endDateString": "2018-09-20 12:00" } ]

Remarks

Does not allow you to search based on assigneeId. It will return all the period configured for the current logged in user

 

Method

POST

URL

/rest/ooo/1.0/period

Parameters

Required the following field

{ "periodMessage": "I am out of office", "startDateString": "2018-09-14 12:00", "endDateString": "2018-09-20 12:00" }

Response

STATUS 200

  • Successful creation of new one time rule

STATUS 401

  • UNAUTHORIZED - Not logged in or do not have administrator access

STATUS 406  

  • NOT_ACCEPTABLE - Error when validating data or invalid user

Remarks

 

 

Method

DELETE

URL

/rest/ooo/1.0/period

Parameters

Required the following field

{ "periodId": "2" }

Response

STATUS 200

  • Successful deleting of existing one time rule

STATUS 401

  • UNAUTHORIZED - Not logged in or do not have administrator access

STATUS 406  

  • NOT_ACCEPTABLE - Error when validating data or invalid user

Remarks

Will perform validateUser() to check if the period belongs to user

 

Method

PUT

URL

/rest/ooo/1.0/period

Parameters

Required the following field

Response

STATUS 200

  • Successful editing of existing one time rule

STATUS 401

  • UNAUTHORIZED - Not logged in or do not have administrator access

STATUS 406  

  • NOT_ACCEPTABLE - Error when validating data or invalid user

Remarks

Will perform validateUser() to check if the period belongs to user