Skip to main content
Skip table of contents

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

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 ((info) 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

Retrieve all your own Out Of Office recur rule (GET)

Method

GET

URL

/rest/ooo/1.0/recurrule

Response

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

CODE
[
    {
        "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

Add a new Out Of Office recur rule for yourself (POST)

Method

POST

URL

/rest/ooo/1.0/recurrule

Parameters

Required the following field

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

Response

STATUS 200 (tick)

  • Successful editing of new one time rule

STATUS 401 (error)

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

STATUS 406  (error)

  • NOT_ACCEPTABLE - Error when validating data or invalid user

Remarks

Delete an existing Out Of Office recur rule (DELETE)

Method

DELETE

URL

/rest/ooo/1.0/recurrule

Parameters

Required the following field

CODE
{
    "recurRuleId": "2"
}

Response

STATUS 200 (tick)

  • Successful deleting of existing one time rule

STATUS 401 (error)

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

STATUS 406  (error)

  • NOT_ACCEPTABLE - Error when validating data or invalid user

Remarks

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

Update an existing Out Of Office recur rule (PUT)

Method

PUT

URL

/rest/ooo/1.0/recurrule

Parameters

Required the following field

CODE
{
    "recurRuleId": "2",
    "assigneeId": "20202",
    "projectIdString": "20",
    "reassignMode": "unassign",
    "covererId":""
}

Response

STATUS 200 (tick)

  • Successful editing of existing one time rule

STATUS 401 (error)

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

STATUS 406  (error)

  • NOT_ACCEPTABLE - Error when validating data or invalid user

Remarks

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

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.