Returns a paginated list of all updates of an issue, sorted by date, starting from the oldest. This example gets the change log for the issue with key = "SCRUM-15".
curl --user jira@example.com:JIRA_API_TOKEN \
--header 'Accept: application/json' \
--url 'https://your-domain.atlassian.net/rest/api/2/issue/SCRUM-15/changelog'
var
rest: HCkRest;
success: Boolean;
bTls: Boolean;
port: Integer;
bAutoReconnect: Boolean;
sbResponseBody: HCkStringBuilder;
respStatusCode: Integer;
jsonResponse: HCkJsonObject;
self: PWideChar;
maxResults: Integer;
startAt: Integer;
total: Integer;
isLast: Boolean;
i: Integer;
count_i: Integer;
id: PWideChar;
authorSelf: PWideChar;
authorName: PWideChar;
authorKey: PWideChar;
authorAccountId: PWideChar;
authorEmailAddress: PWideChar;
authorAvatarUrls48x48: PWideChar;
authorAvatarUrls24x24: PWideChar;
authorAvatarUrls16x16: PWideChar;
authorAvatarUrls32x32: PWideChar;
authorDisplayName: PWideChar;
authorActive: Boolean;
authorTimeZone: PWideChar;
created: PWideChar;
historyMetadataType: PWideChar;
historyMetadataDescription: PWideChar;
historyMetadataDescriptionKey: PWideChar;
historyMetadataActivityDescription: PWideChar;
historyMetadataActivityDescriptionKey: PWideChar;
historyMetadataActorId: PWideChar;
historyMetadataActorDisplayName: PWideChar;
historyMetadataActorType: PWideChar;
historyMetadataActorAvatarUrl: PWideChar;
historyMetadataActorUrl: PWideChar;
historyMetadataGeneratorId: PWideChar;
historyMetadataGeneratorType: PWideChar;
historyMetadataCauseId: PWideChar;
historyMetadataCauseType: PWideChar;
historyMetadataExtraDataKeyvalue: PWideChar;
historyMetadataExtraDataGoes: PWideChar;
j: Integer;
count_j: Integer;
field: PWideChar;
fieldtype: PWideChar;
from: PWideChar;
fromString: PWideChar;
v_to: PWideChar;
toString: PWideChar;
fieldId: PWideChar;
begin
rest := CkRest_Create();
// URL: https://your-domain.atlassian.net/rest/api/2/issue/SCRUM-15/changelog
bTls := True;
port := 443;
bAutoReconnect := True;
success := CkRest_Connect(rest,'your-domain.atlassian.net',port,bTls,bAutoReconnect);
if (success <> True) then
begin
Memo1.Lines.Add('ConnectFailReason: ' + IntToStr(CkRest_getConnectFailReason(rest)));
Memo1.Lines.Add(CkRest__lastErrorText(rest));
Exit;
end;
CkRest_SetAuthBasic(rest,'jira@example.com','JIRA_API_TOKEN');
CkRest_AddHeader(rest,'Accept','application/json');
sbResponseBody := CkStringBuilder_Create();
success := CkRest_FullRequestNoBodySb(rest,'GET','/rest/api/2/issue/SCRUM-15/changelog',sbResponseBody);
if (success <> True) then
begin
Memo1.Lines.Add(CkRest__lastErrorText(rest));
Exit;
end;
respStatusCode := CkRest_getResponseStatusCode(rest);
if (respStatusCode >= 400) then
begin
Memo1.Lines.Add('Response Status Code = ' + IntToStr(respStatusCode));
Memo1.Lines.Add('Response Header:');
Memo1.Lines.Add(CkRest__responseHeader(rest));
Memo1.Lines.Add('Response Body:');
Memo1.Lines.Add(CkStringBuilder__getAsString(sbResponseBody));
Exit;
end;
jsonResponse := CkJsonObject_Create();
CkJsonObject_LoadSb(jsonResponse,sbResponseBody);
self := CkJsonObject__stringOf(jsonResponse,'self');
maxResults := CkJsonObject_IntOf(jsonResponse,'maxResults');
startAt := CkJsonObject_IntOf(jsonResponse,'startAt');
total := CkJsonObject_IntOf(jsonResponse,'total');
isLast := CkJsonObject_BoolOf(jsonResponse,'isLast');
i := 0;
count_i := CkJsonObject_SizeOfArray(jsonResponse,'values');
while i < count_i do
begin
CkJsonObject_putI(jsonResponse,i);
id := CkJsonObject__stringOf(jsonResponse,'values[i].id');
authorSelf := CkJsonObject__stringOf(jsonResponse,'values[i].author.self');
authorName := CkJsonObject__stringOf(jsonResponse,'values[i].author.name');
authorKey := CkJsonObject__stringOf(jsonResponse,'values[i].author.key');
authorAccountId := CkJsonObject__stringOf(jsonResponse,'values[i].author.accountId');
authorEmailAddress := CkJsonObject__stringOf(jsonResponse,'values[i].author.emailAddress');
authorAvatarUrls48x48 := CkJsonObject__stringOf(jsonResponse,'values[i].author.avatarUrls.48x48');
authorAvatarUrls24x24 := CkJsonObject__stringOf(jsonResponse,'values[i].author.avatarUrls.24x24');
authorAvatarUrls16x16 := CkJsonObject__stringOf(jsonResponse,'values[i].author.avatarUrls.16x16');
authorAvatarUrls32x32 := CkJsonObject__stringOf(jsonResponse,'values[i].author.avatarUrls.32x32');
authorDisplayName := CkJsonObject__stringOf(jsonResponse,'values[i].author.displayName');
authorActive := CkJsonObject_BoolOf(jsonResponse,'values[i].author.active');
authorTimeZone := CkJsonObject__stringOf(jsonResponse,'values[i].author.timeZone');
created := CkJsonObject__stringOf(jsonResponse,'values[i].created');
historyMetadataType := CkJsonObject__stringOf(jsonResponse,'values[i].historyMetadata.type');
historyMetadataDescription := CkJsonObject__stringOf(jsonResponse,'values[i].historyMetadata.description');
historyMetadataDescriptionKey := CkJsonObject__stringOf(jsonResponse,'values[i].historyMetadata.descriptionKey');
historyMetadataActivityDescription := CkJsonObject__stringOf(jsonResponse,'values[i].historyMetadata.activityDescription');
historyMetadataActivityDescriptionKey := CkJsonObject__stringOf(jsonResponse,'values[i].historyMetadata.activityDescriptionKey');
historyMetadataActorId := CkJsonObject__stringOf(jsonResponse,'values[i].historyMetadata.actor.id');
historyMetadataActorDisplayName := CkJsonObject__stringOf(jsonResponse,'values[i].historyMetadata.actor.displayName');
historyMetadataActorType := CkJsonObject__stringOf(jsonResponse,'values[i].historyMetadata.actor.type');
historyMetadataActorAvatarUrl := CkJsonObject__stringOf(jsonResponse,'values[i].historyMetadata.actor.avatarUrl');
historyMetadataActorUrl := CkJsonObject__stringOf(jsonResponse,'values[i].historyMetadata.actor.url');
historyMetadataGeneratorId := CkJsonObject__stringOf(jsonResponse,'values[i].historyMetadata.generator.id');
historyMetadataGeneratorType := CkJsonObject__stringOf(jsonResponse,'values[i].historyMetadata.generator.type');
historyMetadataCauseId := CkJsonObject__stringOf(jsonResponse,'values[i].historyMetadata.cause.id');
historyMetadataCauseType := CkJsonObject__stringOf(jsonResponse,'values[i].historyMetadata.cause.type');
historyMetadataExtraDataKeyvalue := CkJsonObject__stringOf(jsonResponse,'values[i].historyMetadata.extraData.keyvalue');
historyMetadataExtraDataGoes := CkJsonObject__stringOf(jsonResponse,'values[i].historyMetadata.extraData.goes');
j := 0;
count_j := CkJsonObject_SizeOfArray(jsonResponse,'values[i].items');
while j < count_j do
begin
CkJsonObject_putJ(jsonResponse,j);
field := CkJsonObject__stringOf(jsonResponse,'values[i].items[j].field');
fieldtype := CkJsonObject__stringOf(jsonResponse,'values[i].items[j].fieldtype');
from := CkJsonObject__stringOf(jsonResponse,'values[i].items[j].from');
fromString := CkJsonObject__stringOf(jsonResponse,'values[i].items[j].fromString');
v_to := CkJsonObject__stringOf(jsonResponse,'values[i].items[j].to');
toString := CkJsonObject__stringOf(jsonResponse,'values[i].items[j].toString');
fieldId := CkJsonObject__stringOf(jsonResponse,'values[i].items[j].fieldId');
j := j + 1;
end;
i := i + 1;
end;
CkRest_Dispose(rest);
CkStringBuilder_Dispose(sbResponseBody);
CkJsonObject_Dispose(jsonResponse);
{
"self": "https://chilkat.atlassian.net/rest/api/2/issue/SCRUM-15/changelog?maxResults=100&startAt=0",
"maxResults": 100,
"startAt": 0,
"total": 7,
"isLast": true,
"values": [
{
"id": "10009",
"author": {
"self": "https://chilkat.atlassian.net/rest/api/2/user?username=admin",
"name": "admin",
"key": "admin",
"accountId": "557058:be8b47b5-3bc0-43f6-b6b2-2cca0de12204",
"emailAddress": "admin@@chilkatsoft.com",
"avatarUrls": {
"48x48": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=48&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue",
"24x24": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=24&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D24%26noRedirect%3Dtrue",
"16x16": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=16&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D16%26noRedirect%3Dtrue",
"32x32": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D32%26noRedirect%3Dtrue"
},
"displayName": "Chilkat Admin",
"active": true,
"timeZone": "America/Chicago"
},
"created": "2018-04-05T14:41:55.852-0500",
"items": [
{
"field": "status",
"fieldtype": "jira",
"from": "10000",
"fromString": "To Do",
"to": "3",
"toString": "In Progress"
}
]
},
{
"id": "10010",
"author": {
"self": "https://chilkat.atlassian.net/rest/api/2/user?username=admin",
"name": "admin",
"key": "admin",
"accountId": "557058:be8b47b5-3bc0-43f6-b6b2-2cca0de12204",
"emailAddress": "admin@@chilkatsoft.com",
"avatarUrls": {
"48x48": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=48&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue",
"24x24": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=24&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D24%26noRedirect%3Dtrue",
"16x16": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=16&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D16%26noRedirect%3Dtrue",
"32x32": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D32%26noRedirect%3Dtrue"
},
"displayName": "Chilkat Admin",
"active": true,
"timeZone": "America/Chicago"
},
"created": "2018-04-08T00:33:55.852-0500",
"items": [
{
"field": "status",
"fieldtype": "jira",
"from": "3",
"fromString": "In Progress",
"to": "10001",
"toString": "Done"
}
]
},
{
"id": "10033",
"author": {
"self": "https://chilkat.atlassian.net/rest/api/2/user?username=admin",
"name": "admin",
"key": "admin",
"accountId": "557058:be8b47b5-3bc0-43f6-b6b2-2cca0de12204",
"emailAddress": "admin@@chilkatsoft.com",
"avatarUrls": {
"48x48": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=48&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue",
"24x24": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=24&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D24%26noRedirect%3Dtrue",
"16x16": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=16&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D16%26noRedirect%3Dtrue",
"32x32": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D32%26noRedirect%3Dtrue"
},
"displayName": "Chilkat Admin",
"active": true,
"timeZone": "America/Chicago"
},
"created": "2018-04-12T20:07:08.107-0500",
"items": [
{
"field": "assignee",
"fieldtype": "jira",
"fieldId": "assignee",
"from": null,
"fromString": null,
"to": "matt",
"toString": "Matt of Chilkat"
}
]
},
{
"id": "10035",
"author": {
"self": "https://chilkat.atlassian.net/rest/api/2/user?username=admin",
"name": "admin",
"key": "admin",
"accountId": "557058:be8b47b5-3bc0-43f6-b6b2-2cca0de12204",
"emailAddress": "admin@@chilkatsoft.com",
"avatarUrls": {
"48x48": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=48&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue",
"24x24": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=24&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D24%26noRedirect%3Dtrue",
"16x16": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=16&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D16%26noRedirect%3Dtrue",
"32x32": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D32%26noRedirect%3Dtrue"
},
"displayName": "Chilkat Admin",
"active": true,
"timeZone": "America/Chicago"
},
"created": "2018-04-13T08:07:40.815-0500",
"items": [
{
"field": "summary",
"fieldtype": "jira",
"fieldId": "summary",
"from": null,
"fromString": "As a scrum master, I can see the progress of a sprint via the Burndown Chart >> Click \"Reports\" to view the Burndown Chart",
"to": null,
"toString": "Bug in business logic"
},
{
"field": "labels",
"fieldtype": "jira",
"fieldId": "labels",
"from": null,
"fromString": "",
"to": null,
"toString": "triaged"
}
],
"historyMetadata": {
"type": "myplugin:type",
"description": "text description",
"descriptionKey": "plugin.changereason.i18.key",
"activityDescription": "text description",
"activityDescriptionKey": "plugin.activity.i18.key",
"actor": {
"id": "tony",
"displayName": "Tony",
"type": "mysystem-user",
"avatarUrl": "http://mysystem/avatar/tony.jpg",
"url": "http://mysystem/users/tony"
},
"generator": {
"id": "mysystem-1",
"type": "mysystem-application"
},
"cause": {
"id": "myevent",
"type": "mysystem-event"
},
"extraData": {
"keyvalue": "extra data",
"goes": "here"
}
}
},
{
"id": "10036",
"author": {
"self": "https://chilkat.atlassian.net/rest/api/2/user?username=admin",
"name": "admin",
"key": "admin",
"accountId": "557058:be8b47b5-3bc0-43f6-b6b2-2cca0de12204",
"emailAddress": "admin@@chilkatsoft.com",
"avatarUrls": {
"48x48": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=48&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue",
"24x24": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=24&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D24%26noRedirect%3Dtrue",
"16x16": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=16&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D16%26noRedirect%3Dtrue",
"32x32": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D32%26noRedirect%3Dtrue"
},
"displayName": "Chilkat Admin",
"active": true,
"timeZone": "America/Chicago"
},
"created": "2018-04-13T09:11:35.151-0500",
"items": [
{
"field": "assignee",
"fieldtype": "jira",
"fieldId": "assignee",
"from": "matt",
"fromString": "Matt of Chilkat",
"to": "admin",
"toString": "Chilkat Admin"
}
]
},
{
"id": "10037",
"author": {
"self": "https://chilkat.atlassian.net/rest/api/2/user?username=admin",
"name": "admin",
"key": "admin",
"accountId": "557058:be8b47b5-3bc0-43f6-b6b2-2cca0de12204",
"emailAddress": "admin@@chilkatsoft.com",
"avatarUrls": {
"48x48": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=48&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue",
"24x24": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=24&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D24%26noRedirect%3Dtrue",
"16x16": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=16&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D16%26noRedirect%3Dtrue",
"32x32": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D32%26noRedirect%3Dtrue"
},
"displayName": "Chilkat Admin",
"active": true,
"timeZone": "America/Chicago"
},
"created": "2018-04-13T10:04:19.046-0500",
"items": [
{
"field": "Attachment",
"fieldtype": "jira",
"fieldId": "attachment",
"from": null,
"fromString": null,
"to": "10000",
"toString": "starfish.jpg"
}
]
},
{
"id": "10038",
"author": {
"self": "https://chilkat.atlassian.net/rest/api/2/user?username=admin",
"name": "admin",
"key": "admin",
"accountId": "557058:be8b47b5-3bc0-43f6-b6b2-2cca0de12204",
"emailAddress": "admin@@chilkatsoft.com",
"avatarUrls": {
"48x48": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=48&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue",
"24x24": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=24&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D24%26noRedirect%3Dtrue",
"16x16": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=16&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D16%26noRedirect%3Dtrue",
"32x32": "https://avatar-cdn.atlassian.com/16d54dcc6d4bef86fd7ee62a7cf6334a?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F16d54dcc6d4bef86fd7ee62a7cf6334a%3Fd%3Dmm%26s%3D32%26noRedirect%3Dtrue"
},
"displayName": "Chilkat Admin",
"active": true,
"timeZone": "America/Chicago"
},
"created": "2018-04-13T10:04:46.939-0500",
"items": [
{
"field": "Attachment",
"fieldtype": "jira",
"fieldId": "attachment",
"from": null,
"fromString": null,
"to": "10001",
"toString": "starfish.jpg"
},
{
"field": "Attachment",
"fieldtype": "jira",
"fieldId": "attachment",
"from": null,
"fromString": null,
"to": "10002",
"toString": "sample2.docx"
},
{
"field": "Attachment",
"fieldtype": "jira",
"fieldId": "attachment",
"from": null,
"fromString": null,
"to": "10003",
"toString": "sample.pdf"
}
]
}
]
}