Keychain - Delegation for Jira Data Center
Breadcrumbs

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

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

Location

Required

Value Samples

delegationId

The ID of the existing delegation record that you want to update.

REST URL

Yes

1

active

Indicates whether the delegation record is currently active.

Request Body

Yes

  • 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 Body

Yes

user1

delegates

A list of Jira usernames that are delegated to.

Request Body

Yes

["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 Body

No

[1, 2]

startDate

The start date/time for the delegation in ISO 8601 format with timezone offset.

Request Body

Yes

2024-12-18T21:00+03:00

endDate

The end date/time for the delegation in ISO 8601 format with timezone offset.

Request Body

Yes

2024-12-25T21:00+03:00

notes

Additional notes related to the delegation.

Request Body

No

Delegation set for holiday coverage


Examples

Expand examples...


JavaScript
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...


https://obssapps.atlassian.net/wiki/images/icons/grey_arrow_down.png 200 - Success

Success

HTTP 200

Returns the updated delegation record as JSON.

{ "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" }

https://obssapps.atlassian.net/wiki/images/icons/grey_arrow_down.png 400 - Invalid parameter

Invalid Parameter

HTTP 400

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

{ "status": 400, "message": "Delegator is required.", "timestamp": "2024-12-20 07:43:40 +0000", "errors": { "delegator": "Delegator is required." } }

{ "status": 400, "message": "Notes cannot exceed 2000 characters.", "timestamp": "2024-12-20 08:36:42 +0000", "errors": { "notes": "Notes cannot exceed 2000 characters." } }

https://obssapps.atlassian.net/wiki/images/icons/grey_arrow_down.png 403 - Missing Permission

Missing Permission

HTTP 403

When the authenticated user does not have the necessary permissions.

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

https://obssapps.atlassian.net/wiki/images/icons/grey_arrow_down.png 404 - Not found

Not Found

HTTP 404

When one of the supplied parameter values is not found.

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

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