Auditform API

This is a brief explanation of how to use the API..

Authentication

The API uses digest authentication. You will be asked for a username and password before you can retrieve any data
from the system. This is the same username and password you use to log into the Auditform website,:

API

The base URL is:

https://auditform.com/api/index.php/

You can list all audits you have access to by appending the following to the base URL:

audits/getallaudits/

To list a specific audit you will need to know the reference number (??? in the example below). You can retrieve it with the following URL:

audits/getaudit/refno/???/

Completed Audits

To retrieve a list of all completed audits you have access to you can use the below URL (This can take quite a while if you don't specify a date range and is limited to 500 audits).

audits/getcompletedaudit/

You can filter the list to only show completed audits by adding the following to the URL:

published/1/

To retrieve completed audits you have access to, you will need to know the audit reference number. The below URL will show you an audit from the demo account.

audits/getcompletedaudit/refno/32479/

You can also see the answers against this audit by adding the following to the URL:

includeanswers/1/

You can also see the compliances against the answers by adding the following to the URL:

includecompliance/1/

To show archived audits in the results you can add the following to the URL:

showarchived/1/

Date Ranges

To specify a date range you can add the following onto the end of the URL:

audits/getcompletedaudit/fromdate/2018-11-16/todate/2018-12-16

Text Searching

You can filter results by audit name. If you only know part of the name then it will search on the partial name (replace ??? with the search criteria). :

auditnametxt/???/

You can filter results by location name. If you only know part of the name then it will search on the partial name (replace ??? with the search criteria). :

locationnametxt/???/

You can filter results by user. If you only know part of the name then it will search on the partial name (replace ??? with the search criteria). :

usersearchtxt/???/

Output Format

You can switch the output format from XML to either json, csv, html, serialized or php (php gives you a formatted array) (replace ??? with the format required):

format/???/