curl --request PUT \
--url http://localhost:3001/portal-api/pages/{page_id}/content-blocks/{content-block_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"Content": "<p>Everything would be better connected, but the internet is messy, imperfect and unpredictable.</p>\n\t\t\t\t<p>Our engineers are dedicated to making it simple, fast and affordable to connect every system in the world.</p>\n\t\t\t\t<p>We ensure you can trust our systems to look after yours.</p>",
"Name": "HeaderDescription"
}
'import requests
url = "http://localhost:3001/portal-api/pages/{page_id}/content-blocks/{content-block_id}"
payload = {
"Content": "<p>Everything would be better connected, but the internet is messy, imperfect and unpredictable.</p>
<p>Our engineers are dedicated to making it simple, fast and affordable to connect every system in the world.</p>
<p>We ensure you can trust our systems to look after yours.</p>",
"Name": "HeaderDescription"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
Content: '<p>Everything would be better connected, but the internet is messy, imperfect and unpredictable.</p>\n <p>Our engineers are dedicated to making it simple, fast and affordable to connect every system in the world.</p>\n <p>We ensure you can trust our systems to look after yours.</p>',
Name: 'HeaderDescription'
})
};
fetch('http://localhost:3001/portal-api/pages/{page_id}/content-blocks/{content-block_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_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/portal-api/pages/{page_id}/content-blocks/{content-block_id}",
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([
'Content' => '<p>Everything would be better connected, but the internet is messy, imperfect and unpredictable.</p>
\t\t\t\t<p>Our engineers are dedicated to making it simple, fast and affordable to connect every system in the world.</p>
\t\t\t\t<p>We ensure you can trust our systems to look after yours.</p>',
'Name' => 'HeaderDescription'
]),
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 := "http://localhost:3001/portal-api/pages/{page_id}/content-blocks/{content-block_id}"
payload := strings.NewReader("{\n \"Content\": \"<p>Everything would be better connected, but the internet is messy, imperfect and unpredictable.</p>\\n\\t\\t\\t\\t<p>Our engineers are dedicated to making it simple, fast and affordable to connect every system in the world.</p>\\n\\t\\t\\t\\t<p>We ensure you can trust our systems to look after yours.</p>\",\n \"Name\": \"HeaderDescription\"\n}")
req, _ := http.NewRequest("PUT", 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.put("http://localhost:3001/portal-api/pages/{page_id}/content-blocks/{content-block_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"Content\": \"<p>Everything would be better connected, but the internet is messy, imperfect and unpredictable.</p>\\n\\t\\t\\t\\t<p>Our engineers are dedicated to making it simple, fast and affordable to connect every system in the world.</p>\\n\\t\\t\\t\\t<p>We ensure you can trust our systems to look after yours.</p>\",\n \"Name\": \"HeaderDescription\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/portal-api/pages/{page_id}/content-blocks/{content-block_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"Content\": \"<p>Everything would be better connected, but the internet is messy, imperfect and unpredictable.</p>\\n\\t\\t\\t\\t<p>Our engineers are dedicated to making it simple, fast and affordable to connect every system in the world.</p>\\n\\t\\t\\t\\t<p>We ensure you can trust our systems to look after yours.</p>\",\n \"Name\": \"HeaderDescription\"\n}"
response = http.request(request)
puts response.read_body{
"CreatedAt": "2023-06-25 13:37",
"UpdatedAt": "2023-06-25 13:37",
"ID": 1
}{
"errors": [
"<string>"
]
}Update a content block
Update a content block including the content and name
curl --request PUT \
--url http://localhost:3001/portal-api/pages/{page_id}/content-blocks/{content-block_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"Content": "<p>Everything would be better connected, but the internet is messy, imperfect and unpredictable.</p>\n\t\t\t\t<p>Our engineers are dedicated to making it simple, fast and affordable to connect every system in the world.</p>\n\t\t\t\t<p>We ensure you can trust our systems to look after yours.</p>",
"Name": "HeaderDescription"
}
'import requests
url = "http://localhost:3001/portal-api/pages/{page_id}/content-blocks/{content-block_id}"
payload = {
"Content": "<p>Everything would be better connected, but the internet is messy, imperfect and unpredictable.</p>
<p>Our engineers are dedicated to making it simple, fast and affordable to connect every system in the world.</p>
<p>We ensure you can trust our systems to look after yours.</p>",
"Name": "HeaderDescription"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
Content: '<p>Everything would be better connected, but the internet is messy, imperfect and unpredictable.</p>\n <p>Our engineers are dedicated to making it simple, fast and affordable to connect every system in the world.</p>\n <p>We ensure you can trust our systems to look after yours.</p>',
Name: 'HeaderDescription'
})
};
fetch('http://localhost:3001/portal-api/pages/{page_id}/content-blocks/{content-block_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_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/portal-api/pages/{page_id}/content-blocks/{content-block_id}",
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([
'Content' => '<p>Everything would be better connected, but the internet is messy, imperfect and unpredictable.</p>
\t\t\t\t<p>Our engineers are dedicated to making it simple, fast and affordable to connect every system in the world.</p>
\t\t\t\t<p>We ensure you can trust our systems to look after yours.</p>',
'Name' => 'HeaderDescription'
]),
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 := "http://localhost:3001/portal-api/pages/{page_id}/content-blocks/{content-block_id}"
payload := strings.NewReader("{\n \"Content\": \"<p>Everything would be better connected, but the internet is messy, imperfect and unpredictable.</p>\\n\\t\\t\\t\\t<p>Our engineers are dedicated to making it simple, fast and affordable to connect every system in the world.</p>\\n\\t\\t\\t\\t<p>We ensure you can trust our systems to look after yours.</p>\",\n \"Name\": \"HeaderDescription\"\n}")
req, _ := http.NewRequest("PUT", 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.put("http://localhost:3001/portal-api/pages/{page_id}/content-blocks/{content-block_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"Content\": \"<p>Everything would be better connected, but the internet is messy, imperfect and unpredictable.</p>\\n\\t\\t\\t\\t<p>Our engineers are dedicated to making it simple, fast and affordable to connect every system in the world.</p>\\n\\t\\t\\t\\t<p>We ensure you can trust our systems to look after yours.</p>\",\n \"Name\": \"HeaderDescription\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/portal-api/pages/{page_id}/content-blocks/{content-block_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"Content\": \"<p>Everything would be better connected, but the internet is messy, imperfect and unpredictable.</p>\\n\\t\\t\\t\\t<p>Our engineers are dedicated to making it simple, fast and affordable to connect every system in the world.</p>\\n\\t\\t\\t\\t<p>We ensure you can trust our systems to look after yours.</p>\",\n \"Name\": \"HeaderDescription\"\n}"
response = http.request(request)
puts response.read_body{
"CreatedAt": "2023-06-25 13:37",
"UpdatedAt": "2023-06-25 13:37",
"ID": 1
}{
"errors": [
"<string>"
]
}Authorizations
Path Parameters
UID of the content block
1
UID of the page
1
Body
Content of this content block
"<p>Everything would be better connected, but the internet is messy, imperfect and unpredictable.</p>\n\t\t\t\t<p>Our engineers are dedicated to making it simple, fast and affordable to connect every system in the world.</p>\n\t\t\t\t<p>We ensure you can trust our systems to look after yours.</p>"
Name of the content block. In order to succeesfully render this page, name should with a reference in the template for this page. For instance, HeaderDescription will be rendered in {{safe .blocks.HeaderDescription.Content}} section of the template
"HeaderDescription"
Response
OK
Timestamp of when this catalogue was created
^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$"2023-06-25 13:37"
Timestamp of when this catalogue was updated the last time
^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$"2023-06-25 13:37"
UID of the content block
1
Was this page helpful?