Data Rules
Approve proposed corrections in bulk
Approves up to 100 proposed corrections in one call and writes each one, as Approve a proposed correction does for one. Each result is decided on its own, so one that cannot be approved is reported in errors and the rest still go through. A caller without approval rights gets a 200 with every ID in errors under the code not_approver, not a 403. Requires corrections to be enabled on the account and a token with Data Rules write permission.
POST
/
projects
/
{project_id}
/
rule_results
/
bulk_approve
Approve proposed corrections in bulk
curl --request POST \
--url https://app.gomangrove.com/api/v1/projects/{project_id}/rule_results/bulk_approve \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"result_ids": [
"dpres_AbCd1234567890Ef",
"dpres_EfGh1234567890Ij"
]
}
'import requests
url = "https://app.gomangrove.com/api/v1/projects/{project_id}/rule_results/bulk_approve"
payload = { "result_ids": ["dpres_AbCd1234567890Ef", "dpres_EfGh1234567890Ij"] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({result_ids: ['dpres_AbCd1234567890Ef', 'dpres_EfGh1234567890Ij']})
};
fetch('https://app.gomangrove.com/api/v1/projects/{project_id}/rule_results/bulk_approve', 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://app.gomangrove.com/api/v1/projects/{project_id}/rule_results/bulk_approve",
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([
'result_ids' => [
'dpres_AbCd1234567890Ef',
'dpres_EfGh1234567890Ij'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://app.gomangrove.com/api/v1/projects/{project_id}/rule_results/bulk_approve"
payload := strings.NewReader("{\n \"result_ids\": [\n \"dpres_AbCd1234567890Ef\",\n \"dpres_EfGh1234567890Ij\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://app.gomangrove.com/api/v1/projects/{project_id}/rule_results/bulk_approve")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"result_ids\": [\n \"dpres_AbCd1234567890Ef\",\n \"dpres_EfGh1234567890Ij\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gomangrove.com/api/v1/projects/{project_id}/rule_results/bulk_approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"result_ids\": [\n \"dpres_AbCd1234567890Ef\",\n \"dpres_EfGh1234567890Ij\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "dpres_AbCd1234567890Ef",
"status": "pass",
"entered_value": "0.0",
"corrected": null,
"rule_id": "rule_Qb3k9TzdL0pWnXyz",
"rule_version": 1,
"rule_name": "Fill ambient temperature dropouts",
"data_point_id": "in_AbCd1234567890Ef",
"data_point_slug": "ambient-temperature-c",
"dismissed_at": null,
"dismissed_by": null,
"dismissal_reason": null,
"rejected_at": null,
"rejected_by": null,
"rejection_reason": null,
"approval_state": "approved",
"proposed_correction": null,
"evaluated_at": "2026-09-03T08:15:00.000Z"
}
],
"errors": [
{
"id": "dpres_EfGh1234567890Ij",
"code": "not_pending",
"message": "This correction is no longer waiting on approval."
}
]
}{
"errors": [
{
"message": "Corrections are not enabled"
}
]
}{
"errors": [
{
"message": "Record not found"
}
]
}{
"errors": [
{
"message": "result_ids must contain between 1 and 100 unique IDs"
}
]
}Authorizations
Path Parameters
Body
application/json
Rule-result friendly IDs in the dpres_XXXX syntax, from a rule's results list. Between 1 and 100 unique IDs.
Required array length:
1 - 100 elements⌘I
Approve proposed corrections in bulk
curl --request POST \
--url https://app.gomangrove.com/api/v1/projects/{project_id}/rule_results/bulk_approve \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"result_ids": [
"dpres_AbCd1234567890Ef",
"dpres_EfGh1234567890Ij"
]
}
'import requests
url = "https://app.gomangrove.com/api/v1/projects/{project_id}/rule_results/bulk_approve"
payload = { "result_ids": ["dpres_AbCd1234567890Ef", "dpres_EfGh1234567890Ij"] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({result_ids: ['dpres_AbCd1234567890Ef', 'dpres_EfGh1234567890Ij']})
};
fetch('https://app.gomangrove.com/api/v1/projects/{project_id}/rule_results/bulk_approve', 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://app.gomangrove.com/api/v1/projects/{project_id}/rule_results/bulk_approve",
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([
'result_ids' => [
'dpres_AbCd1234567890Ef',
'dpres_EfGh1234567890Ij'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://app.gomangrove.com/api/v1/projects/{project_id}/rule_results/bulk_approve"
payload := strings.NewReader("{\n \"result_ids\": [\n \"dpres_AbCd1234567890Ef\",\n \"dpres_EfGh1234567890Ij\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://app.gomangrove.com/api/v1/projects/{project_id}/rule_results/bulk_approve")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"result_ids\": [\n \"dpres_AbCd1234567890Ef\",\n \"dpres_EfGh1234567890Ij\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gomangrove.com/api/v1/projects/{project_id}/rule_results/bulk_approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"result_ids\": [\n \"dpres_AbCd1234567890Ef\",\n \"dpres_EfGh1234567890Ij\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "dpres_AbCd1234567890Ef",
"status": "pass",
"entered_value": "0.0",
"corrected": null,
"rule_id": "rule_Qb3k9TzdL0pWnXyz",
"rule_version": 1,
"rule_name": "Fill ambient temperature dropouts",
"data_point_id": "in_AbCd1234567890Ef",
"data_point_slug": "ambient-temperature-c",
"dismissed_at": null,
"dismissed_by": null,
"dismissal_reason": null,
"rejected_at": null,
"rejected_by": null,
"rejection_reason": null,
"approval_state": "approved",
"proposed_correction": null,
"evaluated_at": "2026-09-03T08:15:00.000Z"
}
],
"errors": [
{
"id": "dpres_EfGh1234567890Ij",
"code": "not_pending",
"message": "This correction is no longer waiting on approval."
}
]
}{
"errors": [
{
"message": "Corrections are not enabled"
}
]
}{
"errors": [
{
"message": "Record not found"
}
]
}{
"errors": [
{
"message": "result_ids must contain between 1 and 100 unique IDs"
}
]
}