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 |
|---|---|
|