Project

General

Profile

Actions

Feature #23566

closed

REST API should return attachment's id in addition to token

Added by Alex Last over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Category:
REST API
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Files

Actions #1

Updated by Jan from Planio www.plan.io over 7 years ago

The first part (before the .) of the token is in fact the ID.

Actions #2

Updated by Alex Last over 7 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.

Actions #3

Updated by Jan from Planio www.plan.io over 7 years ago

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.

Actions #4

Updated by Go MAEDA over 7 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.

Actions #5

Updated by Jean-Philippe Lang over 7 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.

Actions

Also available in: Atom PDF