You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.
The search endpoint enables download of form and their subforms by referencing the form. The search endpoint is accessible via basic auth by normal users
This is a GET request endpoint with the following params:
PARAM NAME
Data type
Mandatory
Description
form_identifier
String
Yes
This is the path to the form on the client app
form_version
String
Yes
This is the semantic version of the form as stated in the manifest
current_form_version
String
No
This is the current form_version for the specific form
The endpoint will return a 200 and:
the specific form in case the current_form_version was not sent
the specific form in case the current_form_version is lower than the currently available version for that form_identifer upto form_version provided
This endpoint will fail and return the respective http code if:
The form_identifier does not exist in the DB
The current_form_version is higher than the form_version
Add endpoint
This endpoint enables you to publish a forms one at a time. The search endpoint is accessible via basic auth by admins. The following params should be passed to the add endpoint:
This is a POST request
PARAM NAME
Data type
Mandatory
Description
form_version
String
Yes
This is the semantic version of the form
form_identifier
String
Yes
This is the path to the form on the client app
form_name
String
Yes
This is the human readable form name that will be displayed when the Forms API gets a UI
form
file
Yes
The actual file with a .json extension
module
String
No
A small title detailing the module to which the form belongs
The endpoint will return a 201 in case the operation was a success
The endpoint will return a 400 in case the operation failed and a message in the body
The add endpoint will return a 400 if:
Either of the params is not provided, empty or provided in the wrong format(500)
The form_version does not follow semantic versioning
The form does not have a .json extension
Both endpoints will return a 401 if you are using wrong credentials or don't are not authorized to access the endpoint
The text was updated successfully, but these errors were encountered:
The forms API will have the following endpoints:
Search endpoint
The search endpoint enables download of form and their subforms by referencing the form. The search endpoint is accessible via basic auth by normal users
This is a GET request endpoint with the following params:
The endpoint will return a
200
and:current_form_version
was not sentcurrent_form_version
is lower than the currently available version for thatform_identifer
uptoform_version
providedThis endpoint will fail and return the respective http code if:
form_identifier
does not exist in the DBcurrent_form_version
is higher than the form_versionAdd endpoint
This endpoint enables you to publish a forms one at a time. The search endpoint is accessible via basic auth by admins. The following params should be passed to the add endpoint:
This is a POST request
.json
extensionThe endpoint will return a
201
in case the operation was a successThe endpoint will return a
400
in case the operation failed and a message in the bodyThe add endpoint will return a
400
if:form_version
does not follow semantic versioningform
does not have a.json
extensionBoth endpoints will return a 401 if you are using wrong credentials or don't are not authorized to access the endpoint
The text was updated successfully, but these errors were encountered: