Skip to content

API_v1.0

github-actions[bot] edited this page Apr 28, 2026 · 3 revisions

Polls API v1.0 (final)

Optional additions to the endpoints or its payload may occur.

The Polls API is documented via the OpenAPI specification. The generated spec files are located in the root of this repository:

File Scope
openapi.json All endpoints available to regular users
openapi-administration.json Admin-only endpoints
openapi-full.json All endpoints combined

Browsing the spec

Use any OpenAPI-compatible viewer, e.g. Swagger UI or the Redoc CLI:

npx @redocly/cli preview-docs openapi.json

Bruno can import the spec directly: File → Import Collection → OpenAPI V3 → select openapi.json

Base URL

All endpoints are served under:

/ocs/v2.php/apps/polls

Authentication

Standard Nextcloud authentication applies (Basic Auth, App Passwords, session cookies).

curl -u username:password https://nextcloud.example.com/ocs/v2.php/apps/polls/api/v1.0/polls

Available enum values

Valid values for poll type, access mode, showResults, and votingVariant are exposed through the Nextcloud Capabilities API:

GET /ocs/v2.php/cloud/capabilities

Look for the polls key in the response.

Keeping the spec up to date

The spec is generated from source annotations and must be regenerated after any endpoint change:

composer run openapi

A CI check enforces that the committed spec matches the current source.

Clone this wiki locally