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

Suggested changes in Stories API to get list of stories without specific attributes #835

Open
ershadul-hoque opened this issue Nov 24, 2021 · 1 comment

Comments

@ershadul-hoque
Copy link

We were working at our end to modify the Story API so that we can get a list of stories without specific attributes (when needed). One thing we kept in mind is that we can't change the current API result format since there may be other apps/services who are using the same API. So, we're proposing one format below which can be used in 2 different ways, requesting suggestions from others:

/api/v1/stories/org/{org}/?fields=content,summary

Option 1: We can exclude those attributes (content,summary) from the API result

Option 2: We can only include those attributes (content,summary) in the API result (by excluding everything else)

Which should be the best way to move forward?

@ershadul-hoque ershadul-hoque changed the title Suggested changes in Stories API to get a list of stories without specific attributes Suggested changes in Stories API to get list of stories without specific attributes Nov 24, 2021
@norkans7
Copy link
Contributor

norkans7 commented Nov 24, 2021

/api/v1/stories/org/{org}/?fields=content,summary

should return the stories with only the content and summary

If you want to exclude them you can use

/api/v1/stories/org/{org}/?exclude=content,summary

And yes the default should be what is currently returned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants