POST /rest/delegation/1.0/api/delegation
Creates a new delegation record using the data provided in the request body.
Request
<jira_url>/rest/delegation/1.0/api/delegation
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 |
---|
active | Indicates whether the delegation configuration is currently active. | Request Body | Yes | |
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 DEL v1.5 - 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 configuration. | Request Body | No | Delegation set for holiday coverage |
Examples
Expand examples...
https://192.168.0.1/rest/delegation/api/1.0/delegation
{
"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
{
"active": false,
"delegator": "admin",
"delegates": [
"user"
],
"startDate": "2024-12-18T21:00Z",
"endDate": "2024-12-25T21:00Z"
}
Responses
Expand responses...
Success
HTTP 200
Returns the new delegation record as JSON.
{
"delegationId": 110,
"version": 1,
"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"
}
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."
}
}
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"
}
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"
}