Out of Office Assistant
Breadcrumbs

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

standInId

 

The stand-in’s username if standInAction is set to “replace” or “add”

String

standInAvatar

 

The small avatar img of the stand-in which is used to populate in one time rule table

String

standInDisplayName

 

The stand-in’s full name which is used to populate in one time rule table

String

standInAction

 

Either

  • “replace”, which replaces the OOO user with their stand-in as an approver in the issue

  • “add”, which adds the stand-in as an approver to the issue

  • “nothing”, which does not make any changes to the approvers field

If “replace” or “add” is given, a standInId must be given as well.

String

projectAvatar

 

The small avatar img of the project the rule applies to, or blank if the rule applies to all other projects

String

projectName

 

The name of the project the rule applies to, or “All other projects”

String

projectKey

 

The key of the project the rule applies to, or blank if the rule applies to all other projects

String

reassignMode


Can use "coverer", for re-assigning issue

Can use "unassign", for unassigning issue ( https://akeles.jira.com/wiki/s/-505230918/6452/267b0663176c4f8787189805bf0a33b7c6d3998e/_/images/icons/emoticons/information.png 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

[
    {
        "projectIdString": "10001",
        "covererId": "",
        "covererAvatar": "",
        "covererDisplayName": "",
        "standInId": """,
        "standInAvatar": "",
        "standInDisplayName": "",
        "standInAction": "nothing",
        "projectAvatar": "http://128.1.8.103:8080/secure/projectavatar?size=xsmall&pid=10401&avatarId=11506"
        "projectKey": "AKELES"
        "projectName": "Akeles"
        "reassignMode": "unassign",
        "recurMessage": "out of office",
        "recurId": 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

{
    "recurId": "0",
    "assigneeId": "10002",
    "projectIdString": "10002",
    "reassignMode": "coverer",
    "covererId": "20001",
    "standInAction": "nothing",
    "standInId": "",
    "recurMessage": "I am OOO today."
}

Response

STATUS 200 https://akeles.jira.com/wiki/s/-505230918/6452/267b0663176c4f8787189805bf0a33b7c6d3998e/_/images/icons/emoticons/check.png

  • Successful editing of new one time rule

STATUS 401 https://akeles.jira.com/wiki/s/-505230918/6452/267b0663176c4f8787189805bf0a33b7c6d3998e/_/images/icons/emoticons/error.png

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

STATUS 406   https://akeles.jira.com/wiki/s/-505230918/6452/267b0663176c4f8787189805bf0a33b7c6d3998e/_/images/icons/emoticons/error.png

  • 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

{
    "recurId": "2"
}

Response

STATUS 200 https://akeles.jira.com/wiki/s/-505230918/6452/267b0663176c4f8787189805bf0a33b7c6d3998e/_/images/icons/emoticons/check.png

  • Successful deleting of existing one time rule

STATUS 401 https://akeles.jira.com/wiki/s/-505230918/6452/267b0663176c4f8787189805bf0a33b7c6d3998e/_/images/icons/emoticons/error.png

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

STATUS 406   https://akeles.jira.com/wiki/s/-505230918/6452/267b0663176c4f8787189805bf0a33b7c6d3998e/_/images/icons/emoticons/error.png

  • 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

{
    "recurRuleId": "2",
    "assigneeId": "20202",
    "projectIdString": "20",
    "reassignMode": "unassign",
    "covererId": "",
    "standInId": "",
    "standInAction": "nothing"
}

Response

STATUS 200 https://akeles.jira.com/wiki/s/-505230918/6452/267b0663176c4f8787189805bf0a33b7c6d3998e/_/images/icons/emoticons/check.png

  • Successful editing of existing one time rule

STATUS 401 https://akeles.jira.com/wiki/s/-505230918/6452/267b0663176c4f8787189805bf0a33b7c6d3998e/_/images/icons/emoticons/error.png

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

STATUS 406   https://akeles.jira.com/wiki/s/-505230918/6452/267b0663176c4f8787189805bf0a33b7c6d3998e/_/images/icons/emoticons/error.png

  • NOT_ACCEPTABLE - Error when validating data or invalid user

Remarks

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