Delta Guard: API
Delta Guard API allows administrators to protect Jira custom fields by controlling visibility and edit permissions. It also manages how existing field history is handled when moving between protected and unprotected states.
Endpoints v2
Base URL:<jiraBaseUrl>/rest/dsr-custom-field-protector/2
1. Protect a Custom Field
POST /cf-migration/{fieldId}/protect
Transform a custom field into its protected form. You can choose how to handle its history and configure permissions per context.
Path Parameters
Name | Description | Example |
|---|---|---|
fieldId | Custom field ID to protect |
|
Request Body
Field | Description | Allowed Values |
|---|---|---|
historyAction | How to handle existing public history |
|
contexts | List of field config/context IDs | Array of IDs |
permissionData | List of permission definitions (see CFPermissionGrant) | JSON array |
Responses
200– Custom field successfully protected400– Invalid request (badhistoryAction, invalid context, already protected)403– User is not an administrator404– Field not found
Example
POST: http://localhost:8080/rest/dsr-custom-field-protector/2/cf-migration/10601/protect
Body:
{
"historyAction": "LEAVE",
"contexts": ["10703"],
"permissionData": [
{
"subject": {
"type": "any",
"key": "any"
},
"access": "VIEW",
"type": "ALLOW"
}]
}Unprotect a Custom Field
POST /cf-migration/{fieldId}/unprotect
Convert a protected field back to its unprotected version.
Path Parameters
Name | Description | Example |
|---|---|---|
fieldId | Custom field ID to unprotect |
|
Query Parameters
Name | Description | Allowed Values |
|---|---|---|
historyAction | How to handle protected history |
|
Responses
200– Field successfully unprotected400– Invalid request (badhistoryAction, already unprotected)403– User is not an administrator404– Field not found
Example
POST http://localhost:8080/rest/dsr-custom-field-protector/2/cf-migration/10404/unprotect?historyAction=CONVERTEndpoints v1
Base URL:<jiraBaseUrl>/rest/dsr-custom-field-protector/1
1. Protect a Custom Field
POST /cf-migration/{str_fieldId}/protect
Transform a custom field into its protected form. You can choose how to handle its history and configure permissions per context.
Path Parameters
Name | Description | Example |
|---|---|---|
str_fieldId | Custom field ID to protect |
|
Request Body
Field | Description | Allowed Values |
|---|---|---|
historyAction | How to handle existing public history |
|
contexts | List of field config/context IDs | Array of IDs |
permissionData | List of permission definitions (see CFPermissionGrant) | JSON array |
Responses
200– Custom field successfully protected400– Invalid request (badhistoryAction, invalid context, already protected)403– User is not an administrator404– Field not found
Example
POST: http://localhost:8080/rest/dsr-custom-field-protector/1/cf-migration/customfield_10601/protect
Body:
{
"historyAction": "LEAVE",
"contexts": ["10703"],
"permissionData": [
{
"subject": {
"type": "any",
"key": "any"
},
"access": "VIEW",
"type": "ALLOW"
}]
}2. Unprotect a Custom Field
POST /cf-migration/{str_fieldId}/unprotect
Convert a protected field back to its unprotected version.
Path Parameters
Name | Description | Example |
|---|---|---|
str_fieldId | Custom field ID to unprotect |
|
Query Parameters
Name | Description | Allowed Values |
|---|---|---|
historyAction | How to handle protected history |
|
Responses
200– Field successfully unprotected400– Invalid request (badhistoryAction, already unprotected)403– User is not an administrator404– Field not found
Example
POST http://localhost:8080/rest/dsr-custom-field-protector/1/cf-migration/customfield_10404/unprotect?historyAction=CONVERT3. Apply Permissions to a Field Context
POST /permissions/{fieldId}/{configId}
Replace existing permissions for a field context.
Path Parameters
Name | Description | Example |
|---|---|---|
fieldId | Custom field ID |
|
configId | Field context ID |
|
Request Body
List of CFPermissionGrant objects in JSON format.
Responses
200– Permissions applied successfully (returns applied permissions list)400– Invalid request403– User is not an administrator404– Field or context not found
Example
POST http://localhost:8080/rest/dsr-custom-field-protector/1/permissions/10200/10300
Body:
[
{
"subject": {
"type": "group",
"key": "jira-administrators"
},
"access": "VIEW",
"type": "ALLOW"
},
{
"subject": {
"type": "group",
"key": "jira-administrators"
},
"access": "EDIT",
"type": "ALLOW"
}
]
4. Get Permissions for a Field Context
GET /permissions/{fieldId}/{configId}
Retrieve permissions for a specific field context.
Path Parameters
Name | Description | Example |
|---|---|---|
fieldId | Custom field ID |
|
configId | Field context ID |
|
Responses
200– Returns list of applied CFPermissionGrant400– Invalid request404– Field or context not found
Example
GET http://localhost:8080/rest/dsr-custom-field-protector/1/permissions/10200/103005. Get Permissions for a Field (All Contexts)
GET /permissions/{fieldId}
Retrieve all permissions across contexts for a protected custom field.
Path Parameters
Name | Description | Example |
|---|---|---|
fieldId | Custom field ID |
|
Responses
200– Returns JSON object with contexts and applied permissions403– User is not an administrator404– Field or context not found
Example
GET http://localhost:8080/rest/dsr-custom-field-protector/1/permissions/10200
Response:
{
"10201": [
{
/* CFPermissionGrant */
},
{
/* CFPermissionGrant */
}
],
"10202": [
{
/* CFPermissionGrant */
}
]
}Entities
Field Config vs Context
FieldConfig: Jira’s internal term
Context: The label displayed in the Jira admin UI
You can find field contexts in:Administration → Issues → Custom Fields → Actions → Configure
CFPermissionGrant
Represents a permission granted to a subject for accessing a protected custom field.
Each grant defines whether the subject is allowed or denied specific access.
Field | Description | Allowed Values | |
|---|---|---|---|
access | Type of access |
| |
type | Permission action |
| |
subject | The target entity to which the permission is applied. | Subject Type | Key |
|
| ||
| User key ( | ||
| Group name ( | ||
| Field ID ( | ||
| Field ID ( | ||
| Role ID ( | ||
Example Permission List
[
{
"subject": {
"type": "any",
"key": "any"
},
"access": "VIEW",
"type": "ALLOW"
},
{
"subject": {
"type": "user",
"key": "JIRAUSER10000"
},
"access": "VIEW",
"type": "DENY"
},
{
"subject": {
"type": "group",
"key": "jira-administrators"
},
"access": "VIEW",
"type": "DENY"
},
{
"subject": {
"type": "user_field",
"key": "assignee"
},
"access": "EDIT",
"type": "ALLOW"
},
{
"subject": {
"type": "group_field",
"key": "customfield_11402"
},
"access": "EDIT",
"type": "ALLOW"
},
{
"subject": {
"type": "project_role",
"key": "10100"
},
"access": "EDIT",
"type": "ALLOW"
}
]