Feature #23566
closedREST API should return attachment's id in addition to token
0%
Files
Updated by Jan from Planio www.plan.io over 8 years ago
The first part (before the .
) of the token is in fact the ID.
Updated by Alex Last over 8 years ago
Than you, Jan! this is useful to know. it is hard to predict though if that is something that we could rely on going forward. it may be just some internal implementation detail rather than documented API.
if I parse id from the token, this may break for the next redmine version - non-starter for the Java library because I can't support separate versions for each Redmine version.
Updated by Jan from Planio www.plan.io over 8 years ago
- File 0001-return-attachment-id-in-api-response-to-attachment-u.patch 0001-return-attachment-id-in-api-response-to-attachment-u.patch added
- Status changed from New to Resolved
- Target version set to Candidate for next minor release
Alex Last wrote:
Than you, Jan! this is useful to know. it is hard to predict though if that is something that we could rely on going forward. it may be just some internal implementation detail rather than documented API.
if I parse id from the token, this may break for the next redmine version - non-starter for the Java library because I can't support separate versions for each Redmine version.
I agree. Luckily, it's not hard to return the ID as well, so the attached patch implements this. We've added this to the Redmine API at Planio straight away and hopefully this patch can be included in Redmine as well in a next minor release.
Updated by Go MAEDA over 8 years ago
- Status changed from Resolved to New
- Target version changed from Candidate for next minor release to 3.4.0
Thanks for submitting the patch, Jan.
I think this should be implemented in Redmine core. I am setting target version to 3.4.0.
Updated by Jean-Philippe Lang over 8 years ago
- Subject changed from "upload attachment" should return attachment's database id in addition to token because "delete" operation operates on id only to REST API should return attachment's id in addition to token
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
- Resolution set to Fixed
Patch committed, thanks.