curl --request POST \
--url https://devtune.ai/api/v2/projects/{projectId}/audit/findings/action \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"auditRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"findingId": "<string>",
"acknowledgeHighStakes": true,
"title": "<string>"
}
'import requests
url = "https://devtune.ai/api/v2/projects/{projectId}/audit/findings/action"
payload = {
"auditRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"findingId": "<string>",
"acknowledgeHighStakes": True,
"title": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
auditRunId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
findingId: '<string>',
acknowledgeHighStakes: true,
title: '<string>'
})
};
fetch('https://devtune.ai/api/v2/projects/{projectId}/audit/findings/action', 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://devtune.ai/api/v2/projects/{projectId}/audit/findings/action",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'auditRunId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'findingId' => '<string>',
'acknowledgeHighStakes' => true,
'title' => '<string>'
]),
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://devtune.ai/api/v2/projects/{projectId}/audit/findings/action"
payload := strings.NewReader("{\n \"auditRunId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"findingId\": \"<string>\",\n \"acknowledgeHighStakes\": true,\n \"title\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://devtune.ai/api/v2/projects/{projectId}/audit/findings/action")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"auditRunId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"findingId\": \"<string>\",\n \"acknowledgeHighStakes\": true,\n \"title\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devtune.ai/api/v2/projects/{projectId}/audit/findings/action")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"auditRunId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"findingId\": \"<string>\",\n \"acknowledgeHighStakes\": true,\n \"title\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"actionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"auditRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": true,
"findingId": "<string>"
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}Create an action from an Audit finding
Creates an accepted action from one finding of a completed audit run in this project, as Create action on the Audit page does: the same action, finding evidence and target pages. Take auditRunId and findingId from List Audit findings. title defaults to the finding’s remediation summary. The action is made as the member who created the API key or holds the OAuth grant; they must be a project member with project management permission (403 otherwise). A finding already linked to an open action, from an earlier call, the Audit page or an earlier audit of the same site, returns that action with created false instead of making a second one: its finding evidence and target pages are refreshed, its title changes only when title is sent, and its description stays as stored. A refusal is a 409 and nothing is written. Its reason says why: stale_audit_run (a newer completed audit of the same site exists, or the finding’s action was already refreshed from a newer audit, such as another path’s audit of the same host for a crawler-access finding; details.latestAuditRunId names the newer run, so read its findings and retry with that id); finding_dismissed (restore the finding with Dismiss or restore an Audit finding first); page_locked (a page the finding affects is locked); acknowledgment_required (a page the finding affects is high-stakes; retry with acknowledgeHighStakes true once a human has confirmed the change, which is recorded on the action and kept when the action is returned later); action_not_open (the finding’s action is archived, completed or out of the queue; details.actionId names it, and Change an action status restores or reopens it); retrieval_restriction_acknowledged (every page a crawler-access finding affects is acknowledged as an intentional restriction; reconsider those pages with Acknowledge or reconsider a retrieval restriction first). A crawler-access finding whose audit holds no retrieval evidence, or a stored finding DevTune cannot read, is also a 409. An audit run that is not in this project or did not complete successfully, or a finding id the run does not hold, is a 404. Archive or restore the action with Change an action status. A new action sends an action.created webhook; a returned one sends action.updated. Requires the actions.write scope.
curl --request POST \
--url https://devtune.ai/api/v2/projects/{projectId}/audit/findings/action \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"auditRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"findingId": "<string>",
"acknowledgeHighStakes": true,
"title": "<string>"
}
'import requests
url = "https://devtune.ai/api/v2/projects/{projectId}/audit/findings/action"
payload = {
"auditRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"findingId": "<string>",
"acknowledgeHighStakes": True,
"title": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
auditRunId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
findingId: '<string>',
acknowledgeHighStakes: true,
title: '<string>'
})
};
fetch('https://devtune.ai/api/v2/projects/{projectId}/audit/findings/action', 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://devtune.ai/api/v2/projects/{projectId}/audit/findings/action",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'auditRunId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'findingId' => '<string>',
'acknowledgeHighStakes' => true,
'title' => '<string>'
]),
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://devtune.ai/api/v2/projects/{projectId}/audit/findings/action"
payload := strings.NewReader("{\n \"auditRunId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"findingId\": \"<string>\",\n \"acknowledgeHighStakes\": true,\n \"title\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://devtune.ai/api/v2/projects/{projectId}/audit/findings/action")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"auditRunId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"findingId\": \"<string>\",\n \"acknowledgeHighStakes\": true,\n \"title\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devtune.ai/api/v2/projects/{projectId}/audit/findings/action")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"auditRunId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"findingId\": \"<string>\",\n \"acknowledgeHighStakes\": true,\n \"title\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"actionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"auditRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": true,
"findingId": "<string>"
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}