-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Affects Version/s: 2.6.3
-
Component/s: API - REST, Integration - JIRA
I could not get the parameters. Below the results of my test:
API without since and until parameters:
http://localhost:7990/stash/rest/api/1.0/projects/Empty/repos/test/commits
Result
{
"size": 16,
"limit": 25,
"isLastPage": true,
"values": [{
"id": "61b63b3ff65ba13088d41d16406c18246e565e49",
"displayId": "61b63b3",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1375844282000,
"message": "testing .......",
"parents": [{
"id": "0ca39f5ac5ca0a87f495d5028f43ef29264153df",
"displayId": "0ca39f5"
}]
}, {
"id": "0ca39f5ac5ca0a87f495d5028f43ef29264153df",
"displayId": "0ca39f5",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1375844215000,
"message": "TP-2 Issue bla bla",
"parents": [{
"id": "5058fb03725afecbca310542b77f25ed41b44478",
"displayId": "5058fb0"
}],
"attributes": {
"jira-key": ["TP-2"]
}
}, {
"id": "5058fb03725afecbca310542b77f25ed41b44478",
"displayId": "5058fb0",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1375844182000,
"message": "One more test",
"parents": [{
"id": "20c99e237da9c9ca863179aa4acd5fe98167a8a1",
"displayId": "20c99e2"
}]
}, {
"id": "20c99e237da9c9ca863179aa4acd5fe98167a8a1",
"displayId": "20c99e2",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1375843841000,
"message": "TP-1 issue",
"parents": [{
"id": "5846e27421acb1f95cf0e8afe199490ef992aff8",
"displayId": "5846e27"
}],
"attributes": {
"jira-key": ["TP-1"]
}
}, {
"id": "5846e27421acb1f95cf0e8afe199490ef992aff8",
"displayId": "5846e27",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1373523177000,
"message": "Initial Commit",
"parents": [{
"id": "37abe8bd64fa556b8138adaf79ec32e607411c6f",
"displayId": "37abe8b"
}]
}, {
"id": "37abe8bd64fa556b8138adaf79ec32e607411c6f",
"displayId": "37abe8b",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1373350073000,
"message": "Updated Rakefile",
"parents": [{
"id": "ecbf6d4f32d6f344a5faf8efdb72944e2f94fc41",
"displayId": "ecbf6d4"
}]
}, {
"id": "ecbf6d4f32d6f344a5faf8efdb72944e2f94fc41",
"displayId": "ecbf6d4",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1373349948000,
"message": "Hello uses Greeter",
"parents": [{
"id": "6e7ba467827c824b68f28be7ab3c46c18fbba8ea",
"displayId": "6e7ba46"
}]
}, {
"id": "6e7ba467827c824b68f28be7ab3c46c18fbba8ea",
"displayId": "6e7ba46",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1373349709000,
"message": "Added greeter class",
"parents": [{
"id": "cf8c79cdec91ad9ffa47d71200da8eea4ded6a8d",
"displayId": "cf8c79c"
}]
}, {
"id": "cf8c79cdec91ad9ffa47d71200da8eea4ded6a8d",
"displayId": "cf8c79c",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1373350348000,
"message": "Added README",
"parents": [{
"id": "710d46491083d8e25bb243f662a234e124ad3bdb",
"displayId": "710d464"
}]
}, {
"id": "710d46491083d8e25bb243f662a234e124ad3bdb",
"displayId": "710d464",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1373332925000,
"message": "Added a Rakefile.",
"parents": [{
"id": "ea85cfcb7e8803d299a2437dfa2fd65f3d45e3c0",
"displayId": "ea85cfc"
}]
}, {
"id": "ea85cfcb7e8803d299a2437dfa2fd65f3d45e3c0",
"displayId": "ea85cfc",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1373332759000,
"message": "Moved hello.rb to lib",
"parents": [{
"id": "4f11fd4e3acb875185bb473faa256308825cbed5",
"displayId": "4f11fd4"
}]
}, {
"id": "4f11fd4e3acb875185bb473faa256308825cbed5",
"displayId": "4f11fd4",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1373331795000,
"message": "Add an author/email comment",
"parents": [{
"id": "fd6212250712f3ec404e4a6e4a8fa67dba5a7628",
"displayId": "fd62122"
}]
}, {
"id": "fd6212250712f3ec404e4a6e4a8fa67dba5a7628",
"displayId": "fd62122",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1373260030000,
"message": "Added a comment",
"parents": [{
"id": "88a370b880d170326ff302b36a5ba635d2618e83",
"displayId": "88a370b"
}]
}, {
"id": "88a370b880d170326ff302b36a5ba635d2618e83",
"displayId": "88a370b",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1373259812000,
"message": "Added a default value",
"parents": [{
"id": "2f00215d917b07d3e4284f93e9fb0dc283da5fed",
"displayId": "2f00215"
}]
}, {
"id": "2f00215d917b07d3e4284f93e9fb0dc283da5fed",
"displayId": "2f00215",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1373259086000,
"message": "Using ARGV",
"parents": [{
"id": "b6232250d10ad6af9303b50aac9edc3f4c3a4ffa",
"displayId": "b623225"
}]
}, {
"id": "b6232250d10ad6af9303b50aac9edc3f4c3a4ffa",
"displayId": "b623225",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1373257700000,
"message": "First Commit",
"parents": []
}],
"start": 0,
"filter": null
}
API WITH 'since' and 'until':
http://localhost:7990/stash/rest/api/1.0/projects/Empty/repos/test/commits?since=5846e27&until=61b63b3
{
"values": [{
"id": "61b63b3ff65ba13088d41d16406c18246e565e49",
"displayId": "61b63b3",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1375844282000,
"message": "testing .......",
"parents": [{
"id": "0ca39f5ac5ca0a87f495d5028f43ef29264153df",
"displayId": "0ca39f5"
}]
}, {
"id": "0ca39f5ac5ca0a87f495d5028f43ef29264153df",
"displayId": "0ca39f5",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1375844215000,
"message": "TP-2 Issue bla bla",
"parents": [{
"id": "5058fb03725afecbca310542b77f25ed41b44478",
"displayId": "5058fb0"
}]
}, {
"id": "5058fb03725afecbca310542b77f25ed41b44478",
"displayId": "5058fb0",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1375844182000,
"message": "One more test",
"parents": [{
"id": "20c99e237da9c9ca863179aa4acd5fe98167a8a1",
"displayId": "20c99e2"
}]
}, {
"id": "20c99e237da9c9ca863179aa4acd5fe98167a8a1",
"displayId": "20c99e2",
"author": {
"name": "Thiago Bomfim",
"emailAddress": "tbomfim@atlassian.com"
},
"authorTimestamp": 1375843841000,
"message": "TP-1 issue",
"parents": [{
"id": "5846e27421acb1f95cf0e8afe199490ef992aff8",
"displayId": "5846e27"
}]
}],
"size": 4,
"limit": 25,
"isLastPage": true,
"nextPageStart": 25,
"start": 0
}
- is incorporated by
-
BSERV-3821 REST /commits should default "until" to HEAD when specifying "since"
- Closed