OpnForm icon indicating copy to clipboard operation
OpnForm copied to clipboard

Form management API should be documented

Open rl1987 opened this issue 1 year ago • 4 comments

API reference at OpnForm developer portal (https://docs.opnform.com/api-reference/introduction) does not document the API that frontend uses for operations on forms (creation, deletion, etc.). As automation developer I would like to have pages similar to these:

https://apidocs.form.io/?version=latest#d43fc691-1008-a1a7-eee8-eb80658922fa https://api.jotform.com/docs/#post-forms

rl1987 avatar Nov 06 '24 17:11 rl1987

We'll add this at some point. The current API token that users can created a limited to external connections such as Zapier, and the internal API is private (and undocumented for now).

JhumanJ avatar Nov 21 '24 15:11 JhumanJ

Hi all,

First, thanks for this wonderful product. I’m considering changing from survmonkey to OpnForms but I miss API endpoints for retrieving the data (at least).

Do we have any perspective of this implementation? The only endpoints I found are for zapier (which does not include listing all forms answers - or maybe I couldn’t find it)

Thanks in advance

felippelazar avatar Jan 29 '25 13:01 felippelazar

Hello, You can query the back-end directly at the end point /api, all the routes are listed in api.php.

To authenticate and get your token you can use:

~$ curl -X POST https://site.com/api/login -d "[email protected]" -d "password=MyPassword"

that if you are using the docker deployment, otherwise remove the api endpoint and query the API server directly.

after login you will get your Bearer token, to get a current form submissions:

~$ curl -X GET https://site.com/api/open/forms/6/submissions -H "Authorization: Bearer $TOKEN" | jq .

I'm actually amazed by the much work that have been put into OpnForms, and with proper and detailed documentation I think the project will rocket launch

aindot avatar Mar 16 '25 16:03 aindot

Thanks for the kind words @aindot. This works but:

  • we may change internal endpoint (frequently)
  • you need to use email & password which is not great

We will soon add form & submission endpoint in the official API!

JhumanJ avatar Mar 21 '25 16:03 JhumanJ