Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POSTing an annotation does not return its ID #9798

Closed
roidelapluie opened this issue Nov 6, 2017 · 5 comments · Fixed by #9901
Closed

POSTing an annotation does not return its ID #9798

roidelapluie opened this issue Nov 6, 2017 · 5 comments · Fixed by #9901

Comments

@roidelapluie
Copy link
Collaborator

When we POST an annotation with the http api

It would be great to get the ID of the new annotation in the response

@natalysheinin
Copy link

@roidelapluie can you include which files I can look at to get started since this is marked beginner friendly?

@roidelapluie
Copy link
Collaborator Author

@mozey
Copy link

mozey commented Nov 13, 2017

So for returning the ID there are two options?

  • Change parameters for ApiSuccess fn so the ID can be passed in
  • Make ID a part of the message string and the client has to parse it

The first requires many changes in various files and the second seems like a hack. Is there another option?

@torkelo
Copy link
Member

torkelo commented Nov 13, 2017

You can return an ok message and an id, done in a few other places, like when creating a new datasource

@torkelo
Copy link
Member

torkelo commented Nov 16, 2017

marefr added a commit that referenced this issue Nov 16, 2017
…ion, fixes #9798

When creating a region annotation the response will include both
id (region start id) and endId (region end id), if not only id.
bergquist added a commit that referenced this issue Nov 16, 2017
fix: return id from api when creating new annotation, fixes #9798
@bergquist bergquist added this to the 4.7.0 milestone Nov 16, 2017
bergquist added a commit that referenced this issue Nov 16, 2017
@bergquist bergquist modified the milestones: 4.7.0, 5.0.0-beta1 Jan 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment