Skip to content

Get additional information from REST API #3414

@Bagoult

Description

@Bagoult

⚠️ This issue respects the following points: ⚠️

Describe the goal you'd like to achieve

I'm currently developing a polling app for mobile devices for a class project, and I want to make the app compatible with Nextcloud apps so that the user can save and retrieve their polls on a server. I want to be able to get the permissions (addOption, allAccess, etc.) and a summary of the current user (isLoggedIn, isOwner, etc.) for a certain poll, because it allows me to display the poll correctly.
Currently, the only way to get that is to use the list functions through GET /api/v1.0/polls. This does work nicely, but when I want to get information for one poll only through GET /api/v1.0/poll/{pollId}, I only get the configuration of the poll and no user's permissions or interactions. It would be nice to add this to the JSON returned by /poll/{pollId}. I don't know any PHP so I can't make a contribution myself, but I don't think it would take much work to change this. Also, it wouldn't break apps that already use this API. I can help to complete the API docs now that I'm familiar with it if it helps the project.

Describe possible solutions

Modify the get function from here would do it if I understand the code correctly.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions