Get an audit template
curl --request GET \
--url https://web.edcontrols.com/api/v2/data/projects/{database}/audittemplates/{auditTemplateId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://web.edcontrols.com/api/v2/data/projects/{database}/audittemplates/{auditTemplateId}"
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}/audittemplates/{auditTemplateId}', 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}/audittemplates/{auditTemplateId}",
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}/audittemplates/{auditTemplateId}"
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}/audittemplates/{auditTemplateId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://web.edcontrols.com/api/v2/data/projects/{database}/audittemplates/{auditTemplateId}")
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>",
"name": "<string>",
"groupId": "<string>",
"group": "<string>",
"project": "<string>",
"isPublished": true,
"archived": "<string>",
"auditType": "<string>",
"answeredStatusEnabled": true,
"tags": [
"<string>"
],
"dates": {
"creationDate": "2023-11-07T05:31:56Z",
"lastModifiedDate": "2023-11-07T05:31:56Z"
},
"author": {
"email": "jsmith@example.com",
"type": "<string>"
},
"lastmodifier": {
"email": "jsmith@example.com",
"type": "<string>"
},
"versionInfo": {},
"_attachments": {},
"questions": [
{
"categoryName": "<string>",
"questions": [
{
"question": "<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": {}
}
},
"answer": [
"<unknown>"
],
"ticket": [
"<string>"
],
"description": "<string>"
}
],
"settings": {
"duplicate": true
}
}
]
}{
"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"
}{
"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"
}Audit Templates
Get an audit template
Returns the stored template document. Readable by contract administrators, Accountable and Support on the project, and anyone Responsible, Consulted, Informed or Reporter on this template.
GET
/
api
/
v2
/
data
/
projects
/
{database}
/
audittemplates
/
{auditTemplateId}
Get an audit template
curl --request GET \
--url https://web.edcontrols.com/api/v2/data/projects/{database}/audittemplates/{auditTemplateId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://web.edcontrols.com/api/v2/data/projects/{database}/audittemplates/{auditTemplateId}"
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}/audittemplates/{auditTemplateId}', 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}/audittemplates/{auditTemplateId}",
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}/audittemplates/{auditTemplateId}"
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}/audittemplates/{auditTemplateId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://web.edcontrols.com/api/v2/data/projects/{database}/audittemplates/{auditTemplateId}")
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>",
"name": "<string>",
"groupId": "<string>",
"group": "<string>",
"project": "<string>",
"isPublished": true,
"archived": "<string>",
"auditType": "<string>",
"answeredStatusEnabled": true,
"tags": [
"<string>"
],
"dates": {
"creationDate": "2023-11-07T05:31:56Z",
"lastModifiedDate": "2023-11-07T05:31:56Z"
},
"author": {
"email": "jsmith@example.com",
"type": "<string>"
},
"lastmodifier": {
"email": "jsmith@example.com",
"type": "<string>"
},
"versionInfo": {},
"_attachments": {},
"questions": [
{
"categoryName": "<string>",
"questions": [
{
"question": "<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": {}
}
},
"answer": [
"<unknown>"
],
"ticket": [
"<string>"
],
"description": "<string>"
}
],
"settings": {
"duplicate": true
}
}
]
}{
"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"
}{
"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 template document.
