Get Sidecar Review Status
curl --request GET \
--url https://use.hoop.dev/api/sidecars/reviews/{id} \
--header 'hoop-sidecar-token: <hoop-sidecar-token>'import requests
url = "https://use.hoop.dev/api/sidecars/reviews/{id}"
headers = {"hoop-sidecar-token": "<hoop-sidecar-token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'hoop-sidecar-token': '<hoop-sidecar-token>'}};
fetch('https://use.hoop.dev/api/sidecars/reviews/{id}', 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://use.hoop.dev/api/sidecars/reviews/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"hoop-sidecar-token: <hoop-sidecar-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://use.hoop.dev/api/sidecars/reviews/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("hoop-sidecar-token", "<hoop-sidecar-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://use.hoop.dev/api/sidecars/reviews/{id}")
.header("hoop-sidecar-token", "<hoop-sidecar-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/sidecars/reviews/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["hoop-sidecar-token"] = '<hoop-sidecar-token>'
response = http.request(request)
puts response.read_body{
"approval_rule": "payments-approvers",
"created_at": "2024-07-25T15:56:35.317601Z",
"decided_at": "2024-07-25T16:01:12.000Z",
"id": "9F9745B4-C77B-4D52-84D3-E24F67E3623C",
"listener_name": "appdb",
"rejection_reason": "Not during business hours.",
"status": "PENDING"
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}Sidecars
Get Sidecar Review Status
Read the status of one review the calling sidecar filed. It never changes the review: an approved review stays approved until the sidecar resends the statement.
GET
/
sidecars
/
reviews
/
{id}
Get Sidecar Review Status
curl --request GET \
--url https://use.hoop.dev/api/sidecars/reviews/{id} \
--header 'hoop-sidecar-token: <hoop-sidecar-token>'import requests
url = "https://use.hoop.dev/api/sidecars/reviews/{id}"
headers = {"hoop-sidecar-token": "<hoop-sidecar-token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'hoop-sidecar-token': '<hoop-sidecar-token>'}};
fetch('https://use.hoop.dev/api/sidecars/reviews/{id}', 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://use.hoop.dev/api/sidecars/reviews/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"hoop-sidecar-token: <hoop-sidecar-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://use.hoop.dev/api/sidecars/reviews/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("hoop-sidecar-token", "<hoop-sidecar-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://use.hoop.dev/api/sidecars/reviews/{id}")
.header("hoop-sidecar-token", "<hoop-sidecar-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/sidecars/reviews/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["hoop-sidecar-token"] = '<hoop-sidecar-token>'
response = http.request(request)
puts response.read_body{
"approval_rule": "payments-approvers",
"created_at": "2024-07-25T15:56:35.317601Z",
"decided_at": "2024-07-25T16:01:12.000Z",
"id": "9F9745B4-C77B-4D52-84D3-E24F67E3623C",
"listener_name": "appdb",
"rejection_reason": "Not during business hours.",
"status": "PENDING"
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}Headers
The token returned when the sidecar was created
Path Parameters
The review id
Response
OK
The access request rule the review was filed under
Example:
"payments-approvers"
The time the review was created
Example:
"2024-07-25T15:56:35.317601Z"
The time of the last reviewer decision. Null while the review is pending
Example:
"2024-07-25T16:01:12.000Z"
Resource identifier
Example:
"9F9745B4-C77B-4D52-84D3-E24F67E3623C"
The sidecar listener this review is bound to
Example:
"appdb"
The reason the reviewer gave when rejecting the review
Example:
"Not during business hours."
The status of the review
- PENDING - Waiting for a reviewer
- APPROVED - Approved and not yet consumed; resend the identical statement
- REJECTED - Rejected; the statement will not run
- REVOKED - Revoked after approval
- EXECUTED - The approval was consumed by a resent statement
Available options:
PENDING, APPROVED, REJECTED, REVOKED, PROCESSING, EXECUTED, UNKNOWN Was this page helpful?