Revalidate a block
curl --request POST \
--url https://api.reintersect.com/v0/blocks/{blockId}/revalidate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reintersect.com/v0/blocks/{blockId}/revalidate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reintersect.com/v0/blocks/{blockId}/revalidate', 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://api.reintersect.com/v0/blocks/{blockId}/revalidate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://api.reintersect.com/v0/blocks/{blockId}/revalidate"
req, _ := http.NewRequest("POST", 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.post("https://api.reintersect.com/v0/blocks/{blockId}/revalidate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reintersect.com/v0/blocks/{blockId}/revalidate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyBlocks
Revalidate a block
Ask Reintersect to render one of your blocks again without changing its state.
POST
/
v0
/
blocks
/
{blockId}
/
revalidate
Revalidate a block
curl --request POST \
--url https://api.reintersect.com/v0/blocks/{blockId}/revalidate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reintersect.com/v0/blocks/{blockId}/revalidate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reintersect.com/v0/blocks/{blockId}/revalidate', 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://api.reintersect.com/v0/blocks/{blockId}/revalidate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://api.reintersect.com/v0/blocks/{blockId}/revalidate"
req, _ := http.NewRequest("POST", 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.post("https://api.reintersect.com/v0/blocks/{blockId}/revalidate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reintersect.com/v0/blocks/{blockId}/revalidate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body
Renders the block again with its current state, for example after data the render reads changed in
your system. Reintersect calls your app’s render during the request and answers
With the SDK, call
202 Accepted once
the new tree is stored.
Authenticate with an install token or the interaction token for this block. No scope is needed.
Errors
_tag | Status | Cause |
|---|---|---|
ReintersectAppBlockNotFoundError | 404 | No block with this id belongs to your install. |
ReintersectAppBlockFinalError | 409 | Final blocks never re-render. |
ReintersectAppBlockStateInvalidError | 422 | The block’s stored state fails the state schema or size limit of the version the install is on now, for example after a new version changed the schema. issues lists why. Your app isn’t called. |
ReintersectAppBlockVersionConflictError | 409 | The block or its state changed while Reintersect was rendering it, for example because an action or an update landed first. currentVersion is the new version. The new render isn’t stored. |
ReintersectAppResponseInvalidError | 502 | The render failed in your app. |
reintersect.blocks.revalidate(blockId).