Block ändern
PATCH
/pages/{page}/blocks/{block}
const url = 'https://ihre-marke.brandhub.31m.de/api/v1/pages/1/blocks/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"data":{"additionalProperty":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://ihre-marke.brandhub.31m.de/api/v1/pages/1/blocks/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "data": { "additionalProperty": "example" } }'Ändert einen Block. Gesendete Felder in data überschreiben, nicht gesendete bleiben erhalten. Den Typ eines Blocks ändert dieser Aufruf nicht.
Authorizations
Abschnitt betitelt „Authorizations“Parameters
Abschnitt betitelt „Parameters“Path Parameters
Abschnitt betitelt „Path Parameters“page
required
integer
ID der Seite.
block
required
string
ID des Blocks, aus blocks[].id der Seite.
Request Body
Abschnitt betitelt „Request Body“Media typeapplication/json
object
data
Zu ändernde Felder des Blocks.
object
key
additional properties
Examplegenerated
{ "data": { "additionalProperty": "example" }}Responses
Abschnitt betitelt „Responses“Page
Media typeapplication/json
Page
object
id
required
integer
title
required
string
slug
required
string
type
required
string
parent_id
required
integer | null
nav_expansion
required
string
visibility
required
string
blocks
required
Array<object>
object
id
required
string | null
type
required
string | null
data
required
object
key
additional properties
updated_at
required
string | null
Examplegenerated
{ "id": 1, "title": "example", "slug": "example", "type": "example", "parent_id": 1, "nav_expansion": "example", "visibility": "example", "blocks": [ { "id": "example", "type": "example", "data": { "additionalProperty": "example" } } ], "updated_at": "example"}Not found
Media typeapplication/json
object
message
required
Error overview.
string
Examplegenerated
{ "message": "example"}An error
Media typeapplication/json
object
message
required
Error overview.
string
Example
{ "message": "Dieser Block-Typ ist in v1 nicht über die API änderbar."}