Document toolboxDocument toolbox

REST API - Configuring Recurring Rule

Introduction

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

Configuring Recurring Rule.png

 

List of Attributes

Data Type

Attribute Name

Default Value

Remarks

Data Type

Attribute Name

Default Value

Remarks

String

projectIdString

"-1"

"-1" will be all other project

If not, it will be the projectId of project

String

covererId

 

The coverer username if reassignMode is set to "coverer"

Set to "-" for do not re-assign issue

String

covererAvatar

 

The small avatar img of coverer which is used to populate in recur rule table

String

covererDisplayName

 

The coverer full name which is used to populate in recur rule table

String

projectInfo

 

The project name and key which are configured

String

reassignMode

 

Can use "coverer", for re-assigning issue

Can use "unassign", for unassigning issue ( the option is only available if JIRA allow unassign issue)

Can use "same", for do not re-assign issue

String

oneTimeMessage

 

Message to be added into comment should the user is OOO

This message will be appended into period's message as comment

int

oneTimeId

0

The id of the recur rule for update and delete rule

REST APIs

Method

GET

URL

/rest/ooo/1.0/recurrule

Response

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

[ { "projectIdString": "10001", "covererId": "", "covererAvatar": "", "covererDisplayName": "", "projectInfo": "Akeles [AKELES]", "reassignMode": "unassign", "oneTimeMessage": "out of office", "oneTimeId": 5 } ]

Remarks

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

 

Method

POST

URL

/rest/ooo/1.0/recurrule

Parameters

Required the following field

{ "recurRuleId": "1", "assigneeId": "10002", "projectIdString": "2", "reassignMode": "coverer", "covererId": "20001" }

Response

STATUS 200

  • Successful editing 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/recurrule

Parameters

Required the following field

{ "recurRuleId": "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/recurrule

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