Skip to main content
Skip table of contents

Update Delegation

PUT /rest/delegation/1.0/api/<delegationId>

Updates an existing delegation record using the data provided in the request body.

Request

XML
<jira_url>/rest/delegation/1.0/api/delegation/<delegationId>

The request takes all parameters from the request body.

The request expects a body (payload) in the json format shown below

CODE
{
    "active": true,
    "delegator": "user1",
    "delegates": [
        "user2"
    ],
    "categoryIds": [
        2
    ],
    "startDate": "2024-12-18T21:00+03:00",
    "endDate": "2024-12-25T21:00+03:00",
    "notes": "Delegation set for holiday coverage"
}


Parameters

Expand parameters...

Parameter

Description

LocationRequired

Value Samples

delegationIdThe ID of the existing delegation record that you want to update.REST URLYes1
activeIndicates whether the delegation record is currently active.Request BodyYes
  • true
  • false
delegator

The Jira username of the user whose delegates are being configured.

The authenticated user must have View & Edit All Delegations permission to create a delegation for other users.

See DEL v1.5 - Permissions

Request BodyYesuser1
delegatesA list of Jira usernames that are delegated to.Request BodyYes["user1", "user2"]
categoryIds

A list of category IDs assigned to the delegation configuration.

If not specified the general category will be used.

Id of all categories can be retrieved using Get Categories endpoint.

Request BodyNo[1, 2]
startDateThe start date/time for the delegation in ISO 8601 format with timezone offset.Request BodyYes2024-12-18T21:00+03:00
endDateThe end date/time for the delegation in ISO 8601 format with timezone offset.Request BodyYes2024-12-25T21:00+03:00
notesAdditional notes related to the delegation.Request BodyNoDelegation set for holiday coverage

Examples

Expand examples...
JS
https://192.168.0.1/rest/delegation/api/1.0/delegation/1
{
    "active": true,
    "delegator": "user1",
    "delegates": [
		"user2"
	],
    "categoryIds": [
		2
	],
    "startDate": "2024-12-18T21:00+03:00",
    "endDate": "2024-12-25T21:00+03:00",
    "notes": "Delegation set for holiday coverage"
}

https://192.168.0.1/rest/delegation/api/1.0/delegation/1
{
    "active": false,
    "delegator": "admin",
    "delegates": [
        "user"
    ],
    "startDate": "2024-12-18T21:00Z",
    "endDate": "2024-12-25T21:00Z"
}

Responses

Expand responses...
200 - Success

Success

HTTP 200

Returns the updated delegation record as JSON.

JS
{
    "delegationId": 110,
    "version": 2,
    "active": true,
    "delegator": "user1",
    "delegates": [
        "user2"
    ],
    "categoryIds": [],
    "startDate": "2024-12-18T21:00+03:00",
    "endDate": "2024-12-25T21:00+03:00",
    "notes": "Delegation set for holiday coverage"
}
400 - Invalid parameter

Invalid Parameter

HTTP 400

When one of the required parameters is missing or one of the supplied parameter values is invalid.

JS
{
    "status": 400,
    "message": "Delegator is required.",
    "timestamp": "2024-12-20 07:43:40 +0000",
    "errors": {
        "delegator": "Delegator is required."
    }
}
JS
{
    "status": 400,
    "message": "Notes cannot exceed 2000 characters.",
    "timestamp": "2024-12-20 08:36:42 +0000",
    "errors": {
        "notes": "Notes cannot exceed 2000 characters."
    }
}
403 - Missing Permission

Missing Permission

HTTP 403

When the authenticated user does not have the necessary permissions.

JS
{
    "status": 403,
    "message": "You do not have permission to modify delegations.",
    "timestamp": "2024-12-20 07:44:05 +0000"
}
404 - Not found

Not Found

HTTP 404

When one of the supplied parameter values is not found.

JS
{
    "status": 404,
    "message": "Category with id \"123\" could not be found.",
    "timestamp": "2024-12-20 08:15:44 +0000"
}
JS
{
    "status": 404,
    "message": "Delegation with id \"123\" could not be found.",
    "timestamp": "2024-12-20 08:40:34 +0000"
}



JavaScript errors detected

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

If this problem persists, please contact our support.