Endpoints:
Code Block |
---|
GET /rest/secure-fields/1.0/history?issueKey={issueKey} GET /rest/secure-fields/1.0/history?issueKey={issueKey}&secureFieldId=customfield_{secureFieldId} |
where issueKey is the key of the issue and secureFieldId is the id of Secure Field.
The first endpoint returns the whole history of the Secure Fields for the given issue and the seconde second one returns only history for a specific Secure Field.
Response Structure:
Code Block |
---|
[ { "created":number, "author":textnumber, "authorFullName":text, "issueId":numernumber, "secureFieldChangeItems":[ { "oldValue":text, "newValue":text, "secureFieldId":number, "secureFieldName":text } ] } ] |
created | Secure Field edition creation date |
author | author’s username of changekey |
authorFullName | author’s full name of change |
issueId | issue id of issue |
oldValue | previous value in of Secure Field |
newValue | new value in of Secure Field |
secureFieldId | id of Secure Field id |
secureFieldName | Secure Field labelname |
If successful, the response status isOK HTTP 200.
If no Issue corresponding to provided issueKey was found, the endpoint returnsBAD REQUEST 400 with message Issue for key {id} not found.
If no Custom Field corresponding to provided secureFieldId was found, the endpoint returnsBAD REQUEST 400 with message Custom field for id {id} not found.
Ifthetype of Custom Fieldcorresponding to provided secureFieldId was not Secure Field, the endpoint returnsBAD REQUEST 400 with the message The given custom field is not a Secure Field.
If a user has no permission for this Secure field, the endpoint returs returns FORBIDDEN 403 with the message User {user} has no permission to view history in field {id}.
Example of Secure Field History data returned from REST API:
Code Block |
---|
[
{
"created":1617950735988,
"author":" |
JIRAUSER10000", "authorFullName":"admin.admin", "issueId":10100, "secureFieldChangeItems":[ { "oldValue":"2, 3", "newValue":"2, 3, 5", "secureFieldId":10100, "secureFieldName":"Secure List" } ] }, { "created":1617950755314, "author":" |
JIRAUSER10010", "authorFullName":"John Smith", "issueId":10100, "secureFieldChangeItems":[ { "oldValue":"old Test", "newValue":"new Test", "secureFieldId":10001, "secureFieldName":"Secure Text" } ] } ] |