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'
#include <C_CkRest.h>
#include <C_CkStringBuilder.h>
#include <C_CkJsonObject.h>
void ChilkatSample(void)
{
HCkRest rest;
BOOL success;
BOOL bTls;
int port;
BOOL bAutoReconnect;
HCkStringBuilder sbResponseBody;
int respStatusCode;
HCkJsonObject jsonResponse;
const char *self;
int maxResults;
int startAt;
int total;
BOOL isLast;
int i;
int count_i;
const char *id;
const char *authorSelf;
const char *authorName;
const char *authorKey;
const char *authorAccountId;
const char *authorEmailAddress;
const char *authorAvatarUrls48x48;
const char *authorAvatarUrls24x24;
const char *authorAvatarUrls16x16;
const char *authorAvatarUrls32x32;
const char *authorDisplayName;
BOOL authorActive;
const char *authorTimeZone;
const char *created;
const char *historyMetadataType;
const char *historyMetadataDescription;
const char *historyMetadataDescriptionKey;
const char *historyMetadataActivityDescription;
const char *historyMetadataActivityDescriptionKey;
const char *historyMetadataActorId;
const char *historyMetadataActorDisplayName;
const char *historyMetadataActorType;
const char *historyMetadataActorAvatarUrl;
const char *historyMetadataActorUrl;
const char *historyMetadataGeneratorId;
const char *historyMetadataGeneratorType;
const char *historyMetadataCauseId;
const char *historyMetadataCauseType;
const char *historyMetadataExtraDataKeyvalue;
const char *historyMetadataExtraDataGoes;
int j;
int count_j;
const char *field;
const char *fieldtype;
const char *from;
const char *fromString;
const char *v_to;
const char *toString;
const char *fieldId;
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) {
printf("ConnectFailReason: %d\n",CkRest_getConnectFailReason(rest));
printf("%s\n",CkRest_lastErrorText(rest));
CkRest_Dispose(rest);
return;
}
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) {
printf("%s\n",CkRest_lastErrorText(rest));
CkRest_Dispose(rest);
CkStringBuilder_Dispose(sbResponseBody);
return;
}
respStatusCode = CkRest_getResponseStatusCode(rest);
if (respStatusCode >= 400) {
printf("Response Status Code = %d\n",respStatusCode);
printf("Response Header:\n");
printf("%s\n",CkRest_responseHeader(rest));
printf("Response Body:\n");
printf("%s\n",CkStringBuilder_getAsString(sbResponseBody));
CkRest_Dispose(rest);
CkStringBuilder_Dispose(sbResponseBody);
return;
}
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) {
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) {
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;
}
i = i + 1;
}
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"
}
]
}
]
}