curl --request GET \
--url https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"_rev": "<string>",
"type": "IB.EdBundle.Document.Audit",
"name": "<string>",
"template": "<string>",
"groupId": "<string>",
"status": "In Progress",
"archived": "<string>",
"isPublished": true,
"tags": [
"<string>"
],
"dates": {
"creationDate": "2023-11-07T05:31:56Z",
"lastModifiedDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"completionDate": "2023-11-07T05:31:56Z"
},
"author": {
"email": "jsmith@example.com",
"type": "<string>"
},
"participants": {
"responsible": {
"email": "jsmith@example.com",
"type": "<string>"
}
},
"questions": [
{
"categoryName": "<string>",
"questions": [
{
"question": "<string>",
"answer": [
"<unknown>"
],
"ticket": [
"<string>"
],
"description": "<string>",
"settings": {
"answertype": "yesnona",
"choice": "single",
"answer": [
"<string>"
],
"richOptions": [
{
"id": "<string>",
"type": "textselect",
"text": "<string>",
"image": "<string>"
}
],
"ticketRequired": true,
"isAttachmentMandatory": true,
"attachments": [
"<string>"
],
"weightingfactor": 123,
"styling": {
"options": {}
}
},
"answeredStatus": null
}
],
"settings": {
"duplicate": true
},
"answeredStatus": "<unknown>"
}
],
"maps": [
{}
],
"signature": [
{}
]
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"message": "User not authorized for this audit",
"code": "FORBIDDEN",
"status": "403"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}Get an audit
Returns the stored audit document. Readable by contract administrators, Accountable and Support on the project, and anyone Responsible, Consulted, Informed or Reporter on this audit.
curl --request GET \
--url https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"_rev": "<string>",
"type": "IB.EdBundle.Document.Audit",
"name": "<string>",
"template": "<string>",
"groupId": "<string>",
"status": "In Progress",
"archived": "<string>",
"isPublished": true,
"tags": [
"<string>"
],
"dates": {
"creationDate": "2023-11-07T05:31:56Z",
"lastModifiedDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"completionDate": "2023-11-07T05:31:56Z"
},
"author": {
"email": "jsmith@example.com",
"type": "<string>"
},
"participants": {
"responsible": {
"email": "jsmith@example.com",
"type": "<string>"
}
},
"questions": [
{
"categoryName": "<string>",
"questions": [
{
"question": "<string>",
"answer": [
"<unknown>"
],
"ticket": [
"<string>"
],
"description": "<string>",
"settings": {
"answertype": "yesnona",
"choice": "single",
"answer": [
"<string>"
],
"richOptions": [
{
"id": "<string>",
"type": "textselect",
"text": "<string>",
"image": "<string>"
}
],
"ticketRequired": true,
"isAttachmentMandatory": true,
"attachments": [
"<string>"
],
"weightingfactor": 123,
"styling": {
"options": {}
}
},
"answeredStatus": null
}
],
"settings": {
"duplicate": true
},
"answeredStatus": "<unknown>"
}
],
"maps": [
{}
],
"signature": [
{}
]
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"message": "User not authorized for this audit",
"code": "FORBIDDEN",
"status": "403"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}Authorizations
Path Parameters
Response
The audit document.
The audit's status. New audits start In Progress; set it to
completed (and fill dates.completionDate) with the audit update
when the audit is finished.
| Value | Meaning |
|---|---|
In Progress | A newly created audit, including one created through createAudit. |
started | Written by the recurrence scheduler when it generates a recurring audit that has a responsible. |
completed | Finished. This is the spelling used for almost all audits. |
Completed | Finished. A few thousand older audits carry this spelling and were never migrated. |
Treat completed and Completed as equivalent: filters match the value
exactly, so a query for finished audits must pass both. dates.completionDate
— empty on a new audit, filled once it is finished — is the sturdier signal.
"In Progress"
The question tree with its answers, exactly two levels deep: this
array holds categories, and each category holds questions. It is
copied from the template when the audit is created; fill it in by
setting each question's answer and send the whole document back with
PUT.
Show child attributes
Show child attributes
