Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleGetting all your own One-Time Rule (GET)

Method

Status
colourBlue
titleGET

URL

/rest/ooo/1.0/onetimerule

Data

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

Example

Code Block
[
    {
        "projectIdString": "10001",
        "covererId": "",
        "covererAvatar": "",
        "covererDisplayName": "",
        "projectInfo": "Akeles [AKELES]",
        "reassignMode": "unassign",
        "startDateString": "2018-10-11 00:00",
        "endDateString": "2018-10-18 23:59",
        "oneTimeId": 5,
        "byAdmin": false,
        "byTeam": false,
        "creatorAvatar": "http://192.168.9.150:8080/secure/useravatar?size=xsmall&avatarId=10337",
        "creatorDisplayName": "John",
        "assigneeId": "",
        "assigneeAvatar": "",
        "assigneeDisplayName": ""
    }
]

Remarks

Info

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

Expand
titleCreate a new One-Time Rule (POST)

Method

Status
colourGreen
titlePOST

URL

/rest/ooo/1.0/onetimerule

Parameters

Required the following field

Code Block
{
    "assigneeId": "1000222",
    "projectIdString": "2",
    "reassignMode": "unassign",
    "covererId": "",
    "startDateString": "2018-09-14 12:00",
    "endDateString": "2018-09-20 12:00"
}

Response

Status
colourGreen
titleSTATUS 200
(tick)

  • Successful creation of new one time rule

Status
colourRed
titleSTATUS 401
(error)

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

Status
colourRed
titleSTATUS 406
 (error)

  • NOT_ACCEPTABLE - Error when validating data or invalid user

Remarks

Will perform validateUser() and validateOneTimeRule()

User - Check if user is admin if byAdmin is set to true
OneTimeRule - Check for data format and mandatory data required

Expand
titleEdit an existing One-Time Rule (PUT)

Method

Status
colourGreen
titlePUT

URL

/rest/ooo/1.0/onetimerule

Parameters

Required the following field

Code Block
{
    "oneTimeId": "2",
    "assigneeId": "1000222",
    "projectIdString": "2",
    "reassignMode": "coverer",
    "covererId": "1000232",
    "startDateString": "2018-09-14 12:00",
    "endDateString": "2018-09-20 12:00"
}

Response

Status
colourGreen
titleSTATUS 200
(tick)

  • Successful editing of existing one time rule

Status
colourRed
titleSTATUS 401
(error)

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

Status
colourRed
titleSTATUS 406
 (error)

  • NOT_ACCEPTABLE - Error when validating data or invalid user

Remarks

Will perform validateUser() and validateOneTimeRule()

User - Check if user is admin if byAdmin is set to true
OneTimeRule - Check for data format and mandatory data required

Expand
titleDelete an existing One-Time Rule (DELETE)

Method

Status
colourYellow
titleDELETE

URL

/rest/ooo/1.0/onetimerule

Parameters

Required the following field

Code Block
{
    "oneTimeId": "2"
}

Response

Status
colourGreen
titleSTATUS 200
(tick)

  • Successful deleting of existing one time rule

Status
colourRed
titleSTATUS 401
(error)

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

Status
colourRed
titleSTATUS 406
 (error)

  • NOT_ACCEPTABLE - Error when validating data or invalid user

Remarks

Will perform validateUser() and validateOneTimeRule()

User - Check if user is admin if byAdmin is set to true
OneTimeRule - Check for data format and mandatory data required

Expand
titleGet all Rule configured by adminstrator

Method

Status
colourBlue
titleGET

URL

/rest/ooo/1.0/onetimerule/admin

Data

Code Block
[
  {
    "projectIdString": "2",
    "covererId": "1000232",
    "covererAvatar": "",
    "covererDisplayName": "ABCDE",
    "projectInfo": "All other projects",
    "reassignMode": "coverer",
    "oneTimeMessage": "abcde is OOO",
    "startDateString": "2018-09-14 12:00",
    "endDateString": "2018-09-20 12:00"
    "oneTimeId": 2,
    "byAdmin": true,
    "byTeam": false,
    "creatorAvatar": "",
    "creatorDisplayName": "Administrator",
    "assigneeId": "1000222",
    "assigneeAvatar": "",
    "assigneeDisplayName": "FGHIJ",
    "sdInternalComment": false,
    "doNotRespondToPublic": false
  }
]

Remarks

Return an array of OneTimeRule

See above inner class section on data transaction

Info

Same as getting all of your own one time rule just that this is all rules created by admin.