-
Notifications
You must be signed in to change notification settings - Fork 23
REST API v0.2.0
Dokomo forms provides a RESTful API through which applications can interact with the system. The Dokomo application itself makes extensive use of the API in order to submit completed surveys and otherwise interact with clients.
At present, JSON is the only supported media type.
Authentication is done through normal login + session cookies or through an API token. Later we may add in HTTP Basic Auth to support other clients.
There are only two API endpoints which are available without requiring authentication. If a Survey is public (i.e. has survey_type
= "public"), it can be fetched using the single survey endpoint. Likewise, Submissions can be created via the API for public Surveys without authentication.
The API will support the GET, POST, PUT, and DELETE HTTP methods.
Some GET requests have optional parameters which will affect the results returned in the response.
POST requests should include a valid JSON object as the body payload.
On error, the server will respond with the corresponding HTTP response code, and the resulting JSON in the body will contain an error
property with a message describing the error.