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'
IncludeFile "CkJsonObject.pb"
IncludeFile "CkStringBuilder.pb"
IncludeFile "CkRest.pb"
Procedure ChilkatExample()
rest.i = CkRest::ckCreate()
If rest.i = 0
Debug "Failed to create object."
ProcedureReturn
EndIf
success.i
; URL: https://your-domain.atlassian.net/rest/api/2/issue/SCRUM-15/changelog
bTls.i = 1
port.i = 443
bAutoReconnect.i = 1
success = CkRest::ckConnect(rest,"your-domain.atlassian.net",port,bTls,bAutoReconnect)
If success <> 1
Debug "ConnectFailReason: " + Str(CkRest::ckConnectFailReason(rest))
Debug CkRest::ckLastErrorText(rest)
CkRest::ckDispose(rest)
ProcedureReturn
EndIf
CkRest::ckSetAuthBasic(rest,"jira@example.com","JIRA_API_TOKEN")
CkRest::ckAddHeader(rest,"Accept","application/json")
sbResponseBody.i = CkStringBuilder::ckCreate()
If sbResponseBody.i = 0
Debug "Failed to create object."
ProcedureReturn
EndIf
success = CkRest::ckFullRequestNoBodySb(rest,"GET","/rest/api/2/issue/SCRUM-15/changelog",sbResponseBody)
If success <> 1
Debug CkRest::ckLastErrorText(rest)
CkRest::ckDispose(rest)
CkStringBuilder::ckDispose(sbResponseBody)
ProcedureReturn
EndIf
respStatusCode.i = CkRest::ckResponseStatusCode(rest)
If respStatusCode >= 400
Debug "Response Status Code = " + Str(respStatusCode)
Debug "Response Header:"
Debug CkRest::ckResponseHeader(rest)
Debug "Response Body:"
Debug CkStringBuilder::ckGetAsString(sbResponseBody)
CkRest::ckDispose(rest)
CkStringBuilder::ckDispose(sbResponseBody)
ProcedureReturn
EndIf
jsonResponse.i = CkJsonObject::ckCreate()
If jsonResponse.i = 0
Debug "Failed to create object."
ProcedureReturn
EndIf
CkJsonObject::ckLoadSb(jsonResponse,sbResponseBody)
self.s
maxResults.i
startAt.i
total.i
isLast.i
i.i
count_i.i
id.s
authorSelf.s
authorName.s
authorKey.s
authorAccountId.s
authorEmailAddress.s
authorAvatarUrls48x48.s
authorAvatarUrls24x24.s
authorAvatarUrls16x16.s
authorAvatarUrls32x32.s
authorDisplayName.s
authorActive.i
authorTimeZone.s
created.s
historyMetadataType.s
historyMetadataDescription.s
historyMetadataDescriptionKey.s
historyMetadataActivityDescription.s
historyMetadataActivityDescriptionKey.s
historyMetadataActorId.s
historyMetadataActorDisplayName.s
historyMetadataActorType.s
historyMetadataActorAvatarUrl.s
historyMetadataActorUrl.s
historyMetadataGeneratorId.s
historyMetadataGeneratorType.s
historyMetadataCauseId.s
historyMetadataCauseType.s
historyMetadataExtraDataKeyvalue.s
historyMetadataExtraDataGoes.s
j.i
count_j.i
field.s
fieldtype.s
from.s
fromString.s
v_to.s
toString.s
fieldId.s
self = CkJsonObject::ckStringOf(jsonResponse,"self")
maxResults = CkJsonObject::ckIntOf(jsonResponse,"maxResults")
startAt = CkJsonObject::ckIntOf(jsonResponse,"startAt")
total = CkJsonObject::ckIntOf(jsonResponse,"total")
isLast = CkJsonObject::ckBoolOf(jsonResponse,"isLast")
i = 0
count_i = CkJsonObject::ckSizeOfArray(jsonResponse,"values")
While i < count_i
CkJsonObject::setCkI(jsonResponse, i)
id = CkJsonObject::ckStringOf(jsonResponse,"values[i].id")
authorSelf = CkJsonObject::ckStringOf(jsonResponse,"values[i].author.self")
authorName = CkJsonObject::ckStringOf(jsonResponse,"values[i].author.name")
authorKey = CkJsonObject::ckStringOf(jsonResponse,"values[i].author.key")
authorAccountId = CkJsonObject::ckStringOf(jsonResponse,"values[i].author.accountId")
authorEmailAddress = CkJsonObject::ckStringOf(jsonResponse,"values[i].author.emailAddress")
authorAvatarUrls48x48 = CkJsonObject::ckStringOf(jsonResponse,"values[i].author.avatarUrls.48x48")
authorAvatarUrls24x24 = CkJsonObject::ckStringOf(jsonResponse,"values[i].author.avatarUrls.24x24")
authorAvatarUrls16x16 = CkJsonObject::ckStringOf(jsonResponse,"values[i].author.avatarUrls.16x16")
authorAvatarUrls32x32 = CkJsonObject::ckStringOf(jsonResponse,"values[i].author.avatarUrls.32x32")
authorDisplayName = CkJsonObject::ckStringOf(jsonResponse,"values[i].author.displayName")
authorActive = CkJsonObject::ckBoolOf(jsonResponse,"values[i].author.active")
authorTimeZone = CkJsonObject::ckStringOf(jsonResponse,"values[i].author.timeZone")
created = CkJsonObject::ckStringOf(jsonResponse,"values[i].created")
historyMetadataType = CkJsonObject::ckStringOf(jsonResponse,"values[i].historyMetadata.type")
historyMetadataDescription = CkJsonObject::ckStringOf(jsonResponse,"values[i].historyMetadata.description")
historyMetadataDescriptionKey = CkJsonObject::ckStringOf(jsonResponse,"values[i].historyMetadata.descriptionKey")
historyMetadataActivityDescription = CkJsonObject::ckStringOf(jsonResponse,"values[i].historyMetadata.activityDescription")
historyMetadataActivityDescriptionKey = CkJsonObject::ckStringOf(jsonResponse,"values[i].historyMetadata.activityDescriptionKey")
historyMetadataActorId = CkJsonObject::ckStringOf(jsonResponse,"values[i].historyMetadata.actor.id")
historyMetadataActorDisplayName = CkJsonObject::ckStringOf(jsonResponse,"values[i].historyMetadata.actor.displayName")
historyMetadataActorType = CkJsonObject::ckStringOf(jsonResponse,"values[i].historyMetadata.actor.type")
historyMetadataActorAvatarUrl = CkJsonObject::ckStringOf(jsonResponse,"values[i].historyMetadata.actor.avatarUrl")
historyMetadataActorUrl = CkJsonObject::ckStringOf(jsonResponse,"values[i].historyMetadata.actor.url")
historyMetadataGeneratorId = CkJsonObject::ckStringOf(jsonResponse,"values[i].historyMetadata.generator.id")
historyMetadataGeneratorType = CkJsonObject::ckStringOf(jsonResponse,"values[i].historyMetadata.generator.type")
historyMetadataCauseId = CkJsonObject::ckStringOf(jsonResponse,"values[i].historyMetadata.cause.id")
historyMetadataCauseType = CkJsonObject::ckStringOf(jsonResponse,"values[i].historyMetadata.cause.type")
historyMetadataExtraDataKeyvalue = CkJsonObject::ckStringOf(jsonResponse,"values[i].historyMetadata.extraData.keyvalue")
historyMetadataExtraDataGoes = CkJsonObject::ckStringOf(jsonResponse,"values[i].historyMetadata.extraData.goes")
j = 0
count_j = CkJsonObject::ckSizeOfArray(jsonResponse,"values[i].items")
While j < count_j
CkJsonObject::setCkJ(jsonResponse, j)
field = CkJsonObject::ckStringOf(jsonResponse,"values[i].items[j].field")
fieldtype = CkJsonObject::ckStringOf(jsonResponse,"values[i].items[j].fieldtype")
from = CkJsonObject::ckStringOf(jsonResponse,"values[i].items[j].from")
fromString = CkJsonObject::ckStringOf(jsonResponse,"values[i].items[j].fromString")
v_to = CkJsonObject::ckStringOf(jsonResponse,"values[i].items[j].to")
toString = CkJsonObject::ckStringOf(jsonResponse,"values[i].items[j].toString")
fieldId = CkJsonObject::ckStringOf(jsonResponse,"values[i].items[j].fieldId")
j = j + 1
Wend
i = i + 1
Wend
CkRest::ckDispose(rest)
CkStringBuilder::ckDispose(sbResponseBody)
CkJsonObject::ckDispose(jsonResponse)
ProcedureReturn
EndProcedure
{
"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"
}
]
}
]
}