curl --request PUT \
--url https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"_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>",
"answeredStatus": null
}
],
"settings": {
"duplicate": true
},
"answeredStatus": "<unknown>"
}
],
"maps": [
{}
],
"signature": [
{}
]
}
'import requests
url = "https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId}"
payload = {
"_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>",
"answeredStatus": None
}
],
"settings": { "duplicate": True },
"answeredStatus": "<unknown>"
}
],
"maps": [{}],
"signature": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_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>',
answeredStatus: null
}
],
settings: {duplicate: true},
answeredStatus: '<unknown>'
}
],
maps: [{}],
signature: [{}]
})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'_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>',
'answeredStatus' => null
]
],
'settings' => [
'duplicate' => true
],
'answeredStatus' => '<unknown>'
]
],
'maps' => [
[
]
],
'signature' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId}"
payload := strings.NewReader("{\n \"_id\": \"<string>\",\n \"_rev\": \"<string>\",\n \"type\": \"IB.EdBundle.Document.Audit\",\n \"name\": \"<string>\",\n \"template\": \"<string>\",\n \"groupId\": \"<string>\",\n \"status\": \"In Progress\",\n \"archived\": \"<string>\",\n \"isPublished\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"dates\": {\n \"creationDate\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedDate\": \"2023-11-07T05:31:56Z\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"completionDate\": \"2023-11-07T05:31:56Z\"\n },\n \"author\": {\n \"email\": \"jsmith@example.com\",\n \"type\": \"<string>\"\n },\n \"participants\": {\n \"responsible\": {\n \"email\": \"jsmith@example.com\",\n \"type\": \"<string>\"\n }\n },\n \"questions\": [\n {\n \"categoryName\": \"<string>\",\n \"questions\": [\n {\n \"question\": \"<string>\",\n \"answer\": [\n \"<unknown>\"\n ],\n \"ticket\": [\n \"<string>\"\n ],\n \"description\": \"<string>\",\n \"answeredStatus\": null\n }\n ],\n \"settings\": {\n \"duplicate\": true\n },\n \"answeredStatus\": \"<unknown>\"\n }\n ],\n \"maps\": [\n {}\n ],\n \"signature\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"<string>\",\n \"_rev\": \"<string>\",\n \"type\": \"IB.EdBundle.Document.Audit\",\n \"name\": \"<string>\",\n \"template\": \"<string>\",\n \"groupId\": \"<string>\",\n \"status\": \"In Progress\",\n \"archived\": \"<string>\",\n \"isPublished\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"dates\": {\n \"creationDate\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedDate\": \"2023-11-07T05:31:56Z\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"completionDate\": \"2023-11-07T05:31:56Z\"\n },\n \"author\": {\n \"email\": \"jsmith@example.com\",\n \"type\": \"<string>\"\n },\n \"participants\": {\n \"responsible\": {\n \"email\": \"jsmith@example.com\",\n \"type\": \"<string>\"\n }\n },\n \"questions\": [\n {\n \"categoryName\": \"<string>\",\n \"questions\": [\n {\n \"question\": \"<string>\",\n \"answer\": [\n \"<unknown>\"\n ],\n \"ticket\": [\n \"<string>\"\n ],\n \"description\": \"<string>\",\n \"answeredStatus\": null\n }\n ],\n \"settings\": {\n \"duplicate\": true\n },\n \"answeredStatus\": \"<unknown>\"\n }\n ],\n \"maps\": [\n {}\n ],\n \"signature\": [\n {}\n ]\n}")
.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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"<string>\",\n \"_rev\": \"<string>\",\n \"type\": \"IB.EdBundle.Document.Audit\",\n \"name\": \"<string>\",\n \"template\": \"<string>\",\n \"groupId\": \"<string>\",\n \"status\": \"In Progress\",\n \"archived\": \"<string>\",\n \"isPublished\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"dates\": {\n \"creationDate\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedDate\": \"2023-11-07T05:31:56Z\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"completionDate\": \"2023-11-07T05:31:56Z\"\n },\n \"author\": {\n \"email\": \"jsmith@example.com\",\n \"type\": \"<string>\"\n },\n \"participants\": {\n \"responsible\": {\n \"email\": \"jsmith@example.com\",\n \"type\": \"<string>\"\n }\n },\n \"questions\": [\n {\n \"categoryName\": \"<string>\",\n \"questions\": [\n {\n \"question\": \"<string>\",\n \"answer\": [\n \"<unknown>\"\n ],\n \"ticket\": [\n \"<string>\"\n ],\n \"description\": \"<string>\",\n \"answeredStatus\": null\n }\n ],\n \"settings\": {\n \"duplicate\": true\n },\n \"answeredStatus\": \"<unknown>\"\n }\n ],\n \"maps\": [\n {}\n ],\n \"signature\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"id": "<string>",
"rev": "2-9a1c…"
}{
"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"
}{
"message": "User not authorized for this audit",
"code": "FORBIDDEN",
"status": "403"
}{
"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"
}Update (fill in) an audit
Replaces the audit document: read it with GET, change it, and send the
whole document back with its current _rev. This is how an audit is
filled in — answers live in questions, and status and
dates.completionDate are yours to set when it is finished.
- A field you leave out is removed, with one exception: when the body
has no
_attachmentsorattachmentskey, the stored photos are kept. Sendingattachments: []deletes them. dates.lastModifiedDateis set by the server.- A stale
_rev, or attachment stubs from an older revision, is a409: read the audit again and reapply your change.
The body is checked before it is written, and a type the audit screen
cannot render is a 422 naming the field: type must be
IB.EdBundle.Document.Audit; name and status strings; dates,
author, lastmodifier, participants objects; maps, signature,
comments, timeline arrays; each maps[i] an object with mapID
and mapname; questions an array of categories, each with a
questions array whose entries have a settings object. These checks
apply to fields that are present; null is refused. A body that is not
a JSON object is a 400.
Allowed for contract administrators, Accountable and Support on the project, and anyone Responsible, Consulted, Informed or Reporter on this audit.
curl --request PUT \
--url https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"_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>",
"answeredStatus": null
}
],
"settings": {
"duplicate": true
},
"answeredStatus": "<unknown>"
}
],
"maps": [
{}
],
"signature": [
{}
]
}
'import requests
url = "https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId}"
payload = {
"_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>",
"answeredStatus": None
}
],
"settings": { "duplicate": True },
"answeredStatus": "<unknown>"
}
],
"maps": [{}],
"signature": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_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>',
answeredStatus: null
}
],
settings: {duplicate: true},
answeredStatus: '<unknown>'
}
],
maps: [{}],
signature: [{}]
})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'_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>',
'answeredStatus' => null
]
],
'settings' => [
'duplicate' => true
],
'answeredStatus' => '<unknown>'
]
],
'maps' => [
[
]
],
'signature' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId}"
payload := strings.NewReader("{\n \"_id\": \"<string>\",\n \"_rev\": \"<string>\",\n \"type\": \"IB.EdBundle.Document.Audit\",\n \"name\": \"<string>\",\n \"template\": \"<string>\",\n \"groupId\": \"<string>\",\n \"status\": \"In Progress\",\n \"archived\": \"<string>\",\n \"isPublished\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"dates\": {\n \"creationDate\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedDate\": \"2023-11-07T05:31:56Z\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"completionDate\": \"2023-11-07T05:31:56Z\"\n },\n \"author\": {\n \"email\": \"jsmith@example.com\",\n \"type\": \"<string>\"\n },\n \"participants\": {\n \"responsible\": {\n \"email\": \"jsmith@example.com\",\n \"type\": \"<string>\"\n }\n },\n \"questions\": [\n {\n \"categoryName\": \"<string>\",\n \"questions\": [\n {\n \"question\": \"<string>\",\n \"answer\": [\n \"<unknown>\"\n ],\n \"ticket\": [\n \"<string>\"\n ],\n \"description\": \"<string>\",\n \"answeredStatus\": null\n }\n ],\n \"settings\": {\n \"duplicate\": true\n },\n \"answeredStatus\": \"<unknown>\"\n }\n ],\n \"maps\": [\n {}\n ],\n \"signature\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://web.edcontrols.com/api/v2/data/projects/{database}/audits/{auditId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"<string>\",\n \"_rev\": \"<string>\",\n \"type\": \"IB.EdBundle.Document.Audit\",\n \"name\": \"<string>\",\n \"template\": \"<string>\",\n \"groupId\": \"<string>\",\n \"status\": \"In Progress\",\n \"archived\": \"<string>\",\n \"isPublished\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"dates\": {\n \"creationDate\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedDate\": \"2023-11-07T05:31:56Z\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"completionDate\": \"2023-11-07T05:31:56Z\"\n },\n \"author\": {\n \"email\": \"jsmith@example.com\",\n \"type\": \"<string>\"\n },\n \"participants\": {\n \"responsible\": {\n \"email\": \"jsmith@example.com\",\n \"type\": \"<string>\"\n }\n },\n \"questions\": [\n {\n \"categoryName\": \"<string>\",\n \"questions\": [\n {\n \"question\": \"<string>\",\n \"answer\": [\n \"<unknown>\"\n ],\n \"ticket\": [\n \"<string>\"\n ],\n \"description\": \"<string>\",\n \"answeredStatus\": null\n }\n ],\n \"settings\": {\n \"duplicate\": true\n },\n \"answeredStatus\": \"<unknown>\"\n }\n ],\n \"maps\": [\n {}\n ],\n \"signature\": [\n {}\n ]\n}")
.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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"<string>\",\n \"_rev\": \"<string>\",\n \"type\": \"IB.EdBundle.Document.Audit\",\n \"name\": \"<string>\",\n \"template\": \"<string>\",\n \"groupId\": \"<string>\",\n \"status\": \"In Progress\",\n \"archived\": \"<string>\",\n \"isPublished\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"dates\": {\n \"creationDate\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedDate\": \"2023-11-07T05:31:56Z\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"completionDate\": \"2023-11-07T05:31:56Z\"\n },\n \"author\": {\n \"email\": \"jsmith@example.com\",\n \"type\": \"<string>\"\n },\n \"participants\": {\n \"responsible\": {\n \"email\": \"jsmith@example.com\",\n \"type\": \"<string>\"\n }\n },\n \"questions\": [\n {\n \"categoryName\": \"<string>\",\n \"questions\": [\n {\n \"question\": \"<string>\",\n \"answer\": [\n \"<unknown>\"\n ],\n \"ticket\": [\n \"<string>\"\n ],\n \"description\": \"<string>\",\n \"answeredStatus\": null\n }\n ],\n \"settings\": {\n \"duplicate\": true\n },\n \"answeredStatus\": \"<unknown>\"\n }\n ],\n \"maps\": [\n {}\n ],\n \"signature\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"id": "<string>",
"rev": "2-9a1c…"
}{
"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"
}{
"message": "User not authorized for this audit",
"code": "FORBIDDEN",
"status": "403"
}{
"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
Body
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
