doForms REST Web Service API
Documentation has moved
The doForms REST API documentation has moved to https://mydoforms.appspot.com/openapi/openapi.html
The doForms REST API provides integration with the doForms system.
The doForms SOAP API documentation can be found here.
URL
The doForms REST API is located at
https://api-dot-mydoforms-hrd.appspot.com/api/v2
Sample Code
Authorization
Unless noted otherwise, all requests must include an Authorization header with the value "Bearer [token]".
cURL | --header 'Authorization: Bearer [token]' |
---|---|
jQuery | "headers": {"Authorization": "Bearer [token]"} |
Python | headers = {'Authorization': 'Bearer [token]'} |
Java | httpURLConnection.setRequestProperty("Authorization", "Bearer [token]"); |
C# | httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", [token]); |
There are four options for obtaining a token:
User token
Obtain a user token by posting web user credentials to the /tokens/user endpoint described below. Requests with a user token will inherit the rights of the user account.
Web service token
Obtain a web service token by posting web service credentials to the /tokens/webservice endpoint described below. Requests with a web service token will have access to the project and form of the web service.
Web service
Build a static token by combining a web service ID and web service password separated by a colon. Requests with a static token will have access to the project and form of the web service.
Example:
- Web service ID: acme$$1234$$Published$$5678
- Password: mypassword
- Token: acme$$1234$$Published$$5678:mypassword
Reseller token
Obtain a reseller token by posting reseller credentials to the /tokens/reseller endpoint described below.
Requests with a reseller token have access to account management endpoints for the customers of the reseller:
- GET /accounts
- GET /accounts/{key or code}
- PUT /accounts/{key or code}
- GET /devices?account={key or code}
- GET /devices/{key or number}?account={key or code}
- GET /users?account={key or code}
- GET /users/{key or email}?account={key or code}
Endpoints
GET /accounts?
Response | Notes |
---|---|
[ | Query customer accounts. Requires reseller authentication.
|
GET /accounts/current
Response | Notes |
---|---|
{ | Returns information about the current account.
|
GET /accounts/{key or code}
Response | Notes |
---|---|
{ | Get the account.
|
PUT /accounts/{key or code}
Body | Notes |
---|---|
{ | Update the account.
|
GET /activity?
Response | Notes |
---|---|
[ | Returns all submission activity the user has access to.
|
GET /devices?
Response | Notes |
---|---|
[ | Returns all devices the user has access to.
|
GET /devices/{key or number}
Response | Notes |
---|---|
{ | Returns the requested device.
|
GET /devices/{key or number}/activity?
Response | Notes |
---|---|
[ | Returns all submission activity for a device that the user has access to.
|
POST /dispatches
Body | Notes | |
---|---|---|
Request | { | Add a new dispatch.
|
200 OK | { |
|
Error | { |
|
GET /dispatches?
Response | Notes |
---|---|
[ | Returns dispatch identifiers that match a query. See /submissions? for more details.
|
DELETE /dispatches/{key or id}
Response | Notes |
---|---|
200 OK | Delete a dispatch.
|
GET /dispatches/{key or id}?
Response | Notes |
---|---|
{ "key": "abc123", | Returns the data of a dispatch record by key or id.
|
POST /files/{file name}
Response | Notes |
---|---|
{ | Upload a file that can be used as a lookup table or can be sent as part of a dispatch.
Files larger than 32MB will return a 413 error. To upload a large file, leave the body empty. Two new properties will be returned:
|
GET /file/{key or file name}
Response | Notes |
---|---|
{ | Get information about a file.
|
DELETE /file/{key or file name}
Notes |
---|
Delete a file.
|
GET /forms
Response | Notes |
---|---|
[ | Returns the first 1,000 forms published in projects the user or web service has access to.
|
GET /forms/{key or id}
Response | Notes |
---|---|
{ "fields": [ | Returns the form definition by either the key or the id of the form.
|
GET /forms/{key or id}/activity?
Response | Notes |
---|---|
[ | Returns all submission activity for a form that the user has access to.
|
GET /forms/{key or id}/fields
Response | Notes |
---|---|
[ | Returns the fields array for the selected form by key or by id.
|
GET /forms/{key or id}/latest
Response | Notes |
---|---|
{ | Returns information about the last submission generated for the form. Use to identify which submissions can be retrieved at /submissions/{id}.
|
GET /forms/{key or id}/projects
Response | Notes |
---|---|
[ | Returns all projects the requested form is assigned to.
|
GET /groups
Response | Notes |
---|---|
[ | Returns all groups in the account.
|
GET /groups/{key}
Response | Notes |
---|---|
{ | Returns the requested group by key.
|
GET /groups/{key}/users
Response | Notes |
---|---|
[ | Returns all users assigned to the requested group.
|
GET /lookups
Response | Notes |
---|---|
[ | Return all lookups in the account.
|
POST /lookups
Body | Notes | |
---|---|---|
Request | { | Add a new lookup.
|
200 OK | { |
|
GET /lookups/{key}
Response | Notes |
---|---|
{ | Return a lookup.
|
PUT /lookups/{key}
Body | Notes | |
---|---|---|
Request | { | Replace all rows in the lookup with the rows in the request.
|
200 OK | { |
|
400 Bad Request | { | Error code 951 indicates that there are too many existing rows in the lookup to remove in one request, or the number of rows in this request is too large to process in one request. Empty the lookup by calling DELETE /lookups/{key}/rows until complete = true, and then add the rows by calling POST /lookups/{key}/rows. |
DELETE /lookups/{key}
Response | Notes |
---|---|
200 OK | Delete a lookup.
|
GET /lookups/{key}/columns
Response | Notes |
---|---|
[ | Return the columns in a lookup.
|
GET /lookups/{key}/forms
Response | Notes |
---|---|
[ | Return the forms that currently use the lookup.
|
GET /lookups/{key}/rows
Response | Notes |
---|---|
[ | Return the rows in a lookup.
|
POST /lookups/{key}/rows
Body | Notes | |
---|---|---|
Request | [ | Append rows to a lookup.
|
200 OK | { |
|
DELETE /lookups/{key}/rows
Response | Notes |
---|---|
{ | Delete rows from a lookup.
|
GET /lookups/{key}/rows/{id}
Response | Notes |
---|---|
{ | Get a single row in a lookup by id.
|
PUT /lookups/{key}/rows/{id}
Body | Notes | |
---|---|---|
Request | { | Update a row in a lookup.
|
200 OK | { |
DELETE /lookups/{key}/rows/{id}
Response | Notes |
---|---|
200 OK | Remove a row from a lookup.
|
GET /notifications/{key}
Response | Notes |
---|---|
{ | Returns the requested webhook notification.
|
PUT /notifications/{key}
Body | Notes |
---|---|
{ |
|
GET /projects
Response | Notes |
---|---|
[ | Returns all projects the user or web service has access to.
|
GET /projects/{key}
Response | Notes |
---|---|
{ | Returns the requested project.
|
GET /projects/{key}/activity?
Response | Notes |
---|---|
[ | Returns all submission activity for a project that the user has access to.
|
GET /projects/{key}/forms?
Response | Notes |
---|---|
[ | Returns all forms assigned to the requested project.
|
GET /reports
Response | Notes |
---|---|
[ | Returns all published reports.
|
GET /reports/my
Response | Notes |
---|---|
[ | Returns reports assigned to the user.
|
GET /reports/{key}
Response | Notes |
---|---|
{ | Returns the requested report.
|
GET /reports/{key}/results
Response | Notes |
---|---|
[ | Returns all current results for the selected report.
|
GET /reports/{key}/results/{result key}
Response | Notes |
---|---|
{ | Returns the details for the selected result.
|
GET /reports/{key}/results/{result key}/pdf
Response | Notes |
---|---|
Content-Type: application/pdf | Returns the PDF file for the selected result.
|
GET /reports/{key}/results/{result key}/xlsx
Response | Notes |
---|---|
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Returns the Excel file for the selected result.
|
GET /submissions?
Response | Notes |
---|---|
[ | Returns submission identifiers that match a query.
|
DELETE /submissions/{key or id}
Response | Notes |
---|---|
200 OK | Delete a submission
|
GET /submissions/{key or id}?
Response | Notes |
---|---|
{ "key": "abc123", | Returns the data captured in a form submission by key or id.
|
GET /submissions/{key or id}/activity
Response | Notes |
---|---|
[ | Returns the activity of the selected submission.
|
GET /submissions/{key or id}/blobs
Response | Notes |
---|---|
[ | Returns information about all attachment blobs in the form submission by the key or id of the submission.
|
DELETE /submissions/{key or id}/blobs
Notes |
---|
Delete all attachment blobs from the submission.
|
GET /submissions/{key or id}/blobs/{key or id}
Response | Notes |
---|---|
{ | Returns information about a single blob in a submission.
|
DELETE /submissions/{key or id}/blobs/{key or id}
Notes |
---|
Delete the specified attachment blob.
|
GET /submissions/{key or id}/blobs/{key or id}/binary
Response | Notes |
---|---|
application/octet-stream | Returns the binary data of a single blob in a submission.
|
POST /submissions
Body | Notes | |
---|---|---|
Request | { | Add a new submission.
|
200 OK | Returns the complete submission after it is added. |
PUT /submissions/{key or id}
Body | Notes | |
---|---|---|
Request | { | Update an existing submission.
|
200 OK | Returns the complete submission after the update has been applied. |
POST /tasks
Body | Notes | |
---|---|---|
Request | { | Start a task.
|
200 OK | { | Returns the task with the current status. Most tasks will have complete=false when created. Check the status at GET /tasks/{key}. |
GET /tasks/{key}
Response | Notes |
---|---|
{ "blob": { | Get a task.
|
GET /tasks/{key}/xlsx
Response | Notes |
---|---|
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet Content-Disposition: attachment; filename="MyFileName.xlsx" | Get the content of an XLSX file generated by a task.
|
GET /tasks/{key}/pdf
Response | Notes |
---|---|
Content-Type: application/pdf | Get the content of a PDF file generated by a task.
|
GET /teams
Response | Notes |
---|---|
[ | Returns all device teams (also known as groups) the user has access to.
|
GET /teams/{key}
Response | Notes |
---|---|
{ | Returns the requested team. |
GET /teams/{key}/devices?
Response | Notes |
---|---|
[ | Returns all the devices assigned to the requested team.
|
GET /templates
Response | Notes |
---|---|
[ | Returns all Excel templates in the account.
|
GET /templates/{key}
Response | Notes |
---|---|
{ | Returns the requested Excel template.
|
POST /tokens/reseller
- Authorization header is not required.
Body | Notes | |
---|---|---|
Request | { |
|
200 | { |
|
401 | { |
POST /tokens/user
Authorization header is not required.
Body | Notes | |
---|---|---|
Request | { |
|
Request | { |
|
200 OK | { |
|
300 Options | { |
|
401 Unauthorized | { | |
401 MFA Code Required | { |
|
403 Forbidden | { | |
403 Inactive Account | { |
POST /tokens/webservice
- Authorization header is not required
Body | Notes | |
---|---|---|
Request | { |
|
200 OK | { |
|
401 Unauthorized | { | |
403 Forbidden | { | |
403 Inactive Account | { |
GET /users
Response | Notes |
---|---|
[ | Returns all web users for the account.
|
GET /users/{key or email}
Response | Notes |
---|---|
{ | Returns the requested web user by key or by email.
|
GET /webservices
Response | Notes |
---|---|
[ | Returns all web services for the account.
|
GET /webservices/{key or id}
Response | Notes |
---|---|
{ | Returns the requested web service including the password.
|